CVE-2024-21525 node-twain vulnerable to Improper Check or Handling of Exceptional Conditions

High 8.3 Published Updated

A buffer overflow in node-twain allows attackers to cause denial of service or potentially execute code via long input strings.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2024-21525?

CVE-2024-21525 is a high-severity memory corruption vulnerability in node-twain, published on 10 Jul 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

All versions of the package node-twain are vulnerable to Improper Check or Handling of Exceptional Conditions due to the length of the source data not being checked. Creating a new twain.TwainSDK with a productName or productFamily, manufacturer, version.info property of length >= 34 chars leads to a buffer overflow vulnerability.

Weakness: CWE-703

Which versions are affected by CVE-2024-21525?

2 open source packages ship an affected version, including node-twain.

PackageAffectedFixed in
node-twain npmAll versions to 0.0.16None
node-twain npmAll versions to 0.0.16None

How do I fix CVE-2024-21525?

No fix has been published for CVE-2024-21525 yet. Limit exposure of the affected software until one is available.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2024-21525 being exploited?

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

Sources

Also known as GHSA-wxr3-2hgv-qm8f.

Is CVE-2024-21525 in your software?

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

Check your SBOMs for free