CVE-2025-57285
JSON

9.8critical

CodeceptJS's incomprehensive sanitation can lead to Command Injection

Severity
9.8critical CVSS:3.1 by CISA-ADP
Exploit likelihood
3.68% (higher than 90% of CVEs)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-34w8-mcwr-vg29

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.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
codeceptjs (npm)from 3.5.0 before 3.7.5GitHub Advisory Database
codecept codeceptjs3.7.3NVD

All scores

CISA-ADP9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-77

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database

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.

NVD (es)

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.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-57285 changed 2025-09-08CVE Terms of Use
GitHub Advisory DatabaseGHSA-34w8-mcwr-vg29 changed 2025-09-23CC-BY-4.0
NVDCVE-2025-57285 changed 2026-11-07Public domain