Skip to content
Heist/ feed
Back to feed
High

node-diff — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-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 at

Products
node-diff
Affected versions
1.4.0~dfsg-1, 1.4.0~dfsg-2, 1.4.0~dfsg-3, 4.0.2~dfsg-2, 5.0.0~dfsg+~5.0.1-1, 5.0.0~dfsg+~5.0.1-2, 5.0.0~dfsg+~5.0.1-3, 5.0.0~dfsg+~5.0.1-4, 5.0.0~dfsg+~5.0.1-5, 5.0.0~dfsg+~5.0.1-6, 8.0.3~dfsg-4, 8.0.4~dfsg-1, 8.0.4~dfsg-2
Fixed versions
Not specified
CVEs
CVE-2026-24001
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 02:58 UTC · Revision 1

Source evidence

UBUNTU-CVE-2026-24001

core-osv · Original source

Published 22 Jan 2026, 03:15 UTC

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 at

osv:UBUNTU-CVE-2026-24001

node-diff

Fixed versions: Not specified

node-diff

Fixed versions: Not specified

node-diff

Fixed versions: Not specified

node-diff

Fixed versions: Not specified

node-diff

Fixed versions: Not specified

node-diff

Fixed versions: Not specified

node-diff

Fixed versions: Not specified

node-diff

Fixed versions: Not specified

Complete source record
{
  "id": "00a0ab1511886df5737385503d854215a6e9a0f083bdf0bcc41c25798eceea30",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-24001",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2026-24001",
    "summary": "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 at",
    "evidence": "osv:UBUNTU-CVE-2026-24001",
    "products": [
      {
        "name": {
          "value": "node-diff",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.4.0~dfsg-1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "node-diff",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.4.0~dfsg-1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "node-diff",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.4.0~dfsg-2",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.4.0~dfsg-3",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "node-diff",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.0.2~dfsg-2",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "5.0.0~dfsg+~5.0.1-1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "5.0.0~dfsg+~5.0.1-2",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "5.0.0~dfsg+~5.0.1-3",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "node-diff",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "5.0.0~dfsg+~5.0.1-4",
            "evidence": "/affected/4/versions"
          }
        ]
      },
      {
        "name": {
          "value": "node-diff",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "5.0.0~dfsg+~5.0.1-4",
            "evidence": "/affected/5/versions"
          }
        ]
      },
      {
        "name": {
          "value": "node-diff",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "5.0.0~dfsg+~5.0.1-6",
            "evidence": "/affected/6/versions"
          },
          {
            "value": "8.0.3~dfsg-4",
            "evidence": "/affected/6/versions"
          },
          {
            "value": "8.0.4~dfsg-1",
            "evidence": "/affected/6/versions"
          },
          {
            "value": "8.0.4~dfsg-2",
            "evidence": "/affected/6/versions"
          }
        ]
      },
      {
        "name": {
          "value": "node-diff",
          "evidence": "/affected/7/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "5.0.0~dfsg+~5.0.1-4",
            "evidence": "/affected/7/versions"
          },
          {
            "value": "5.0.0~dfsg+~5.0.1-5",
            "evidence": "/affected/7/versions"
          },
          {
            "value": "5.0.0~dfsg+~5.0.1-6",
            "evidence": "/affected/7/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "UBUNTU-CVE-2026-24001",
      "aliases": [
        "UBUNTU-CVE-2026-24001"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        },
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        },
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "node-diff",
            "purl": "pkg:deb/ubuntu/node-diff?arch=source&distro=xenial",
            "ecosystem": "Ubuntu:16.04:LTS"
          },
          "versions": [
            "1.4.0~dfsg-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-24001.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "node-diff",
                "binary_version": "1.4.0~dfsg-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "node-diff",
            "purl": "pkg:deb/ubuntu/node-diff?arch=source&distro=bionic",
            "ecosystem": "Ubuntu:18.04:LTS"
          },
          "versions": [
            "1.4.0~dfsg-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-24001.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "node-diff",
                "binary_version": "1.4.0~dfsg-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "node-diff",
            "purl": "pkg:deb/ubuntu/node-diff?arch=source&distro=focal",
            "ecosystem": "Ubuntu:20.04:LTS"
          },
          "versions": [
            "1.4.0~dfsg-2",
            "1.4.0~dfsg-3"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-24001.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "node-diff",
                "binary_version": "1.4.0~dfsg-3"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "node-diff",
            "purl": "pkg:deb/ubuntu/node-diff?arch=source&distro=jammy",
            "ecosystem": "Ubuntu:22.04:LTS"
          },
          "versions": [
            "4.0.2~dfsg-2",
            "5.0.0~dfsg+~5.0.1-1",
            "5.0.0~dfsg+~5.0.1-2",
            "5.0.0~dfsg+~5.0.1-3"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-24001.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "node-diff",
                "binary_version": "5.0.0~dfsg+~5.0.1-3"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "node-diff",
            "purl": "pkg:deb/ubuntu/node-diff?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "5.0.0~dfsg+~5.0.1-4"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-24001.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "node-diff",
                "binary_version": "5.0.0~dfsg+~5.0.1-4"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "node-diff",
            "purl": "pkg:deb/ubuntu/node-diff?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "5.0.0~dfsg+~5.0.1-4"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-24001.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "node-diff",
                "binary_version": "5.0.0~dfsg+~5.0.1-4"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "node-diff",
            "purl": "pkg:deb/ubuntu/node-diff?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "5.0.0~dfsg+~5.0.1-6",
            "8.0.3~dfsg-4",
            "8.0.4~dfsg-1",
            "8.0.4~dfsg-2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-24001.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "node-diff",
                "binary_version": "8.0.4~dfsg-2"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "node-diff",
            "purl": "pkg:deb/ubuntu/node-diff?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "5.0.0~dfsg+~5.0.1-4",
            "5.0.0~dfsg+~5.0.1-5",
            "5.0.0~dfsg+~5.0.1-6"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-24001.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "node-diff",
                "binary_version": "5.0.0~dfsg+~5.0.1-6"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:59:56.204831784Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-24001"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2026-24001",
        "https://www.cve.org/CVERecord?id=CVE-2026-24001",
        "https://github.com/kpdecker/jsdiff/security/advisories/GHSA-73rr-hh4g-fpgx",
        "https://github.com/kpdecker/jsdiff/issues/653",
        "https://github.com/kpdecker/jsdiff/pull/649",
        "https://github.com/kpdecker/jsdiff/commit/15a1585230748c8ae6f8274c202e0c87309142f5"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-24001",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/1/score"
  },
  "source_id": "core-osv",
  "document_id": 359996,
  "published_at": "2026-01-22T03:15:00+00:00"
}