CVE-2023-37475 Attacker-controlled parameter can cause denial of service in hamba avro

High 7.5 Published Updated

A crafted string in the hamba/avro Go library can cause an unrecoverable out-of-memory error, leading to application denial of service.

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

What is CVE-2023-37475?

CVE-2023-37475 is a high-severity denial of service vulnerability in hamba avro, published on 17 Jul 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Hamba avro is a go lang encoder/decoder implementation of the avro codec specification. In affected versions a well-crafted string passed to avro's `github.com/hamba/avro/v2.Unmarshal()` can throw a `fatal error: runtime: out of memory` which is unrecoverable and can cause denial of service of the consumer of avro. The root cause of the issue is that avro uses part of the input to `Unmarshal()` to determine the size when creating a new slice and hence an attacker may consume arbitrary amounts of memory which in turn may cause the application to crash. This issue has been addressed in commit `b4a402f4` which has been included in release version `2.13.0`. Users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-400

Which versions are affected by CVE-2023-37475?

6 open source packages ship an affected version, including github.com/hamba/avro and github.com/hamba/avro/v2. It affects 1 product.

PackageAffectedFixed in
github.com/hamba/avro GoAll versionsNone
github.com/hamba/avro GoAll versions2.13.0
github.com/hamba/avro GoAll versions2.13.0
github.com/hamba/avro/v2 GoAll versions2.13.0
github.com/hamba/avro/v2 GoAll versions2.13.0
github.com/hamba/avro/v2 GoAll versions2.13.0

Products include Avro Project Avro.

How do I fix CVE-2023-37475?

Upgrade github.com/hamba/avro to 2.13.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-2023-37475 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-37475 exists.

Sources

Also known as GHSA-9x44-9pgq-cf45, GO-2023-1930.

Is CVE-2023-37475 in your software?

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

Check your SBOMs for free