CodeceptJS's incomprehensive sanitation can lead to Command Injection
Critical severity
GitHub Reviewed
Published
Sep 8, 2025
to the GitHub Advisory Database
•
Updated Sep 23, 2025
Description
Published by the National Vulnerability Database
Sep 8, 2025
Published to the GitHub Advisory Database
Sep 8, 2025
Reviewed
Sep 10, 2025
Last updated
Sep 23, 2025
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.
References