{"id":"CVE-2025-57285","aliases":["EUVD-2025-27152","GHSA-34w8-mcwr-vg29"],"status":"published","title":"CodeceptJS's incomprehensive sanitation can lead to Command Injection","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.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"adp","from":"cve"},"epss":{"day":"2026-11-12","score":0.02169,"percentile":0.82528,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-77"],"published":"2025-09-08T00:00:00Z","modified":"2026-11-07T18:10:00Z","fixes":[{"ecosystem":"npm","package":"codeceptjs","fixed_in":["3.7.5"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"codeceptjs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.5.0"},{"fixed":"3.7.5"}]}]},{"source":"osv","ecosystem":"npm","package":"codeceptjs","ranges":[{"type":"SEMVER","events":[{"introduced":"3.5.0"},{"fixed":"3.7.5"}]}]}],"products":[{"vendor":"codecept","product":"codeceptjs"}],"references":[{"url":"https://www.npmjs.com","tags":["Product","web"]},{"url":"https://gist.github.com/Dremig/1ba111f9b1f7cffe1fcb4838b64e55b9","tags":["Exploit","Third Party Advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-57285","tags":["advisory"]},{"url":"https://github.com/codeceptjs/CodeceptJS/pull/3604","tags":["web"]},{"url":"https://github.com/codeceptjs/CodeceptJS/pull/5190","tags":["web"]},{"url":"https://github.com/advisories/GHSA-34w8-mcwr-vg29"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/57xxx/CVE-2025-57285.json","tags":["advisory"]},{"url":"https://github.com/codeceptjs/CodeceptJS","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2025-57285","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.","status":"published","published":"2025-09-08T00:00:00Z","modified":"2025-09-08T19:40:26.439Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"adp"}],"cwes":["CWE-77"],"updated_at":"2026-11-02T14:32:35.099955Z"}],"euvd":[{"id":"EUVD-2025-27152","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.","status":"published","published":"2025-09-08T00:00:00Z","modified":"2025-09-08T19:40:26Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T20:31:46.000077Z"}],"ghsa":[{"id":"GHSA-34w8-mcwr-vg29","title":"CodeceptJS's incomprehensive sanitation can lead to Command Injection","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.","status":"published","published":"2025-09-08T18:31:42Z","modified":"2025-09-23T20:19:27Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-77"],"updated_at":"2026-11-02T14:38:58.965005Z"}],"nvd":[{"id":"CVE-2025-57285","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.","status":"published","published":"2025-09-08T18:15:34.16Z","modified":"2026-11-07T18:10:00.2Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"secondary"}],"cwes":["CWE-77"],"updated_at":"2026-11-07T20:06:28.095135Z"}],"osv":[{"id":"CVE-2025-57285","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.","status":"published","published":"2025-09-08T00:00:00Z","modified":"2026-11-09T02:30:33.25695515Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-09T03:16:44.651171Z"},{"id":"GHSA-34w8-mcwr-vg29","title":"CodeceptJS's incomprehensive sanitation can lead to Command Injection","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.","status":"published","published":"2025-09-08T18:31:42Z","modified":"2025-09-23T20:19:25Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-77"],"updated_at":"2026-11-02T15:46:35.050232Z"}]}}
