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.
Affected products
codecept: codeceptjs
References2
- gist.github.com/Dremig/1ba111f9b1f7cffe1fcb4838b64e55b9 ExploitThird Party Advisory
- www.npmjs.com Product
Metrics
- CVSS 3.1
-
9.8
CRITICAL
Score source: CNA
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - EPSS — exploit probability
- 2% percentile: 82 · as of 8 November 2026
- CWE
- CWE-77
Could this be exploited in your environment?
A patch closes the known hole. A penetration test shows what an attacker can still reach — with proof.