CVE-2025-57285
Codeceptjs vulnerability
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.
High priority: this vulnerability is rated critical and can be attacked over the network without a login.
Affected products
Codeceptjs. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Codeceptjs runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- gist.github.com/Dremig/1ba111f9b1f7cffe1fcb4838b64e55b9 · Exploit
- www.npmjs.com
- nvd.nist.gov/vuln/detail/CVE-2025-57285
- github.com/codeceptjs/CodeceptJS/pull/3604
- github.com/codeceptjs/CodeceptJS/pull/5190
- github.com/advisories/GHSA-34w8-mcwr-vg29
- nvd.nist.gov/vuln/detail/CVE-2025-57285
- cve.org/CVERecord?id=CVE-2025-57285
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.