CVE-2024-34075 kurwov vulnerable to Denial of Service due to improper data sanitization

Medium 6.2 Published Updated

Attackers can cause denial of service in kurwov by injecting specific substrings into datasets, preventing proper generation.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-34075?

CVE-2024-34075 is a medium-severity denial of service vulnerability in xiboon kurwov, published on 3 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

kurwov is a fast, dependency-free library for creating Markov Chains. An unsafe sanitization of dataset contents on the `MarkovData#getNext` method used in `Markov#generate` and `Markov#choose` allows a maliciously crafted string on the dataset to throw and stop the function from running properly. If a string contains a forbidden substring (i.e. `__proto__`) followed by a space character, the code will access a special property in `MarkovData#finalData` by removing the last character of the string, bypassing the dataset sanitization (as it is supposed to be already sanitized before this function is called). Any dataset can be contaminated with the substring making it unable to properly generate anything in some cases. This issue has been addressed in version 3.2.5 and all users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-502

Which versions are affected by CVE-2024-34075?

2 open source packages ship an affected version, including kurwov.

PackageAffectedFixed in
kurwov npmFrom 3.1.03.2.5
kurwov npmFrom 3.1.03.2.5

How do I fix CVE-2024-34075?

Upgrade kurwov to 3.2.5 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-2024-34075 being exploited?

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

Sources

Also known as GHSA-hfrv-h3q8-9jpr.

Is CVE-2024-34075 in your software?

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

Check your SBOMs for free