fastcoreのtar展開に脆弱性、修正版は未確認
Summary
Pythonライブラリのfastcoreで、untar_dir()を使って外部のtarアーカイブを展開するアプリに、任意の場所へファイルを書き込まれる脆弱性が公表されました。2.2.44以前を使っているなら、まず自社のコードがこの関数に信頼できないアーカイブを渡していないかを確認してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
Pythonライブラリのfastcoreで、untar_dir()を使って外部のtarアーカイブを展開するアプリに、任意の場所へファイルを書き込まれる脆弱性が公表されました。2.2.44以前を使っているなら、まず自社のコードがこの関数に信頼できないアーカイブを渡していないかを確認してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| AnswerDotAIfastcore |
≤ 2.2.44→ Not listed |
Not listed |
This record does not list fixed versions. Check the article or the vendor advisory in the references for whether and where it is fixed.
Original description The description as published by the source.
fastcore through 2.2.44 contains a path traversal vulnerability in the fastcore.xtras.untar_dir() archive extraction helper that allows attackers who supply a crafted tar archive to write files outside the intended extraction directory. The internal _unpack() function passes the archive to shutil.unpack_archive() without a tar extraction filter, member path validation, or a containment check, so archive members with absolute paths or ../ traversal sequences are written to arbitrary locations writable by the application process when running on Python versions before 3.14. Applications that extract untrusted archives with untar_dir() can have application files, configuration, or importable code overwritten, which can lead to code execution, data modification, or denial of service.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory