9.8critical
Command Injection Vulnerability in find-exec
- Severity
- 9.8critical CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.80% (higher than 79% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-95rp-6gqp-6622
Description
find-exec is a utility to discover available shell commands. Versions prior to 1.0.3 did not properly escape user input and are vulnerable to Command Injection via an attacker controlled parameter. As a result, attackers may run malicious shell commands in the context of the running process. This issue has been addressed in version 1.0.3. users are advised to upgrade. Users unable to upgrade should ensure that all input passed to find-exec comes from a trusted source.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| shime find-exec | < 1.0.3 | CVE List |
| find-exec (npm) | before 1.0.3 | GitHub Advisory Database |
| find-exec_project find-exec | before 1.0.3 | NVD |
All scores
| GitHub_M | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.
What each source says
CVE List
find-exec is a utility to discover available shell commands. Versions prior to 1.0.3 did not properly escape user input and are vulnerable to Command Injection via an attacker controlled parameter. As a result, attackers may run malicious shell commands in the context of the running process. This issue has been addressed in version 1.0.3. users are advised to upgrade. Users unable to upgrade should ensure that all input passed to find-exec comes from a trusted source.
GitHub Advisory Database
Older versions of the package are vulnerable to Command Injection as an attacker controlled parameter. As a result, attackers may run malicious commands.
For example:
const find = require("find-exec");
find("mplayer; touch hacked")
This creates a file named "hacked" on the filesystem.
You should never allow users to control commands to find, since this package attempts to run every command provided.
Thanks to @miguelafmonteiro for reporting.
NVD (es)
find-exec es una utilidad para descubrir comandos de shell disponibles. Las versiones anteriores a la 1.0.3 no escapaban correctamente la entrada del usuario y son vulnerables a la inyección de comandos a través de un parámetro controlado por un atacante. Como resultado, los atacantes pueden ejecutar comandos de shell maliciosos en el contexto del proceso en ejecución. Este problema ha sido abordado en la versión 1.0.3. Se aconseja a los usuarios actualizar. Los usuarios que no puedan actualizar deben asegurarse de que toda la entrada pasada a find-exec provenga de una fuente confiable.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-40582 changed 2024-10-01 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-95rp-6gqp-6622 changed 2023-11-08 | CC-BY-4.0 |
| NVD | CVE-2023-40582 changed 2026-06-17 | Public domain |