diff@5.2.2 vulnerabilities

A JavaScript text diff implementation.

  • latest version

    8.0.3

  • latest non vulnerable version

  • first published

    14 years ago

  • latest version published

    10 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the diff package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Regular Expression Denial of Service (ReDoS)

    diff is a javascript text differencing implementation.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the parsePatch() and applyPatch() functions if the user input passed without sanitisation. An attacker can cause the process to enter an infinite loop and exhaust system memory by providing a patch with filename headers containing \r, \u2028, or \u2029 characters or having control over patch's patch header for application generated patches.

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade diff to version 4.0.4, 5.2.2, 8.0.3 or higher.

    <4.0.4>=5.0.0 <5.2.2<8.0.3