Skip to content
Heist/ feed
Back to feed
High

Perl: perl for windows binary hijacking vulnerability

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2023-47039
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 01:24 UTC · Revision 1

Source evidence

Perl: perl for windows binary hijacking vulnerability

core-osv · Original source

Published 2 Jan 2024, 05:30 UTC

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.

osv:CVE-2023-47039
Complete source record
{
  "id": "a188bd328298bb06100f435eb1ee281d8508b311da5c3cf0b7641b6127d02f72",
  "url": "https://osv.dev/vulnerability/CVE-2023-47039",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Perl: perl for windows binary hijacking vulnerability",
    "summary": "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.",
    "evidence": "osv:CVE-2023-47039",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2023-47039",
      "aliases": [
        "CVE-2023-47039"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/perl/perl5",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "df9d952d734ef94233ed84af97ca318d7972eed0"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:perl:perl:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "5.32.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v5.32.1-RC1",
            "v5.32.0",
            "v5.32.0-RC1",
            "v5.31.11",
            "v5.31.7",
            "v5.31.5",
            "v5.30.0",
            "v5.31.4",
            "v5.31.3",
            "v5.31.2",
            "v5.31.1",
            "v5.31.0",
            "v5.30.0-RC2",
            "v5.30.0-RC1",
            "v5.29.10",
            "v5.29.9",
            "v5.29.8",
            "v5.29.7",
            "v5.29.6",
            "v5.29.5",
            "v5.28.0",
            "v5.29.1",
            "v5.29.0",
            "v5.28.0-RC4",
            "v5.28.0-RC3",
            "v5.28.0-RC2",
            "v5.28.0-RC1",
            "v5.27.11",
            "v5.27.10",
            "v5.27.8",
            "v5.27.7",
            "v5.27.6",
            "v5.27.5",
            "v5.27.3",
            "v5.26.0",
            "v5.27.0",
            "v5.26.0-RC2",
            "v5.25.11",
            "v5.25.9",
            "v5.25.7",
            "v5.25.5",
            "v5.25.4",
            "v5.25.3",
            "v5.24.0",
            "v5.25.2",
            "v5.25.0",
            "v5.24.0-RC5",
            "v5.24.0-RC4",
            "v5.24.0-RC3",
            "v5.24.0-RC2",
            "v5.24.0-RC1",
            "v5.23.7",
            "v5.23.6",
            "v5.23.4",
            "v5.23.3",
            "if-0.0605",
            "v5.23.2",
            "v5.23.1",
            "v5.23.0",
            "v5.22.0",
            "v5.22.0-RC2",
            "v5.22.0-RC1",
            "v5.21.11",
            "if-0.0604",
            "v5.21.10",
            "v5.21.9",
            "v5.21.8",
            "v5.21.6",
            "v5.21.5",
            "v5.21.4",
            "v5.21.1",
            "v5.21.0",
            "v5.20.0",
            "v5.20.0-RC1",
            "v5.19.11",
            "v5.19.7",
            "v5.19.5",
            "v5.19.3",
            "v5.19.2",
            "if-0.0603",
            "v5.19.1",
            "v5.18.0",
            "v5.19.0",
            "v5.18.0-RC4",
            "v5.18.0-RC3",
            "v5.18.0-RC2",
            "v5.18.0-RC1",
            "v5.17.9",
            "v5.17.8",
            "v5.17.7.0",
            "v5.17.7",
            "v5.17.6",
            "v5.17.4",
            "v5.17.2",
            "v5.17.0",
            "v5.16.0",
            "v5.16.0-RC2",
            "v5.16.0-RC1",
            "v5.15.9",
            "v5.15.5",
            "v5.15.4",
            "v5.15.3",
            "v5.15.2",
            "v5.15.1",
            "v5.15.0",
            "v5.14.0",
            "v5.14.0-RC3",
            "v5.14.0-RC2",
            "v5.14.0-RC1",
            "v5.13.11",
            "v5.13.10",
            "v5.13.9",
            "v5.13.8",
            "v5.13.7",
            "v5.13.6",
            "v5.13.5",
            "v5.13.4",
            "v5.13.3",
            "v5.13.2",
            "v5.13.1",
            "v5.12.0",
            "v5.13.0",
            "v5.12.0-RC5",
            "v5.12.0-RC4",
            "v5.12.0-RC3",
            "v5.12.0-RC2",
            "v5.12.0-RC1",
            "v5.12.0-RC0",
            "v5.11.5",
            "v5.11.4",
            "v5.11.3",
            "v5.11.1",
            "v5.11.0",
            "GitLive-blead",
            "v5.10.0",
            "perl-5.9.5",
            "perl-5.9.4",
            "perl-5.9.3",
            "perl-5.9.2",
            "perl-5.9.1",
            "perl-5.9.0",
            "perl-5.8.0",
            "perl-5.7.3",
            "perl-5.7.2",
            "perl-5.7.1",
            "perl-5.7.0",
            "perl-5.6.0",
            "perl-5.005",
            "perl-5.003",
            "perl-5.002_01",
            "perl-5.002",
            "perl-5.001n",
            "perl-5.001",
            "perl-5.000o",
            "perl-5.000",
            "perl-5a9",
            "perl-5a2",
            "perl-4.0.36",
            "perl-4.0.00",
            "perl-3.044",
            "perl-3.000",
            "perl-2.0",
            "perl-1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-47039.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:24.812511523Z",
      "provider": "osv",
      "references": [
        "https://access.redhat.com/downloads/content/package-browser/",
        "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056746",
        "https://perldoc.perl.org/perl5382delta#CVE-2023-47039-Perl-for-Windows-binary-hijacking-vulnerability",
        "https://access.redhat.com/security/cve/CVE-2023-47039",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/47xxx/CVE-2023-47039.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2023-47039",
        "https://security.netapp.com/advisory/ntap-20240208-0005/",
        "https://bugzilla.redhat.com/show_bug.cgi?id=2249525",
        "https://github.com/Perl/perl5"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-122"
        ],
        "cna_assigner": "redhat",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/47xxx/CVE-2023-47039.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-47039",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 491587,
  "published_at": "2024-01-02T05:30:53.168+00:00"
}