Vulnerability
CVE-2026-24001
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`.
239 advisories report this vulnerability, across 5 ecosystems.
Advisories
- CGA-229x-rpf4-j84f
- CGA-22m2-m379-hrjc
- CGA-2489-7x3g-xprw
- CGA-27fv-5hfw-9hrc
- CGA-27wg-wmm8-853m
- CGA-29mv-gqq4-9j23
- CGA-2ghc-62vc-qxc8
- CGA-2grq-xjh2-36jv
- CGA-2jq9-3q7f-6322
- CGA-2mh2-w82g-ff5c
- CGA-2phm-fcpx-j4x6
- CGA-2qgf-782q-wxhx
- CGA-2r2h-qcgx-r2q5
- CGA-2wm6-m8wr-fwv9
- CGA-325h-m599-c7h8
- CGA-32x6-v4wm-c4q6
- CGA-337j-ph8j-vxxx
- CGA-33v7-82fp-p8p9
- CGA-357f-748r-hc6m
- CGA-35hr-2j7j-mw65
- CGA-3937-xr6c-h8h5
- CGA-3jjv-cccg-fcgr
- CGA-3jq4-435w-593m
- CGA-3p4g-39w4-v6cp
- CGA-3pxh-35hw-jccf
- CGA-4343-m974-rpxf
- CGA-47c6-xgfh-j3rh
- CGA-48hp-8r7x-55w5
- CGA-4cc9-9qmv-5p5v
- CGA-4g67-95wx-fc3g
- CGA-4gwx-q2xj-77p8
- CGA-4hfc-jh8h-9gm2
- CGA-4j52-r466-q4fr
- CGA-4jhf-58m2-8jg8
- CGA-4mp5-c7qw-mg8r
- CGA-4p33-hgp4-rg86
- CGA-4r5j-37jj-2jc4
- CGA-4r75-6h85-pj57
- CGA-4xpr-q5qx-ph2w
- CGA-54mv-jg44-wq9p
- CGA-56jg-rpmm-wr77
- CGA-57wr-r6f5-vfw5
- CGA-58mq-pxf4-2prq
- CGA-5c2r-6hm3-w5cv
- CGA-5jjh-pqq6-qjvm
- CGA-5r57-qm9x-5h27
- CGA-5r6v-fqff-m8p4
- CGA-5w56-6x59-c779
- CGA-5wp3-vfp8-qqjr
- CGA-5wx4-9fh8-jgrq
- CGA-62wg-8wjr-6hgh
- CGA-63vg-pqx4-pp2w
- CGA-66jr-w7xg-qvwm
- CGA-674x-gxmc-2mmr
- CGA-67w7-6fqp-fx5r
- CGA-6fmm-93xg-6xxc
- CGA-6g2p-jfrw-5cmf
- CGA-6gv4-vc8v-23mr
- CGA-6ppr-qm5m-fh8r
- CGA-6r5p-jx88-27m4
- CGA-6x2p-r64v-8p9m
- CGA-6x4w-pmpv-38xv
- CGA-72vr-qx6q-68hm
- CGA-7636-9jfr-264c
- CGA-775h-j99j-7533
- CGA-77p4-3rgx-xg34
- CGA-78vm-g277-j64w
- CGA-7f4c-pp87-mq3j
- CGA-7fmm-g423-xw6v
- CGA-7jmh-r6r4-vv84
- CGA-7jqm-7583-pxx9
- CGA-7m5f-r9j6-fjvg
- CGA-7q3g-f7q7-7w5p
- CGA-7qrj-j66r-w638
- CGA-7vx5-w3v5-vh3x
- CGA-7w23-5mh9-3j9v
- CGA-7w57-m7j3-7p56
- CGA-7wh3-p7vj-h8wr
- CGA-7ww4-87ch-f783
- CGA-85j9-7rr2-q484
- CGA-86gw-748p-cg6f
- CGA-876g-9vfg-r6pj
- CGA-89c3-8wpm-h7gw
- CGA-8mf9-478m-rw79
- CGA-8q4p-j92p-5438
- CGA-8rfr-h2vm-r48w
- CGA-8wqc-7j8x-qjh6
- CGA-8x59-vchx-vfwm
- CGA-8x69-mrwv-j33g
- CGA-94p8-f44g-v8fm
- CGA-95j7-g5rw-gg38
- CGA-996x-pm6m-pr2m
- CGA-9c2m-p2fw-rggv
- CGA-9g3j-24mg-vm94
- CGA-9h69-qpgw-jcqv
- CGA-9jfv-mcmj-m9p4
- CGA-9jpf-r6cq-hhg3
- CGA-9jr8-p479-g32j
- CGA-9m5q-3q9h-9vrr
- CGA-9qjw-c86m-87xj
Showing the first 100. The API lists them all: /api/v1/vulnerabilities/CVE-2026-24001.
References
- https://github.com/kpdecker/jsdiff/commit/15a1585230748c8ae6f8274c202e0c87309142f5
- https://github.com/kpdecker/jsdiff/issues/653
- https://github.com/kpdecker/jsdiff/pull/649
- https://github.com/kpdecker/jsdiff/security/advisories/GHSA-73rr-hh4g-fpgx
- https://access.redhat.com/security/cve/CVE-2026-24001
- https://bugzilla.redhat.com/show_bug.cgi?id=2431930
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-24001.json