CVE-2023-47039
Perl: perl for windows binary hijacking vulnerability
- State
- Published
- Severity
- 7.8 High
- Published
- Jan 2, 2024
- Updated
- Nov 20, 2025
- Reserved
- Oct 30, 2023
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.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 3.1 | 7.8 High | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | redhat |
Weaknesses
- CWE-122 Heap-based Buffer Overflow
Affected Products
| Product | Versions |
|---|---|
perl |
|
Red Hat Enterprise Linux 6Red Hat | |
Red Hat Enterprise Linux 7Red Hat | |
Red Hat Enterprise Linux 8Red Hat | |
Red Hat Enterprise Linux 8Red Hat | |
Red Hat Enterprise Linux 8Red Hat | |
Red Hat Enterprise Linux 9Red Hat |
References
- https://access.redhat.com/security/cve/CVE-2023-47039vdb-entry
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056746
- RHBZ#2249525issue-tracking
- https://security.netapp.com/advisory/ntap-20240208-0005/
- https://perldoc.perl.org/perl5382delta#CVE-2023-47039-Perl-for-Windows-binary-hijacking-vulnerability
Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.