7.8high
Perl: perl for windows binary hijacking vulnerability
- Severity
- 7.8high CVSS:3.1 by redhat
- Exploit likelihood
- 0.44% (higher than 40% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- redhat
Description
A vulnerability was found in Perl. This security issue occurs while Perl for Windows relies on the system path environment variable to find the shell (`cmd.exe`). When running an executable that uses the Windows Perl interpreter, Perl attempts to find and execute `cmd.exe` within the operating system. However, due to path search order issues, Perl initially looks for cmd.exe in the current working directory. This flaw allows an attacker with limited privileges to place`cmd.exe` in locations with weak permissions, such as `C:\ProgramData`. By doing so, arbitrary code can be executed when an administrator attempts to use this executable from these compromised locations.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| perl | before 5.34.3, from 5.36.0 before 5.36.3, from 5.38.0 before 5.38.2 | CVE List |
| perl:5.30/perl | Not specified | CVE List |
| perl:5.32/perl | Not specified | CVE List |
| perl perl | before 5.32.1 | NVD |
All scores
| redhat | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Classification
What each source says
CVE List
A vulnerability was found in Perl. This security issue occurs while Perl for Windows relies on the system path environment variable to find the shell (`cmd.exe`). When running an executable that uses the Windows Perl interpreter, Perl attempts to find and execute `cmd.exe` within the operating system. However, due to path search order issues, Perl initially looks for cmd.exe in the current working directory. This flaw allows an attacker with limited privileges to place`cmd.exe` in locations with weak permissions, such as `C:\ProgramData`. By doing so, arbitrary code can be executed when an administrator attempts to use this executable from these compromised locations.
NVD (es)
Se encontró una vulnerabilidad en Perl. Este problema de seguridad ocurre mientras Perl para Windows depende de la variable de entorno de ruta del sistema para encontrar el shell (`cmd.exe`). Cuando se ejecuta un ejecutable que utiliza el intérprete de Windows Perl, Perl intenta buscar y ejecutar `cmd.exe` dentro del sistema operativo. Sin embargo, debido a problemas con el orden de búsqueda de rutas, Perl inicialmente busca cmd.exe en el directorio de trabajo actual. Esta falla permite que un atacante con privilegios limitados coloque `cmd.exe` en ubicaciones con permisos débiles, como `C:\ProgramData`. Al hacerlo, se puede ejecutar código arbitrario cuando un administrador intenta utilizar este ejecutable desde estas ubicaciones comprometidas.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-47039 changed 2026-11-26 | CVE Terms of Use |
| NVD | CVE-2023-47039 changed 2026-06-17 | Public domain |