Skip to content
OpenAdvisories
High · 7.8 CVE-2023-47039 EUVD-2023-51194GHSA-44qm-928x-6p3g

Perl: perl for windows binary hijacking vulnerability

Published Jan 2, 2024 · Updated Nov 20, 2025 · 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 products

VendorProductAffectedFixed
— perl < 5.34.3, 5.36.0 – < 5.36.3, 5.38.0 – < 5.38.2 5.34.3
Red Hat Red Hat Enterprise Linux 6 — —
Red Hat Red Hat Enterprise Linux 7 — —
Red Hat Red Hat Enterprise Linux 8 — —
Red Hat Red Hat Enterprise Linux 9 — —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Ubuntu 22.04 LTS perl No fix yet —
Ubuntu 20.04 LTS perl6 No fix yet —
Ubuntu 18.04 LTS perl6 No fix yet —
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 20.04 LTS perl No fix yet —
Ubuntu Pro 18.04 LTS perl No fix yet —
Ubuntu Pro 16.04 LTS perl No fix yet —
Ubuntu Pro 14.04 LTS perl No fix yet —
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed perl 5.38.2-1.1 openSUSE-SU-2024:13479-1

Advisories 5

References