CVE-2021-39176 Missing Release of Memory after Effective Lifetime in detect-character-encoding

High 7.5 Published Updated

Attackers can cause denial of service by exhausting memory through repeated calls to the detect-character-encoding library.

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

What is CVE-2021-39176?

CVE-2021-39176 is a high-severity denial of service vulnerability in sonicdoe detect-character-encoding, published on 31 Aug 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

detect-character-encoding is a package for detecting character encoding using ICU. In detect-character-encoding v0.3.0 and earlier, allocated memory is not released. The problem has been patched in detect-character-encoding v0.3.1.

Weakness: CWE-401

Which versions are affected by CVE-2021-39176?

2 open source packages ship an affected version, including detect-character-encoding. It affects 1 product.

PackageAffectedFixed in
detect-character-encoding npmAll versions0.3.1
detect-character-encoding npmAll versions0.3.1

Products include Detect-Character-Encoding Project Detect-Character-Encoding.

How do I fix CVE-2021-39176?

Upgrade detect-character-encoding to 0.3.1 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-2021-39176 being exploited?

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

Sources

Also known as GHSA-5rwj-j5m3-3chj.

Is CVE-2021-39176 in your software?

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

Check your SBOMs for free