Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-24001: CWE-400: Uncontrolled Resource Consumption in kpdecker jsdiff

0
Low
VulnerabilityCVE-2026-24001cvecve-2026-24001cwe-400cwe-1333
Published: Thu Jan 22 2026 (01/22/2026, 02:23:44 UTC)
Source: CVE Database V5
Vendor/Project: kpdecker
Product: jsdiff

Description

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

AI-Powered Analysis

AILast updated: 02/06/2026, 08:34:14 UTC

Technical Analysis

The vulnerability CVE-2026-24001 affects the jsdiff JavaScript library, which is widely used for text differencing operations. The core issue lies in the parsePatch method, which, prior to fixed versions (8.0.3, 5.2.2, 4.0.4, and 3.5.1), fails to properly handle patch files whose filename headers contain certain line break characters: carriage return (\r), line separator (\u2028), or paragraph separator (\u2029). When such characters are present, parsePatch enters an infinite loop, causing uncontrolled resource consumption, specifically memory exhaustion, ultimately crashing the process. This vulnerability can be exploited remotely without authentication or user interaction by submitting a crafted patch file to an application that uses jsdiff's parsePatch method on user input. Notably, the attack does not require large payloads, rendering size-based input restrictions ineffective. Furthermore, the applyPatch method is vulnerable if it parses patch strings internally via parsePatch. A secondary issue is a Regular Expression Denial of Service (ReDoS) vulnerability triggered by the same characters in the patch header, causing parsePatch to consume O(n³) time, severely degrading performance. The vulnerability is classified under CWE-400 (Uncontrolled Resource Consumption) and CWE-1333 (Inefficient Regular Expression Complexity). The maintainers have addressed these issues in the specified patched versions. Until upgrading, a practical workaround is to reject patches containing the problematic characters in filename headers. No known exploits are reported in the wild as of publication.

Potential Impact

For European organizations, the primary impact of CVE-2026-24001 is the risk of denial-of-service attacks against applications that utilize vulnerable versions of jsdiff to parse patches, especially when user input influences patch filenames. Such DoS attacks can disrupt services, degrade application availability, and potentially cause cascading failures in dependent systems. Organizations relying on automated patch processing, code review tools, or collaborative development platforms that incorporate jsdiff are particularly at risk. The low CVSS score reflects limited impact on confidentiality and integrity, but availability can be significantly affected. Given the ease of exploitation without authentication or user interaction, attackers can remotely trigger service outages. This may affect software development firms, managed service providers, and any enterprise integrating jsdiff in their toolchains. The vulnerability's presence in multiple major jsdiff versions suggests a broad potential attack surface. European entities with high dependency on JavaScript-based development tools or CI/CD pipelines should prioritize mitigation to maintain operational continuity.

Mitigation Recommendations

European organizations should immediately upgrade jsdiff to versions 8.0.3, 5.2.2, 4.0.4, or 3.5.1 or later, depending on their current version lineage. If upgrading is not immediately feasible, implement input validation to reject any patch files containing the problematic line break characters (\r, \u2028, \u2029) in filename headers before parsing. Additionally, audit all application components that invoke parsePatch or applyPatch with user-supplied data to ensure they do not process untrusted patches. Employ runtime monitoring to detect abnormal memory consumption or CPU spikes indicative of exploitation attempts. Incorporate fuzz testing and static analysis focused on patch parsing routines to identify similar vulnerabilities. Finally, maintain strict access controls and logging around patch submission interfaces to detect and respond to suspicious activities promptly.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-01-19T18:49:20.658Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 697190914623b1157c0cb7f8

Added to database: 1/22/2026, 2:50:57 AM

Last enriched: 2/6/2026, 8:34:14 AM

Last updated: 2/7/2026, 7:38:06 PM

Views: 128

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats