Arbitrary file write via unchecked TAR entry paths
Published Jan 26, 2022 · Updated Apr 22, 2025
Path traversal in SharpZipLib before 1.3.3 allows attackers to write files outside the extraction directory through crafted TAR entries. TarArchive.ExtractContents combines an entry name such as ../evil.txt with destFolder without verifying that the resolved path remains beneath it. A consuming application must extract attacker-controlled TAR content; overwritten or planted files can enable code execution in that application's context.
Summary
What happened
Path traversal in SharpZipLib before 1.3.3 allows attackers to write files outside the extraction directory through crafted TAR entries. TarArchive.ExtractContents combines an entry name such as ../evil.txt with destFolder without verifying that the resolved path remains beneath it. A consuming application must extract attacker-controlled TAR content; overwritten or planted files can enable code execution in that application's context.
The record
- CVE
- CVE-2021-32840
- Published
- Jan 26, 2022
- Updated
- Apr 22, 2025
- Vendor
- ICSharpCode
- Product
- SharpZipLib
- Classifications
- CWE-22, T1203
- Attack vector
- local
- Privileges
- unauthenticated
Timeline
How it unfolded
- Jan 26, 2022CVE publishedPublication date reported by the CVE source.
- Apr 22, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0.86.0 <0.86.0*
- Affected versionversion=1.3.3 <1.3.3
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- GitHub Security Lab TAR traversal demonstrationproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo