SharpCompress is vulnerable to Path Traversal
60
Medium Risk
SharpCompress extracts TAR archives through its WriteToDirectory extraction API and checks that each entry's destination path stays under the extraction root. When an application supplies an ExtractionOptions.SymbolicLinkHandler that creates symbolic links, a crafted archive can place a symlink entry whose target resolves outside the root and then a later file entry whose path resolves through that link. The destination prefix check still passes, but the file write follows the symlink at the filesystem level, so externally supplied content is written or overwritten outside the intended extraction directory. The fix rejects symlink targets that resolve outside the destination and refuses to extract entries through existing symbolic links.
You are affected if you are using a version that falls within the vulnerable range and your application supplies an ExtractionOptions.SymbolicLinkHandler that creates symbolic links while extracting untrusted TAR archives.
SharpCompress is vulnerable to Path Traversal in versions 0.0.1 - 0.50.3.
Upgrade the SharpCompress library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant