Every CVE Search/ Get API key

CVE-2026-24001

jsdiff has a Denial of Service vulnerability in parsePatch and applyPatch

2.7 LowFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
Low

Exploit likelihood

0.62%Up 0.6 points since Jan 22, 2026
90%50%10%1%

What each source reports

CVE List Score used 2.7

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.

Record
CVE-2026-24001
CVSS 4.0
2.7 LowCVSS: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 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400, CWE-1333, CWE-400
Updated
2026-11-02
EUVDEUVD-2026-2424 2.7

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.

Record
EUVD-2026-2424
CVSS 4.0
2.7 LowCVSS: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
Updated
2026-11-02
GitHub AdvisoriesGHSA-73rr-hh4g-fpgx 2.7

jsdiff has a Denial of Service vulnerability in parsePatch and applyPatch

Impact

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 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.

Patches

All vulnerabilities described are fixed in v8.0.3.

Workarounds

If using a version of jsdiff earlier than v8.0.3, do not attempt to parse patches that contain any of these characters: \r, \u2028, or \u2029.

References

PR that fixed the bug: https://github.com/kpdecker/jsdiff/pull/649

CVE Notes

Note that although the advisory describes two bugs, they each enable exactly the same attack vector (that an attacker who controls input to parsePatch can cause a DOS). Fixing one bug without fixing the other therefore does not fix the vulnerability and does not provide any security benefit. Therefore we assume that the bugs cannot possibly constitute Independently Fixable Vulnerabilities in the sense of CVE CNA rule 4.2.11, but rather that this advisory is properly construed under the rules as describing a single Vulnerability.

Record
GHSA-73rr-hh4g-fpgx
CVSS 4.0
2.7 LowCVSS: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
Weakness
CWE-400, CWE-1333
Updated
2026-11-02
GitHub AdvisoriesGHSA-h6ch-v84p-w6p9 No score

Regular Expression Denial of Service (ReDoS)

A vulnerability was found in diff before v3.5.0, the affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) attacks.

Record
GHSA-h6ch-v84p-w6p9
Weakness
CWE-400
Updated
2026-11-02
NVD 2.7

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.

Record
CVE-2026-24001
CVSS 4.0
2.7 LowCVSS: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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400, CWE-1333
Updated
2026-11-02
OSV 2.7

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.

Record
CVE-2026-24001
CVSS 4.0
2.7 LowCVSS: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
Weakness
CWE-1333, CWE-400
Updated
2026-11-07
Show 11 moreShow less
OSVDEBIAN-CVE-2026-24001 7.5

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.

Record
DEBIAN-CVE-2026-24001
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVGHSA-73rr-hh4g-fpgx 2.7

jsdiff has a Denial of Service vulnerability in parsePatch and applyPatch

Impact

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 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.

Patches

All vulnerabilities described are fixed in v8.0.3.

Workarounds

If using a version of jsdiff earlier than v8.0.3, do not attempt to parse patches that contain any of these characters: \r, \u2028, or \u2029.

References

PR that fixed the bug: https://github.com/kpdecker/jsdiff/pull/649

CVE Notes

Note that although the advisory describes two bugs, they each enable exactly the same attack vector (that an attacker who controls input to parsePatch can cause a DOS). Fixing one bug without fixing the other therefore does not fix the vulnerability and does not provide any security benefit. Therefore we assume that the bugs cannot possibly constitute Independently Fixable Vulnerabilities in the sense of CVE CNA rule 4.2.11, but rather that this advisory is properly construed under the rules as describing a single Vulnerability.

Record
GHSA-73rr-hh4g-fpgx
CVSS 4.0
2.7 LowCVSS: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
Weakness
CWE-1333, CWE-400
Updated
2026-11-02
OSVROOT-APP-NPM-CVE-2026-24001 7.5

CVE-2026-24001 in @rootio/diff - Patched by Root

Root has patched CVE-2026-24001 in the @rootio/diff package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-CVE-2026-24001
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2026-24001 2.7

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.

Record
UBUNTU-CVE-2026-24001
CVSS 4.0
2.7 LowCVSS: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 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVCLSA-2026-1773188145 No score

TuxCare security update for diff (2 CVEs)

TuxCare rebuilt diff to address 2 CVEs. Fixed in 1.4.0-tuxcare.1.

Record
CLSA-2026-1773188145
Updated
2026-11-02
OSVCLSA-2026-1774225207 No score

TuxCare security update for diff (1 CVE)

TuxCare rebuilt diff to address 1 CVE. Fixed in 7.0.0-tuxcare.1.

Record
CLSA-2026-1774225207
Updated
2026-11-02
OSVCLSA-2026-1780361390 No score

TuxCare security update for diff (1 CVE)

TuxCare rebuilt diff to address 1 CVE. Fixed in 5.0.0-tuxcare.1.

Record
CLSA-2026-1780361390
Updated
2026-11-02
OSVCLSA-2026-1780361406 No score

TuxCare security update for diff (1 CVE)

TuxCare rebuilt diff to address 1 CVE. Fixed in 4.0.2-tuxcare.1.

Record
CLSA-2026-1780361406
Updated
2026-11-02
OSVCLSA-2026-1780447848 No score

TuxCare security update for diff (1 CVE)

TuxCare rebuilt diff to address 1 CVE. Fixed in 3.5.0-tuxcare.1.

Record
CLSA-2026-1780447848
Updated
2026-11-02
OSVGHSA-h6ch-v84p-w6p9 No score

Regular Expression Denial of Service (ReDoS)

A vulnerability was found in diff before v3.5.0, the affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) attacks.

Record
GHSA-h6ch-v84p-w6p9
Weakness
CWE-400
Updated
2026-11-02
OSVROOT-APP-NPM-GHSA-h6ch-v84p-w6p9 No score

GHSA-h6ch-v84p-w6p9 in @rootio/diff - Patched by Root

Root has patched GHSA-h6ch-v84p-w6p9 in the @rootio/diff package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-GHSA-h6ch-v84p-w6p9
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
diff
npm
6.0.0 up to 8.0.3
8.0.3
diff
npm
5.0.0 up to 5.2.2
5.2.2
diff
npm
4.0.0 up to 4.0.4
4.0.4
diff
npm
before 3.5.1
3.5.1
diff
npm
before 3.5.0
3.5.0
diff
TuxCare:npm
1.4.0-tuxcare.0 up to 1.4.0-tuxcare.1, plus listed versions
1.4.0
1.4.0-tuxcare.1
diff
TuxCare:npm
7.0.0-tuxcare.0 up to 7.0.0-tuxcare.1, plus listed versions
7.0.0
7.0.0-tuxcare.1
diff
TuxCare:npm
5.0.0-tuxcare.0 up to 5.0.0-tuxcare.1, plus listed versions
5.0.0
5.0.0-tuxcare.1
diff
TuxCare:npm
4.0.2-tuxcare.0 up to 4.0.2-tuxcare.1, plus listed versions
4.0.2
4.0.2-tuxcare.1
diff
TuxCare:npm
3.5.0-tuxcare.0 up to 3.5.0-tuxcare.1, plus listed versions
3.5.0
3.5.0-tuxcare.1
Show 15 moreShow less
Affected packages
PackageAffectedFixed
node-diff
Debian:12
All versions, plus listed versions
5.0.0~dfsg+~5.0.1-45.0.0~dfsg+~5.0.1-55.0.0~dfsg+~5.0.1-65.2.2~dfsg+~5.2.3-15.2.2~dfsg+~5.2.3-2
Show 7 moreShow less
8.0.3~dfsg-18.0.3~dfsg-28.0.3~dfsg-38.0.3~dfsg-48.0.4~dfsg-18.0.4~dfsg-28.0.4~dfsg-3
None known
node-diff
Debian:13
All versions, plus listed versions
5.0.0~dfsg+~5.0.1-45.0.0~dfsg+~5.0.1-55.0.0~dfsg+~5.0.1-65.2.2~dfsg+~5.2.3-15.2.2~dfsg+~5.2.3-2
Show 7 moreShow less
8.0.3~dfsg-18.0.3~dfsg-28.0.3~dfsg-38.0.3~dfsg-48.0.4~dfsg-18.0.4~dfsg-28.0.4~dfsg-3
None known
node-diff
Debian:14
before 5.2.2~dfsg+~5.2.3-1, plus listed versions
5.0.0~dfsg+~5.0.1-45.0.0~dfsg+~5.0.1-55.0.0~dfsg+~5.0.1-6
5.2.2~dfsg+~5.2.3-1
@rootio/diff
Root:npm
before 4.0.2-root.io.1
4.0.2-root.io.17.0.0-root.io.18.0.2-root.io.15.2.0-root.io.15.1.0-root.io.17.0.0-root.io.25.2.0-root.io.24.0.2-root.io.25.1.0-root.io.28.0.2-root.io.23.5.0-root.io.1
diff
Root:npm
before 7.0.0-aikido.2
7.0.0-aikido.25.2.0-aikido.24.0.2-aikido.25.1.0-aikido.28.0.2-aikido.23.5.0-aikido.1
@rootio/diff
Root:npm
before 3.5.0-root.io.1
3.5.0-root.io.1
diff
Root:npm
before 3.5.0-aikido.1
3.5.0-aikido.1
node-diff
Ubuntu:16.04:LTS
All versions, plus listed versions
1.4.0~dfsg-1
None known
node-diff
Ubuntu:18.04:LTS
All versions, plus listed versions
1.4.0~dfsg-1
None known
node-diff
Ubuntu:20.04:LTS
All versions, plus listed versions
1.4.0~dfsg-21.4.0~dfsg-3
None known
node-diff
Ubuntu:22.04:LTS
All versions, plus listed versions
4.0.2~dfsg-25.0.0~dfsg+~5.0.1-15.0.0~dfsg+~5.0.1-25.0.0~dfsg+~5.0.1-3
None known
node-diff
Ubuntu:24.04:LTS
All versions, plus listed versions
5.0.0~dfsg+~5.0.1-4
None known
node-diff
Ubuntu:25.10
All versions, plus listed versions
5.0.0~dfsg+~5.0.1-4
None known
node-diff
Ubuntu:26.10
All versions, plus listed versions
5.0.0~dfsg+~5.0.1-68.0.3~dfsg-48.0.4~dfsg-18.0.4~dfsg-2
None known
node-diff
Ubuntu:26.04:LTS
All versions, plus listed versions
5.0.0~dfsg+~5.0.1-45.0.0~dfsg+~5.0.1-55.0.0~dfsg+~5.0.1-6
None known

History

History
RecordedChangedSources
factsOSV
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-24001 is a low vulnerability (CVSS 2.7) in Kpdecker Jsdiff, published June 13, 2019. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.62%, the 49th percentile. Fixed in diff 8.0.3.

References

Show 14 moreShow less
MoveEnter Open