CVE-2022-30631: Uncontrolled Recursion in compress/gzip Package in Bitnami Golang
Summary
CVE-2022-30631: Stack exhaustion when reading certain archives in compress/gzip. Affects golang across 2 version ranges.
< 1.17.12
>= 1.18.0, < 1.18.4
Fixed in 1.17.12 or 1.18.4, depending on the release line you run. How to fix ↓
Also tracked for
- golang-1.15 · Debian:11
- stdlib · Go
The same CVE-2022-30631 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
Bitnami Golang is an open-source programming language that provides a robust development environment for building efficient and scalable applications. The compress/gzip package in Bitnami Golang is responsible for handling gzip-compressed files. It allows developers to read and write compressed files using the gzip format. However, a vulnerability has been discovered in versions before Go 1.17.12 and Go 1.18.4, which can lead to a panic due to stack exhaustion when processing an archive containing a large number of concatenated 0-length compressed files.
Vulnerability Detail
The vulnerability (CVE-2022-30631) in the compress/gzip package of Bitnami Golang arises from uncontrolled recursion in the Reader.Read function. An attacker can exploit this vulnerability by creating an archive with numerous concatenated 0-length compressed files. When the affected code attempts to read these files, it enters an uncontrolled recursion loop, causing a stack exhaustion and resulting in a panic. This vulnerability can be exploited remotely without authentication, potentially leading to a denial-of-service (DoS) condition. The severity of this vulnerability is rated as high (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
< 1.17.121.17.12 -
>= 1.18.0, < 1.18.41.18.4
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 known workaround for this vulnerability. It is essential to apply the recommended fix by updating the Bitnami Golang package to the patched versions.
Conclusion
The uncontrolled recursion vulnerability in the compress/gzip package of Bitnami Golang can be exploited remotely without authentication, potentially leading to a denial-of-service condition. It is crucial to update the Bitnami Golang package to version 1.17.12 or 1.18.4 to mitigate this vulnerability. For further assistance or support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for golang →
FAQ
This vulnerability can be exploited remotely without authentication, potentially leading to a denial-of-service (DoS) condition by causing a panic due to stack exhaustion.
Versions before Go 1.17.12 and Go 1.18.4 are affected by this vulnerability.
Yes, this vulnerability can be exploited remotely without authentication.
No, there is no known workaround. It is crucial to update the Bitnami Golang package to the patched versions.
The severity of this vulnerability is rated as high (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
References
Related vulnerabilities
Recent vulnerabilities recorded for golang.