CVE-2026-31988
Description
yauzl (aka Yet Another Unzip Library) version 3.2.0 for Node.js contains an off-by-one error in the NTFS extended timestamp extra field parser within the getLastModDate() function. The while loop condition checks cursor < data.length + 4 instead of cursor + 4 <= data.length, allowing readUInt16LE() to read past the buffer boundary. A remote attacker can cause a denial of service (process crash via ERR_OUT_OF_RANGE exception) by sending a crafted zip file with a malformed NTFS extra field. This affects any Node.js application that processes zip file uploads and calls entry.getLastModDate() on parsed entries. Fixed in version 3.2.1.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
yauzlnpm | >= 3.2.0, < 3.2.1 | 3.2.1 |
Affected products
1- Package: https://npmjs.com/package/yauzl
Patches
13 files changed · +5 −3
package.json+1 −1 modified@@ -1,6 +1,6 @@ { "name": "yauzl", - "version": "3.2.0", + "version": "3.2.1", "description": "yet another unzip library for node", "engines": { "node": ">=12"
package-lock.json+2 −2 modified@@ -1,12 +1,12 @@ { "name": "yauzl", - "version": "3.2.0", + "version": "3.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yauzl", - "version": "3.2.0", + "version": "3.2.1", "license": "MIT", "dependencies": { "buffer-crc32": "~0.2.3",
README.md+2 −0 modified@@ -782,6 +782,8 @@ The zip file specification has several ambiguities inherent in its design. Yikes ## Change History + * 3.2.1 + * Fix crash when reading certain corrupted NTFS timestamp extra fields. Thanks to CodeAnt AI Code Reviewer ( https://www.codeant.ai/ai-code-review ) for finding the bug. * 3.2.0 * Added support for reading third-party extensions for timestamps: Info-ZIP "universal timestamp" extra field and NTFS extra field. [pull #160](https://github.com/thejoshwolfe/yauzl/pull/160) * `entry.getLastModDate()` takes options `forceDosFormat` to revert the above change, and `timezone` to allow UTC interpretation of DOS timestamps.
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- github.com/advisories/GHSA-gmq8-994r-jv83ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-31988ghsaADVISORY
- github.com/thejoshwolfe/yauzl/commit/c4695215b05c6adffda613b9051a2a85429b33fenvdWEB
- www.codeant.ai/security-research/yauzl-denial-of-service-zip-file-crashnvdWEB
- www.npmjs.com/package/yauzlnvdWEB
- www.vulncheck.com/advisories/yauzl-denial-of-service-via-off-by-one-error-in-ntfs-timestamp-parsernvdWEB
News mentions
0No linked articles in our index yet.