cve.bz

CVE-2026-24001 kpdecker jsdiff: Uncontrolled Resource Consumption

2.7 lowEPSS 0.6%Fix available

Low (2.7) in kpdecker jsdiff. EPSS 0.6% estimated probability of exploitation activity in the next 30 days. Fixed in diff 3.5.1, 4.0.4, 5.2.2.

On this page
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`.

Severity

CVSS 4.0

2.7 low
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
0.6% (unchanged from 0.6% a week ago; 0.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 50th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: partial, assessed 2026-01-22. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-400 Uncontrolled Resource Consumption
CWE-1333 Inefficient Regular Expression Complexity
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-24001 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-24001?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-24001?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-24001 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
kpdecker:jsdiffbefore 3.5.1
kpdecker:jsdifffrom 4.0.0 before 4.0.4
kpdecker:jsdifffrom 5.0.0 before 5.2.2
kpdecker:jsdifffrom 6.0.0 before 8.0.3

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-73rr-hh4g-fpgxnpmdiff>=6.0.0 <8.0.38.0.3
GHSA-73rr-hh4g-fpgxnpmdiff>=5.0.0 <5.2.25.2.2
GHSA-73rr-hh4g-fpgxnpmdiff>=4.0.0 <4.0.44.0.4
GHSA-73rr-hh4g-fpgxnpmdiff<3.5.13.5.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13node-diffno fix listedDEBIAN-CVE-2026-24001
Debian14node-diff5.2.2~dfsg+~5.2.3-1DEBIAN-CVE-2026-24001
Ubuntu16.04:LTS, 18.04:LTS, 20.04:LTS and 5 morenode-diffno fix listedUBUNTU-CVE-2026-24001

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Important.

Red Hat's statement

Applications using the parsePatch and the applyPatch methods to process patches provided by user input are vulnerable to this issue. Specifically, specially crafted patch input with line break characters such as \r, \u2028, or \u2029 can cause an infinite loop, excessive resource consumption and application crashes. This issue can occur even with small payloads or when users control filename headers, allowing a remote attacker to cause a denial of service. Due to this reason, this vulnerability has been rated with an important severity.

Red Hat's mitigation

To mitigate this flaw, applications parsing user-supplied patch data should implement input validation to detect and reject input containing line break characters, such as \r, \u2028, or \u2029 before passing the input to the parsePatch and the applyPatch methods, preventing the library from entering an infinite loop and consuming excessive memory.

ProductPackageStateAdvisory
Red Hat Satellite 6nodejs-diffAffected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-24001.

Attack patterns (CAPEC)

  • CAPEC-492 Regular Expression Exponential Blowup
  • CAPEC-147 XML Ping of the Death Likelihood: Low · Severity: Medium
  • CAPEC-227 Sustained Client Engagement

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON