Skip to content

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

CriticalCVSS 9.8 EPSS 2.2%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: yes · technical impact: total

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.

Upgrade path

2 packages: 1 fixed.

PackageAffectedFixed inStatus
npm codeceptjs(npm) >= 3.5.0, < 3.7.5 3.7.5 Fixed
codeceptjs = 3.7.3 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
npm codeceptjs(npm) >= 3.5.0, < 3.7.5 3.7.5
codeceptjs = 3.7.3 No fix listed

References