CVE-2026-31988: Off-by-one Error in thejoshwolfe yauzl
CVE-2026-31988 is an off-by-one vulnerability in version 3. 2. 0 of the yauzl Node. js library, specifically in the NTFS extended timestamp extra field parser within the getLastModDate() function. The flaw arises because the while loop condition allows readUInt16LE() to read beyond the buffer boundary, leading to an ERR_OUT_OF_RANGE exception. A remote attacker can exploit this by sending a crafted zip file with a malformed NTFS extra field, causing a denial of service via process crash. This affects any Node. js application that processes zip uploads and calls entry. getLastModDate() on parsed entries. The issue is fixed in version 3.
AI Analysis
Technical Summary
The vulnerability CVE-2026-31988 exists in the yauzl library version 3.2.0, a popular Node.js module used for unzipping files. The root cause is an off-by-one error in the parsing logic of the NTFS extended timestamp extra field within the getLastModDate() function. Specifically, the while loop condition incorrectly checks if cursor < data.length + 4 instead of ensuring cursor + 4 <= data.length before calling readUInt16LE(). This improper boundary check allows the function to read beyond the allocated buffer, triggering an ERR_OUT_OF_RANGE exception. When a Node.js application processes a maliciously crafted zip file containing a malformed NTFS extra field and invokes entry.getLastModDate(), the process crashes, resulting in a denial of service (DoS). This vulnerability does not require any privileges or user interaction, making it remotely exploitable by simply uploading or processing a malicious zip file. The issue is resolved in yauzl version 3.2.1 by correcting the boundary check to prevent out-of-bounds reads. No known active exploits have been reported, but the vulnerability poses a risk to any Node.js application relying on yauzl 3.2.0 for zip file handling, especially those accepting untrusted zip uploads.
Potential Impact
The primary impact of this vulnerability is a denial of service condition caused by a process crash when handling malicious zip files. Organizations using Node.js applications that rely on yauzl 3.2.0 for processing zip uploads may experience service interruptions, potentially affecting availability of critical services. This can disrupt workflows, degrade user experience, and cause operational downtime. While the vulnerability does not allow code execution or data leakage, repeated exploitation could be used as a vector for targeted disruption or to amplify attacks against web services that accept zip files. Systems exposed to untrusted or user-supplied zip files are at greatest risk. The impact is particularly significant for cloud services, SaaS platforms, and web applications that automate zip file processing without strict input validation or sandboxing. The lack of authentication or user interaction requirements increases the attack surface, enabling remote attackers to trigger the DoS with minimal effort.
Mitigation Recommendations
To mitigate this vulnerability, affected organizations should upgrade the yauzl library to version 3.2.1 or later, where the off-by-one error is fixed. For applications that cannot immediately upgrade, implement input validation to reject zip files containing suspicious or malformed NTFS extra fields before processing. Employ sandboxing or process isolation techniques to limit the impact of potential crashes caused by malformed files. Additionally, monitor application logs for ERR_OUT_OF_RANGE exceptions or unexpected process terminations related to zip file handling. Consider rate limiting or filtering zip file uploads from untrusted sources to reduce exposure. Security teams should also review and update dependency management practices to ensure timely patching of third-party libraries. Finally, educate developers about safe handling of binary file parsing and boundary checks to prevent similar vulnerabilities.
Affected Countries
United States, Germany, United Kingdom, India, China, Japan, South Korea, France, Canada, Australia
CVE-2026-31988: Off-by-one Error in thejoshwolfe yauzl
Description
CVE-2026-31988 is an off-by-one vulnerability in version 3. 2. 0 of the yauzl Node. js library, specifically in the NTFS extended timestamp extra field parser within the getLastModDate() function. The flaw arises because the while loop condition allows readUInt16LE() to read beyond the buffer boundary, leading to an ERR_OUT_OF_RANGE exception. A remote attacker can exploit this by sending a crafted zip file with a malformed NTFS extra field, causing a denial of service via process crash. This affects any Node. js application that processes zip uploads and calls entry. getLastModDate() on parsed entries. The issue is fixed in version 3.
AI-Powered Analysis
Technical Analysis
The vulnerability CVE-2026-31988 exists in the yauzl library version 3.2.0, a popular Node.js module used for unzipping files. The root cause is an off-by-one error in the parsing logic of the NTFS extended timestamp extra field within the getLastModDate() function. Specifically, the while loop condition incorrectly checks if cursor < data.length + 4 instead of ensuring cursor + 4 <= data.length before calling readUInt16LE(). This improper boundary check allows the function to read beyond the allocated buffer, triggering an ERR_OUT_OF_RANGE exception. When a Node.js application processes a maliciously crafted zip file containing a malformed NTFS extra field and invokes entry.getLastModDate(), the process crashes, resulting in a denial of service (DoS). This vulnerability does not require any privileges or user interaction, making it remotely exploitable by simply uploading or processing a malicious zip file. The issue is resolved in yauzl version 3.2.1 by correcting the boundary check to prevent out-of-bounds reads. No known active exploits have been reported, but the vulnerability poses a risk to any Node.js application relying on yauzl 3.2.0 for zip file handling, especially those accepting untrusted zip uploads.
Potential Impact
The primary impact of this vulnerability is a denial of service condition caused by a process crash when handling malicious zip files. Organizations using Node.js applications that rely on yauzl 3.2.0 for processing zip uploads may experience service interruptions, potentially affecting availability of critical services. This can disrupt workflows, degrade user experience, and cause operational downtime. While the vulnerability does not allow code execution or data leakage, repeated exploitation could be used as a vector for targeted disruption or to amplify attacks against web services that accept zip files. Systems exposed to untrusted or user-supplied zip files are at greatest risk. The impact is particularly significant for cloud services, SaaS platforms, and web applications that automate zip file processing without strict input validation or sandboxing. The lack of authentication or user interaction requirements increases the attack surface, enabling remote attackers to trigger the DoS with minimal effort.
Mitigation Recommendations
To mitigate this vulnerability, affected organizations should upgrade the yauzl library to version 3.2.1 or later, where the off-by-one error is fixed. For applications that cannot immediately upgrade, implement input validation to reject zip files containing suspicious or malformed NTFS extra fields before processing. Employ sandboxing or process isolation techniques to limit the impact of potential crashes caused by malformed files. Additionally, monitor application logs for ERR_OUT_OF_RANGE exceptions or unexpected process terminations related to zip file handling. Consider rate limiting or filtering zip file uploads from untrusted sources to reduce exposure. Security teams should also review and update dependency management practices to ensure timely patching of third-party libraries. Finally, educate developers about safe handling of binary file parsing and boundary checks to prevent similar vulnerabilities.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-03-10T19:48:11.109Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69b1f7682f860ef94392e990
Added to database: 3/11/2026, 11:14:48 PM
Last enriched: 3/11/2026, 11:29:26 PM
Last updated: 3/12/2026, 12:15:36 AM
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.