Description
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.
Recommendation
Update the codeceptjs package to the latest compatible version. Followings are version details:
- Affected version(s): >= 3.5.0, < 3.7.5
- Patched version(s): 3.7.5
References
Related Issues
- BrowserStack Local vulnerable to Command Injection through logfile variable - CVE-2025-57283
- Matrix IRC Bridge allows IRC command injection to own puppeted user - CVE-2025-27146
- Happy DOM: VM Context Escape can lead to Remote Code Execution - CVE-2025-61927
- systeminformation has a Command Injection vulnerability in fsSize() function on Windows - CVE-2025-68154
- Tags:
- npm
- codeceptjs
Anything's wrong? Let us know Last updated on September 23, 2025