CVE-2022-4899: Buffer Overrun Vulnerability in zstd

zstd Updated 02 Oct 2025

Summary

31/03/2023
No i
High
7.5

CVE-2022-4899: A vulnerability was found in zstd v1.4.10, where an attacker can supply empty string as an argument to the command line tool to cause buffer overrun. Affects zstd versions 1.1.4 – 1.5.5.1. No fix is published. 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.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

zstd is a compression library and command-line tool that provides fast and efficient compression and decompression capabilities. It is commonly used in various applications to reduce file sizes and improve data transfer speeds. However, zstd version 1.4.10 is vulnerable to a buffer overrun when an empty string is supplied as an argument to the command-line tool.

Vulnerability Detail

The vulnerability in zstd v1.4.10 allows an attacker to exploit a buffer overrun by providing an empty string as a command-line argument. This can lead to a variety of potential consequences, including remote code execution, denial of service, or information disclosure. The buffer overrun occurs due to insufficient input validation, allowing the attacker to overwrite adjacent memory regions and potentially execute arbitrary code.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can avoid supplying empty strings as command-line arguments to the zstd tool. By ensuring that valid input is provided, the risk of triggering the buffer overrun can be minimized. However, this is not a permanent solution and should be considered a temporary measure until the software is updated.

Conclusion

In conclusion, zstd version 1.4.10 is vulnerable to a buffer overrun when an empty string is supplied as a command-line argument. This vulnerability can have severe consequences, including remote code execution and information disclosure. It is crucial to update zstd to a patched version or apply the recommended workaround until the software is updated. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for zstd →

Share this vulnerability

FAQ

zstd is a compression library and command-line tool used for fast and efficient data compression and decompression.

The vulnerability allows an attacker to trigger a buffer overrun, potentially leading to remote code execution, denial of service, or information disclosure.

To fix this vulnerability, update zstd to a version that includes the necessary patches, preferably the latest version available.

As a temporary workaround, avoid supplying empty strings as command-line arguments to the zstd tool.

For more information about this vulnerability, refer to the official advisory provided by the maintainers of zstd.

Related vulnerabilities

Recent vulnerabilities recorded for zstd.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback