Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. codeceptjs
  4. ›
  5. CVE-2025-57285

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

September 8, 2025 (updated September 10, 2025)

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.

References

  • gist.github.com/Dremig/1ba111f9b1f7cffe1fcb4838b64e55b9
  • github.com/advisories/GHSA-34w8-mcwr-vg29
  • github.com/codeceptjs/CodeceptJS
  • nvd.nist.gov/vuln/detail/CVE-2025-57285
  • www.npmjs.com/

Code Behaviors & Features

Detect and mitigate CVE-2025-57285 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 3.7.3

Solution

Unfortunately, there is no solution available yet.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')

Source file

npm/codeceptjs/CVE-2025-57285.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 13 Sep 2025 12:19:22 +0000.