CVE-2022-4899: Buffer Overrun Vulnerability in zstd
Summary
CVE-2022-4899: zstd vulnerable to buffer overrun. Affects github.com/facebook/zstd versions < 1.5.4. Fixed in 1.5.4. How to fix ↓
Also tracked for
The same CVE-2022-4899 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
zstd is a compression algorithm and library that provides fast and efficient compression and decompression capabilities. It is commonly used in various applications and frameworks to reduce file sizes and improve data transfer speeds. However, a vulnerability has been discovered in zstd v1.4.10, which allows an attacker to exploit a buffer overrun by supplying an empty string as an argument to the command line tool.
Vulnerability Detail
The vulnerability in zstd v1.4.10 arises from a lack of proper input validation when processing command line arguments. By providing an empty string as an argument, an attacker can trigger a buffer overrun, potentially leading to arbitrary code execution or a denial of service condition. This vulnerability poses a significant risk to systems utilizing zstd, as it can be exploited remotely without authentication. It is crucial to address this issue promptly to prevent potential compromise of sensitive data or disruption of services.
How To Fix
Minimum fixed version
1.5.4
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users can avoid the buffer overrun vulnerability by refraining from using the affected command line tool or by ensuring that all command line arguments provided are non-empty strings. However, this workaround is not a long-term solution and should only be considered until the package can be updated to a secure version.
Conclusion
The buffer overrun vulnerability in zstd v1.4.10 poses a serious threat to systems utilizing this package. It is crucial to update to a secure version (v1.4.11 or later) to mitigate the risk of arbitrary code execution or denial of service attacks. For further assistance and support in addressing this vulnerability, please contact DevNack.com.
See every vulnerability recorded for github.com/facebook/zstd →
FAQ
zstd is a compression algorithm and library that provides fast and efficient compression and decompression capabilities. It is widely used in various applications and frameworks.
This vulnerability allows an attacker to trigger a buffer overrun, potentially leading to arbitrary code execution or a denial of service condition.
To fix this vulnerability, it is recommended to update zstd to the latest version (v1.4.11 or later) that includes the necessary patches.
As a temporary workaround, users can avoid the affected command line tool or ensure that all command line arguments provided are non-empty strings.
Yes, this vulnerability can be exploited remotely without authentication, making it a significant security risk.