Wiz Agents & Workflows are here

CVE-2021-32840
C# vulnerability analysis and mitigation

Overview

SharpZipLib (also known as #ziplib), a Zip, GZip, Tar and BZip2 library, was found to contain a path traversal vulnerability (CVE-2021-32840) prior to version 1.3.3. The vulnerability was discovered and reported by Jaroslav Lobačevski from the GitHub Security Lab team. The issue was disclosed on December 8, 2021, and was patched in version 1.3.3, which was released on September 19, 2021 (GitHub Security Lab, SharpZipLib Release).

Technical details

The vulnerability allows a TAR file entry '../evil.txt' to be extracted in the parent directory of the destFolder, bypassing the intended extraction directory. This path traversal vulnerability affects versions 0.86.0 through 1.2.0. The issue stems from insufficient validation of extraction paths in the TAR extraction functionality. The vulnerability has been assigned a CVSS 3.1 base score of 9.8 (Critical) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (Ubuntu Security).

Impact

The vulnerability can lead to arbitrary file write capabilities, which may ultimately result in code execution on the affected system. This could allow attackers to write files outside the intended extraction directory, potentially overwriting critical system files or inserting malicious code (GitHub Security Lab).

Mitigation and workarounds

The vulnerability was patched in SharpZipLib version 1.3.3. Users are strongly advised to upgrade to this version or later. The fix includes improved validation of extraction paths to prevent directory traversal attempts. The patch was implemented through additional checks in the TAR extraction functionality (SharpZipLib Release).

Additional resources


SourceThis report was generated using AI

Related C# vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-mvm6-f9r3-fgfxHIGH7.7
  • C#C#
  • AWSSDK.CloudFront
NoYesMar 27, 2026
CVE-2026-33536MEDIUM5.1
  • C#C#
  • Magick.NET-Q16-x64
NoYesMar 26, 2026
CVE-2026-33535MEDIUM4
  • C#C#
  • ImageMagick
NoYesMar 26, 2026
GHSA-9r56-3gjq-hqf7LOW3.3
  • C#C#
  • Magick.NET-Q8-arm64
NoYesMar 26, 2026
GHSA-6p22-q7w5-33pgLOW3.3
  • C#C#
  • Magick.NET-Q16-HDRI-arm64
NoYesMar 26, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management