@babel/helpers@8.0.0-alpha.16 vulnerabilities

Collection of helper functions used by Babel transforms.

  • latest version

    7.26.10

  • latest non vulnerable version

  • first published

    7 years ago

  • latest version published

    1 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the @babel/helpers package. This does not include vulnerabilities belonging to this package’s dependencies.

    How to fix?

    Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.

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

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) in the replace() method in wrapRegExp.js. An attacker can cause degradation in performance by supplying input strings that exploit the quadratic complexity of the replacement algorithm.

    This is only exploitable when all of the following conditions are met:

    1. The code passes untrusted strings in the second argument to .replace().

    2. The compiled regular expressions being applied contain named capture groups.

    In the case of @babel/preset-env, if the targets option is in use the application will be vulnerable under either of the following conditions:

    1. A browser older than Chrome 64, Opera 71, Edge 79, Firefox 78, Safari 11.1, or Node.js 10 is used when processing named capture groups.

    2. A browser older than Chrome/Edge 126, Opera 112, Firefox 129, Safari 17.4, or Node.js 23 is used when processing duplicated named capture groups.

    Note: The project maintainers advise that "just updating your Babel dependencies is not enough: you will also need to re-compile your code."

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

    Upgrade @babel/helpers to version 7.26.10, 8.0.0-alpha.17 or higher.

    <7.26.10>=8.0.0-alpha.0 <8.0.0-alpha.17