PoC Monitor
← All CVEs
CVE-2026-46420published 17 Jul 2026 19:51 UTCData: JSON · API

Shivammathur setup-php

setup-php: Command Injection in Repository-Derived PHP Version Resolution

setup-php is a GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and tools. From 2.25.0 prior to 2.37.1, shivammathur/setup-php resolves the PHP version from repository-controlled files such as .php-version, composer.lock through platform-overrides.php, and composer.json through config.platform.php, and insufficiently constrains those values before incorporating them into generated shell or PowerShell setup scripts, allowing command injection on a GitHub Actions runner when workflows such as pull_request_target check out attacker-controlled contents before invoking setup-php. This issue is fixed in version 2.37.1.

First public PoC 1.1 daysafter publication · 18 Jul 2026
Public PoCs11 on GitHub
CVSS9.8critical · scored by NVD · CWE-78
CISA KEV Not listednot known exploited

Affected versions and mitigation

From the CVE record and the vendor's references.

Affected

shivammathur setup-php
  • >= 2.25.0, < 2.37.1

Fixed in 2.37.1

Timeline

Days relative to CVE publication
-2t=0+2+4+6+8CVE published17 Jul 2026 · t = 0First public PoC18 Jul 2026 · t+1.1d

First public PoC 1.1 days after publication; not in CISA KEV. First PoC: Jvr2022/CVE-2026-46420 (created 18 Jul 2026, found by us: backfilled).

PoC repositories

Found on GitHub.

1 PoCs

PoCs 1
RepositoryCreatedStarsAssessment
Jvr2022/CVE-2026-46420 18 Jul 2026 +1.1 d 1 PoC
Flags · score 15
  • no network code found (normal for a local exploit)

Below the suspicion threshold (50); does not change the assessment.

Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.