CVE-2023-47039
JSON

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 packageVersionsReported by
perlbefore 5.34.3, from 5.36.0 before 5.36.3, from 5.38.0 before 5.38.2CVE List
perl:5.30/perlNot specifiedCVE List
perl:5.32/perlNot specifiedCVE List
perl perlbefore 5.32.1NVD

All scores

redhat7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-122CWE-787

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

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

SourceRecordLicence
CVE ListCVE-2023-47039 changed 2026-11-26CVE Terms of Use
NVDCVE-2023-47039 changed 2026-06-17Public domain