// For flags

CVE-2023-47039

Perl: perl for windows binary hijacking vulnerability

Severity Score

7.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

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.

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2023-10-30 CVE Reserved
  • 2024-01-02 CVE Published
  • 2024-01-09 EPSS Updated
  • 2024-08-02 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-122: Heap-based Buffer Overflow
  • CWE-787: Out-of-bounds Write
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Perl
Search vendor "Perl"
Perl
Search vendor "Perl" for product "Perl"
< 5.32.1
Search vendor "Perl" for product "Perl" and version " < 5.32.1"
-
Affected
in Microsoft
Search vendor "Microsoft"
Windows
Search vendor "Microsoft" for product "Windows"
--
Safe