CVE-2025-57285
CRITICAL 9.8CVSS 3.1CodeceptJS's incomprehensive sanitation can lead to Command Injection
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.
- Published
- 8 Sep 2025
- Last modified
- 7 Nov 2026
- Assigned by
- cve@mitre.org
- NVD status
- Analyzed
- Weakness
- CWE-77
- Also known as
- GHSA-34w8-mcwr-vg29
- Sources
- NVDJSONOSV GHSA-34w8-mcwr-vg29JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | codecept | codeceptjscpe:2.3:a:codecept:codeceptjs:3.7.3:*:*:*:*:node.js:*:* |
= 3.7.3 | |
| OSV | npm | codeceptjs | >= 3.5.0, < 3.7.5 | 3.7.5 |
References
- https://gist.github.com/Dremig/1ba111f9b1f7cffe1fcb4838b64e55b9 · Exploit, Third Party Advisory, WEB
- https://www.npmjs.com · Product, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-57285 · ADVISORY
- https://github.com/codeceptjs/CodeceptJS/pull/3604 · WEB
- https://github.com/codeceptjs/CodeceptJS/pull/5190 · WEB
- https://github.com/codeceptjs/CodeceptJS · PACKAGE
History
- 25 Nov 2026 20:58 UTC · NVD: first stored (published 8 Sep 2025)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 8 Sep 2025)