9.8critical
CodeceptJS's incomprehensive sanitation can lead to Command Injection
- Severity
- 9.8critical CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 3.68% (higher than 90% of CVEs)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-34w8-mcwr-vg29
Description
codeceptjs 3.7.3 contains a command injection vulnerability in the emptyFolder function (lib/utils.js). The execSync command directly concatenates the user-controlled directoryPath parameter without sanitization or escaping, allowing attackers to execute arbitrary commands.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| codeceptjs (npm) | from 3.5.0 before 3.7.5 | GitHub Advisory Database |
| codecept codeceptjs | 3.7.3 | NVD |
All scores
| CISA-ADP | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.
What each source says
CVE List
codeceptjs 3.7.3 contains a command injection vulnerability in the emptyFolder function (lib/utils.js). The execSync command directly concatenates the user-controlled directoryPath parameter without sanitization or escaping, allowing attackers to execute arbitrary commands.
GitHub Advisory Database
CodeceptJS versions 3.5.0 through 3.7.5-beta.18 contain a command injection vulnerability in the emptyFolder function (lib/utils.js). The execSync command directly concatenates the user-controlled directoryPath parameter without sanitization or escaping, allowing attackers to execute arbitrary commands.
NVD (es)
codeceptjs 3.7.3 contiene una vulnerabilidad de inyección de comandos en la función emptyFolder (lib/utils.js). El comando execSync concatena directamente el parámetro directoryPath controlado por el usuario sin saneamiento ni escape, lo que permite a los atacantes ejecutar comandos arbitrarios.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-57285 changed 2025-09-08 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-34w8-mcwr-vg29 changed 2025-09-23 | CC-BY-4.0 |
| NVD | CVE-2025-57285 changed 2026-11-07 | Public domain |