All reports
Critical

CodeceptJS's incomprehensive sanitation can lead to Command Injection

Affected versions

Affected versions
>= 3.5.0, < 3.7.5
Fixed version
3.7.5

Exploitation

CVE-2025-57285

Probability of exploitation in the next 30 days: 2.17%

FIRST EPSS · 2026-11-23

Description

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.

Links

Credits

  • mhassan1