CVE-2022-4899 zstd vulnerable to buffer overrun

High 7.5 Published Updated

An attacker can cause a buffer overrun and denial of service by supplying an empty string argument to the zstd command line tool.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-4899?

CVE-2022-4899 is a high-severity denial of service vulnerability in zstd, published on 31 Mar 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-400

Which versions are affected by CVE-2022-4899?

4 open source packages ship an affected version, including zstd and github.com/facebook/zstd. It affects 1 product.

PackageAffectedFixed in
zstd PyPIAll versions1.5.4.0
zstd PyPIAll versions1.5.4.0
github.com/facebook/zstd SwiftURLAll versions1.5.4
github.com/facebook/zstd SwiftURLAll versions1.5.4
Linux distribution packages (9)
zstd SUSE:Linux Enterprise Micro 5.1All versions1.4.4-150000.1.9.1
zstd SUSE:Linux Enterprise Micro 5.2All versions1.4.4-150000.1.9.1
zstd SUSE:Linux Enterprise Micro 5.3All versions1.5.0-150400.3.3.1
zstd SUSE:Linux Enterprise Micro 5.4All versions1.5.0-150400.3.3.1
zstd SUSE:Linux Enterprise Module for Basesystem 15 SP4All versions1.5.0-150400.3.3.1
zstd SUSE:Linux Enterprise Real Time 15 SP3All versions1.4.4-150000.1.9.1
zstd openSUSE:Leap 15.4All versions1.5.0-150400.3.3.1
zstd openSUSE:Leap Micro 5.3All versions1.5.0-150400.3.3.1
zstd openSUSE:TumbleweedAll versions1.5.5-5.1

Products include Facebook Zstandard.

How do I fix CVE-2022-4899?

Upgrade zstd to 1.5.4.0 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2022-4899 being exploited?

There is no known exploitation of CVE-2022-4899 in the wild and no public exploit code.

Sources

Also known as AZL-25813, DEBIAN-CVE-2022-4899, ECHO-9a1d-1b7a-719e, GHSA-5c9c-6x87-f9vm, MGASA-2023-0128, OESA-2023-1213 and 6 more.

Is CVE-2022-4899 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free