Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. shescape
  4. ›
  5. CVE-2022-25918

CVE-2022-25918: Inefficient Regular Expression Complexity

October 27, 2022 (updated August 8, 2023)

The package shescape from 1.5.10 and before 1.6.1 is vulnerable to Regular Expression Denial of Service (ReDoS) via the escape function in index.js, due to the usage of insecure regex in the escapeArgBash function.

References

  • github.com/advisories/GHSA-cr84-xvw4-qx3c
  • github.com/ericcornelissen/shescape/blob/main/src/unix.js%23L52
  • github.com/ericcornelissen/shescape/commit/552e8eab56861720b1d4e5474fb65741643358f9
  • github.com/ericcornelissen/shescape/releases/tag/v1.6.1
  • github.com/ericcornelissen/shescape/security/advisories/GHSA-cr84-xvw4-qx3c
  • nvd.nist.gov/vuln/detail/CVE-2022-25918
  • security.snyk.io/vuln/SNYK-JS-SHESCAPE-3061108

Code Behaviors & Features

Detect and mitigate CVE-2022-25918 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

Version 1.5.10, version 1.6.0

Fixed versions

  • 1.6.1

Solution

Upgrade to version 1.6.1 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-1333: Inefficient Regular Expression Complexity

Source file

npm/shescape/CVE-2022-25918.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:34 +0000.