{"id":"CVE-2025-57285","aliases":["CVE-2025-57285","GHSA-34w8-mcwr-vg29"],"related":[],"kind":"vulnerability","state":"published","title":"CodeceptJS's incomprehensive sanitation can lead to Command Injection","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"codeceptjs 3.7.3 contiene una vulnerabilidad de inyección de comandos en la función emptyFolder (lib/utils.js). El comando execSync concatena directamente el parámetro directoryPath controlado por el usuario sin saneamiento ni escape, lo que permite a los atacantes ejecutar comandos arbitrarios.","source":"nvd"}],"published":"2025-09-08T00:00:00.000Z","modified":"2026-11-07T18:10:00.200Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-77"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"3.5.0","status":"affected","fixed":"3.7.5"}],"ecosystem":"npm","package":"codeceptjs","purl":"pkg:npm/codeceptjs","source":"ghsa"},{"ranges":[{"status":"affected","version":"3.7.3"}],"vendor":"codecept","product":"codeceptjs","cpe":"cpe:2.3:a:codecept:codeceptjs:3.7.3:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://www.npmjs.com","tags":["product","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://gist.github.com/Dremig/1ba111f9b1f7cffe1fcb4838b64e55b9","tags":["exploit","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-57285","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/codeceptjs/CodeceptJS/pull/3604","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/codeceptjs/CodeceptJS/pull/5190","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/codeceptjs/CodeceptJS","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2025-09-08T19:39:52.492Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-57285","url":"https://www.cve.org/CVERecord?id=CVE-2025-57285","licence":"CVE Terms of Use","modified":"2025-09-08T19:40:26.439Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-34w8-mcwr-vg29","url":"https://github.com/advisories/GHSA-34w8-mcwr-vg29","licence":"CC-BY-4.0","modified":"2025-09-23T20:19:25.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-57285","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-57285","licence":"Public domain","modified":"2026-11-07T18:10:00.200Z"}],"updatedAt":"2026-11-25T22:59:04.336Z","epss":{"score":0.03684,"percentile":0.90481,"date":"2026-11-30T12:00:22.000Z"}}