CVE-2026-24001: jsdiff has a Denial of Service vulnerability in parsePatch and applyPatch
jsdiff is a JavaScript text differencing implementation. Prior to versions 8.0.3, 5.2.2, 4.0.4, and 3.5.1, attempting to parse a patch whose filename headers contain the line break characters `\r`, `\u2028`, or `\u2029` can cause the `parsePatch` method to enter an infinite loop. It then consumes memory without limit until the process crashes due to running out of memory. Applications are therefore likely to be vulnerable to a denial-of-service attack if they call `parsePatch` with a user-provided patch as input. A large payload is not needed to trigger the vulnerability, so size limits on user input do not provide any protection. Furthermore, some applications may be vulnerable even when calling `parsePatch` on a patch generated by the application itself if the user is nonetheless able to control the filename headers (e.g. by directly providing the filenames of the files to be diffed). The `applyPatch` method is similarly affected if (and only if) called with a string representation of a patch as an argument, since under the hood it parses that string using `parsePatch`. Other methods of the library are unaffected. Finally, a second and lesser interdependent bug - a ReDOS - also exhibits when those same line break characters are present in a patch's *patch* header (also known as its "leading garbage"). A maliciously-crafted patch header of length *n* can take `parsePatch` O(*n*³) time to parse. Versions 8.0.3, 5.2.2, 4.0.4, and 3.5.1 contain a fix. As a workaround, do not attempt to parse patches that contain any of these characters: `\r`, `\u2028`, or `\u2029`.
Security readout for executives and security teams
Plain-English summary
CVE-2026-24001 lets a small crafted patch crash applications that use jsdiff to parse patch text. The impact is availability only: no data theft or code execution is described. Business urgency is highest where internet-facing services accept patch files, diffs, filenames, or review content from users.
Executive priority
Prioritize remediation for public services that accept diffs, patch files, code review data, or user-supplied filenames. Internal-only tooling with trusted inputs is lower urgency, but still should be upgraded because the trigger is small and input size limits are not protective.
Technical view
jsdiff parsePatch before 8.0.3, 5.2.2, 4.0.4, and 3.5.1 can loop indefinitely when filename headers contain \r, U+2028, or U+2029, exhausting memory. applyPatch is affected only when passed a string patch because it calls parsePatch. A related ReDoS can occur in patch headers with the same characters.
Likely exposure
Likely exposed systems are JavaScript or Node.js applications using jsdiff parsePatch on user-provided patch strings, or applyPatch with string patch input. Applications only using other jsdiff methods are reported unaffected. Exposure can also exist when users control filenames used to generate patches.
Exploitation context
The bundle does not identify active exploitation, and KEV is false. The CVSS vector rates the issue network-reachable, low-complexity, unauthenticated, and no-user-interaction, but only for applications that expose affected parsing paths to attacker-controlled input.
Researcher notes
Key constraints are important: applyPatch is affected only for string patch arguments, and other library methods are stated unaffected. The denial-of-service condition is tied to specific line-break characters in filename headers; the lesser ReDoS involves patch headers. No source in the bundle proves exploitation in the wild.
Mitigation direction
Upgrade jsdiff to 8.0.3, 5.2.2, 4.0.4, or 3.5.1 as applicable.
If immediate upgrade is blocked, reject patches containing \r, U+2028, or U+2029 before parsing.
Avoid passing user-controlled patch strings to parsePatch or applyPatch.
Review vendor and distribution guidance for packaged or transitive jsdiff copies.
Monitor affected services for abnormal memory growth and process crashes.
Validation and detection
Inventory direct and transitive jsdiff versions in package lockfiles and deployed artifacts.
Search code for parsePatch and applyPatch calls that receive strings.
Trace whether patch text or filenames can be influenced by unauthenticated users.
Confirm deployed versions meet the fixed release thresholds.
Check dependency scanners and Red Hat VEX status for environment-specific applicability.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-1333: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-1333 · source CWE mapping
Inefficient Regular Expression Complexity
Inefficient Regular Expression Complexity represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Uncontrolled Resource Consumption represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.