{"id":"CVE-2022-25918","published":"2022-10-27T05:05:09Z","modified":"2025-05-05T18:24:44Z","title":"Regular Expression Denial of Service (ReDoS)","vendor":null,"product":null,"tier":"tail","description":{"text":"The package shescape from 1.5.10 and before 1.6.1 are 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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01629,"percentile":0.76809,"provenance":"source"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-JS-SHESCAPE-3061108","tags":[]},{"url":"https://github.com/ericcornelissen/shescape/blob/main/src/unix.js%23L52","tags":[]},{"url":"https://github.com/ericcornelissen/shescape/commit/552e8eab56861720b1d4e5474fb65741643358f9","tags":[]},{"url":"https://github.com/ericcornelissen/shescape/releases/tag/v1.6.1","tags":[]}],"priority":{"score":19.1,"factors":[{"name":"EPSS percentile","points":15.36},{"name":"CVSS severity","points":3.71}]},"affectedVersions":[{"vendor":"n/a","product":"shescape","versions":[">= 1.5.10, < unspecified",">= unspecified, < 1.6.1"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2025-05-05T18:24:01.864881Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"shescape","vulnerableRanges":[">=1.5.10, <1.6.1"],"patched":["1.6.1"],"from":["GHSA-cr84-xvw4-qx3c"],"provenance":"source"}],"summary":{"text":"The shescape npm package, versions from 1.5.10 up to but not including 1.6.1, contains a Regular Expression Denial of Service flaw in the escape function in index.js, caused by an insecure regular expression in its escapeArgBash routine. An attacker with network access can send crafted input to a service that uses the escape function, requiring no authentication or user interaction, to cause excessive processing time and degrade availability.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:34:41Z"},"euvd":{"id":"EUVD-2022-7081","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-ericcornelissen-shescape-cve-2021-21384","parents":[{"from":"CVE-2021-21384","to":"CVE-2022-25918","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/unix.js"],"commits":["https://github.com/ericcornelissen/shescape/commit/07a069a66423809cbedd61d980c11ca44a29ea2b","https://github.com/ericcornelissen/shescape/commit/552e8eab56861720b1d4e5474fb65741643358f9"],"basis":"rarely changed file"}]},{"from":"CVE-2022-31179","to":"CVE-2022-25918","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/unix.js"],"commits":["https://github.com/ericcornelissen/shescape/commit/552e8eab56861720b1d4e5474fb65741643358f9","https://github.com/ericcornelissen/shescape/commit/aceea7358f7222984e21260381ebc5ec4543b76f"],"basis":"shared function","functions":["escapeArgBash"]}]}],"packageHistory":[{"cve":"CVE-2022-24725","published":"2022-03-03","fixed":"1.5.1","kev":false},{"cve":"CVE-2022-31179","published":"2022-08-01","fixed":"1.5.8","kev":false},{"cve":"CVE-2022-31180","published":"2022-08-01","fixed":"1.5.8","kev":false},{"cve":"CVE-2022-25918","published":"2022-10-27","fixed":"1.6.1","kev":false},{"cve":"CVE-2023-35931","published":"2023-06-23","fixed":"1.7.1","kev":false,"link":{"from":"CVE-2022-25918","to":"CVE-2023-35931","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:shescape","fromFixed":"1.6.1","toFixed":"1.7.1","daysApart":239}]}},{"cve":"CVE-2023-40185","published":"2023-08-23","fixed":"1.7.4","kev":false},{"cve":"CVE-2025-30222","published":"2025-03-25","fixed":"2.1.2","kev":false}],"package":"npm:shescape"}}