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

- Severity: High 8.3 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.55%, higher than 47% of CVEs (2026-12-01)
- Published: 2024-07-10T05:00:03.124Z
- Modified: 2026-06-17T07:09:40.673Z
- Also known as: GHSA-wxr3-2hgv-qm8f
- Weaknesses: CWE-703
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: snyk

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

(As written by CVE List.)

## Affected

- node-twain: before *
- luomusha node-twain: before *
- node-twain (npm): up to 0.0.16

## Every score

- snyk: CVSS:3.1 8.3 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L/E:P`
- GitHub: CVSS:3.1 8.3 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N`

## References

- <https://security.snyk.io/vuln/SNYK-JS-NODETWAIN-6421153> (web)
- <https://gist.github.com/dellalibera/55b87634a6c360e5be22a715f0566c99> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-21525> (advisory)
- <https://github.com/Luomusha/node-twain> (package)

## Sources

- CVE List: [CVE-2024-21525](https://www.cve.org/CVERecord?id=CVE-2024-21525), CVE Terms of Use, modified 2024-08-01
- GitHub Advisory Database: [GHSA-wxr3-2hgv-qm8f](https://github.com/advisories/GHSA-wxr3-2hgv-qm8f), CC-BY-4.0, modified 2024-07-10
- NVD: [CVE-2024-21525](https://nvd.nist.gov/vuln/detail/CVE-2024-21525), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-21525 · Whole record: https://cve.day/CVE-2024-21525.json · Rebuilt by cve.day 2026-11-25T22:58:42.727Z
