
Cloud Vulnerability DB
A community-led vulnerabilities database
All versions of the package node-twain are vulnerable to Improper Check or Handling of Exceptional Conditions (CVE-2024-21525). The vulnerability was discovered and disclosed on February 20, 2024, and published on July 9, 2024. The issue affects the node-twain package, which is a TWAIN library for NodeJS (Snyk).
The vulnerability stems from improper validation of input length where the length of the source data is not checked. Specifically, when creating a new twain.TwainSDK instance with properties such as productName, productFamily, manufacturer, or version.info that have a length greater than or equal to 34 characters, it leads to a buffer overflow vulnerability. The char *dest in strcpy has a fixed length of 34, but there is no validation of the source data length (GitHub POC). The vulnerability has been assigned a CVSS v3.1 base score of 8.3 (High) with the vector string: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L (Snyk).
The vulnerability can result in a buffer overflow, which could lead to a total loss of confidentiality and integrity of the affected system. The impact includes potential unauthorized access to restricted information and the ability to modify protected files. Additionally, there may be partial interruptions in resource availability, though complete denial of service is not possible (Snyk).
Currently, there is no fixed version available for the node-twain package (Snyk). Users should consider implementing input validation at the application level or exploring alternative TWAIN libraries until a patch is released.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."