Advisory

GHSA-34w8-mcwr-vg29

Also known as: CVE-2025-57285

Summary

CodeceptJS's incomprehensive sanitation can lead to Command Injection

Details

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.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2025-09-08 18:31 UTC
Modified
2025-09-23 20:19 UTC

Affected packages and fixes

codeceptjs

npm · All systems

Affected

  • introduced 3.5.0, fixed 3.7.5 (semver)

Fixed versions

3.7.5

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences