CVE-2026-46420

MEDIUMPre-NVD 5.65.6
EchelonGraph scoreLOW confidence

This medium-severity CVE scores 5.6 under the CNA's CVSS (NVD's own analysis pending). EPSS exploit probability: 1.6%, top 18% of all CVEs by exploit prediction. GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).

Triggered by: NVD CVSS baseline
Sources: cna:github_m, epss
5.6
EchelonGraph verdictMonitorLow exploitation likelihood right now — keep watching.
  • Lower severity and no public exploit yet
CISA-KEV: Not listedEPSS: 2%CVSS: 5.6Exploit: NoneExposed: 0

No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.

Setup PHP: Command Injection in Repository-Derived PHP Version Resolution

Summary

A command injection vulnerability was identified in shivammathur/setup-php when the action resolves the PHP version from repository-controlled files and uses that value while generating the platform setup script.

In affected versions, setup-php may read the PHP version from:

  • .php-version
  • composer.lock via platform-overrides.php
  • composer.json via config.platform.php

If an attacker can influence one of these files and the workflow executes setup-php in a trusted context, they may be able to execute commands on the GitHub Actions runner.

Impact

This issue is exploitable when setup-php is run after checking out attacker-controlled repository contents and resolves the PHP version from repository files.

The most significant example is a privileged workflow such as pull_request_target that checks out untrusted pull request code before invoking setup-php. Similar risk can also arise in other workflows that operate on attacker-controlled refs, branches, or repository contents in a trusted context.

This is not a separate security boundary when an attacker can already modify the workflow definition itself or directly control the php-version workflow input, since that level of access already permits arbitrary command execution in GitHub Actions.

Technical details

In affected versions, repository-derived PHP version values were insufficiently constrained before being incorporated into the generated shell or PowerShell setup script executed by the action. This could allow attacker-controlled values from supported repository files to influence script execution in trusted workflow contexts.

Remediation

If you are using shivammathur/setup-php@v2, no action is needed on your end. Users who pin the setup-php release version or release version SHA should upgrade to a patched version.

The fix validates PHP version inputs, constrains manifest-derived versions, hardens script generation at the execution, and includes additional checks in related input-handling paths.

CVSS v3
5.6
EG Score
5.6(low)
EPSS
82.0%
KEV
Not listed

Published

May 20, 2026

Last Modified

May 20, 2026

Vendor Advisories for CVE-2026-46420(1)

These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.

Data Freshness Timeline

(refreshed 0× in last 7d / 6× in last 30d)

Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.

  1. 2026-06-29 20:28 UTCEG score recompute
  2. 2026-06-27 20:13 UTCEG score recompute
  3. 2026-06-26 19:34 UTCEG score recompute
  4. 2026-06-25 15:25 UTCEG score recompute
  5. 2026-06-17 20:03 UTCEG score recompute
  6. 2026-06-16 20:13 UTCEG score recompute
  7. 2026-06-15 15:50 UTCEG score recompute
  8. 2026-06-14 23:18 UTCEPSS rescore
  9. 2026-06-14 13:38 UTCEG score recompute
  10. 2026-06-13 23:00 UTCEPSS rescore
  11. 2026-06-13 14:42 UTCEG score recompute
  12. 2026-06-12 23:12 UTCEPSS rescore
  13. 2026-06-12 15:45 UTCEG score recompute
  14. 2026-06-11 16:46 UTCEG score recompute
  15. 2026-06-10 17:19 UTCEG score recompute
  16. 2026-06-09 18:23 UTCEG score recompute
  17. 2026-06-08 19:27 UTCEG score recompute
  18. 2026-06-07 19:29 UTCEG score recompute
  19. 2026-06-06 20:33 UTCEG score recompute
  20. 2026-06-05 21:37 UTCEG score recompute
  21. 2026-06-04 22:41 UTCEG score recompute
  22. 2026-06-03 23:45 UTCEG score recompute
  23. 2026-06-03 00:48 UTCEG score recompute
  24. 2026-06-02 01:50 UTCEG score recompute
  25. 2026-06-01 02:54 UTCEG score recompute
Show 1 more
  1. 2026-05-24 06:12 UTCEG score recompute

Frequently asked(5)

What is CVE-2026-46420?
CVE-2026-46420 is a medium vulnerability published on May 20, 2026. Setup PHP: Command Injection in Repository-Derived PHP Version Resolution Summary A command injection vulnerability was identified in shivammathur/setup-php when the action resolves the PHP version from repository-controlled files and uses that value while generating the platform setup script. In…
When was CVE-2026-46420 disclosed?
CVE-2026-46420 was first published in the National Vulnerability Database on May 20, 2026. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
Is CVE-2026-46420 actively exploited?
CVE-2026-46420 is not currently on CISA's Known Exploited Vulnerabilities catalog. FIRST EPSS estimates a 82.0% percentile likelihood of exploitation in the next 30 days — higher percentiles indicate greater predicted risk.
What is the CVSS score of CVE-2026-46420?
CVE-2026-46420 has a CVSS v4.0 base score of 5.6 (CNA self-assessment; NVD's own analysis pending). The EG score is currently aggregating — additional source signals are being incorporated as they become available..
How do I remediate CVE-2026-46420?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2026-46420, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

Explore the affected products and dependency analysis for CVE-2026-46420

Explore →

Is Your Infrastructure Affected by CVE-2026-46420?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.