# CVE-2025-57285: CodeceptJS's incomprehensive sanitation can lead to Command Injection

- Severity: Critical 9.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 3.68%, higher than 90% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-09-08T00:00:00.000Z
- Modified: 2026-11-07T18:10:00.200Z
- Also known as: GHSA-34w8-mcwr-vg29
- Weaknesses: CWE-77
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: mitre

## 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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- codeceptjs (npm): from 3.5.0 before 3.7.5
- codecept codeceptjs: 3.7.3

## Every score

- CISA-ADP: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://gist.github.com/Dremig/1ba111f9b1f7cffe1fcb4838b64e55b9> (exploit, third-party-advisory, web)
- <https://www.npmjs.com> (product, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-57285> (advisory)
- <https://github.com/codeceptjs/CodeceptJS/pull/3604> (web)
- <https://github.com/codeceptjs/CodeceptJS/pull/5190> (web)
- <https://github.com/codeceptjs/CodeceptJS> (package)

## Sources

- CVE List: [CVE-2025-57285](https://www.cve.org/CVERecord?id=CVE-2025-57285), CVE Terms of Use, modified 2025-09-08
- GitHub Advisory Database: [GHSA-34w8-mcwr-vg29](https://github.com/advisories/GHSA-34w8-mcwr-vg29), CC-BY-4.0, modified 2025-09-23
- NVD: [CVE-2025-57285](https://nvd.nist.gov/vuln/detail/CVE-2025-57285), Public domain, modified 2026-11-07

---

Page: https://cve.day/CVE-2025-57285 · Whole record: https://cve.day/CVE-2025-57285.json · Rebuilt by cve.day 2026-11-25T22:59:04.336Z
