Critical, CVSS 9.8npmAmendedPublished
CodeceptJS's incomprehensive sanitation can lead to Command Injection
CVE-2025-57285 · GHSA-34w8-mcwr-vg29
- Affected
- npm codeceptjs >= 3.5.0, < 3.7.5
- Fixed in
- 3.7.5· Vendor fix available
- Issue
- 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.
Recommended action: Upgrade to 3.7.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.