CVE-2025-57285 CodeceptJS's incomprehensive sanitation can lead to Command Injection
CriticalCVSS 9.8
EPSS 2.2%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: yes · technical impact: total
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.
Upgrade path
2 packages: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| npm codeceptjs(npm) | >= 3.5.0, < 3.7.5 | 3.7.5 | Fixed |
| codeceptjs | = 3.7.3 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| npm codeceptjs(npm) | >= 3.5.0, < 3.7.5 | 3.7.5 |
| codeceptjs | = 3.7.3 | No fix listed |
References
- nvd.nist.gov third-party-advisory vendor-advisory
- gist.github.com exploit third-party-advisory
- www.npmjs.com product
- github.com patch
- github.com patch
- github.com
- github.com product