CVE-2021-33196: Panic when reading certain archives in archive/zip
Summary
CVE-2021-33196: Panic when reading certain archives in archive/zip. Affects stdlib across 2 version ranges.
< 1.15.13
>= 1.16.0-0, < 1.16.5
Fixed in 1.15.13 or 1.16.5, depending on the release line you run. How to fix ↓
Also tracked for
- golang · Bitnami
- golang-1.15 · Debian:11
The same CVE-2021-33196 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The 'archive/zip' package is a part of the Go standard library and provides support for reading and writing ZIP archives. It is commonly used for compressing and decompressing files in various Go applications. However, a vulnerability has been discovered in the package that can lead to a panic or fatal error when reading certain archives.
Vulnerability Detail
The vulnerability, identified as CVE-2021-33196, occurs when using the 'NewReader' or 'OpenReader' functions to read an archive that claims to contain a large number of files. This issue is independent of the actual size of the archive. The panic or fatal error can result in a denial of service (DoS) situation or unexpected termination of the application. The vulnerability affects versions 0.0.0 to 1.15.13 and 1.16.0-0 to 1.16.5 of the 'archive/zip' package.
How To Fix
Latest published version: go1.25.5 as of 22 Oct 2026
go get stdlib@vgo1.25.5
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
< 1.15.131.15.13go get stdlib@v1.15.13 -
>= 1.16.0-0, < 1.16.51.16.5go get stdlib@v1.16.5
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
There is no specific workaround provided for this vulnerability. Updating the 'archive/zip' package to the fixed versions is the recommended solution.
Conclusion
The 'archive/zip' package in Go is vulnerable to a panic or fatal error when reading certain archives. To mitigate this vulnerability, it is crucial to update the package to version 1.15.13 or 1.16.5. For further assistance or support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for stdlib →
FAQ
The vulnerability can lead to a panic or fatal error when reading certain archives, potentially causing a denial of service (DoS) situation or unexpected termination of the application.
Versions 0.0.0 to 1.15.13 and 1.16.0-0 to 1.16.5 of the 'archive/zip' package are affected.
There are no known exploits for this vulnerability at the moment.
Yes, updating the 'archive/zip' package to version 1.15.13 or 1.16.5 will fix this vulnerability.
No specific workaround is provided. Updating to the fixed versions is the recommended solution.
Related vulnerabilities
Recent vulnerabilities recorded for stdlib.