{"id":"GHSA-34w8-mcwr-vg29","summary":"CodeceptJS's incomprehensive sanitation can lead to Command Injection","details":"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.","aliases":["CVE-2025-57285"],"modified":"2025-09-23T20:19:25Z","published":"2025-09-08T18:31:42Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2025-09-10T17:11:21Z","nvd_published_at":"2025-09-08T18:15:34Z","cwe_ids":["CWE-77"],"severity":"CRITICAL"},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-57285"},{"type":"WEB","url":"https://github.com/codeceptjs/CodeceptJS/pull/3604"},{"type":"WEB","url":"https://github.com/codeceptjs/CodeceptJS/pull/5190"},{"type":"WEB","url":"https://gist.github.com/Dremig/1ba111f9b1f7cffe1fcb4838b64e55b9"},{"type":"PACKAGE","url":"https://github.com/codeceptjs/CodeceptJS"},{"type":"WEB","url":"https://www.npmjs.com"}],"affected":[{"package":{"name":"codeceptjs","ecosystem":"npm","purl":"pkg:npm/codeceptjs"},"ranges":[{"type":"SEMVER","events":[{"introduced":"3.5.0"},{"fixed":"3.7.5"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/09/GHSA-34w8-mcwr-vg29/GHSA-34w8-mcwr-vg29.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}