Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 1.5%top 27%

CVE-2026-46420: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in shivammathur setup-php

0
Medium
VulnerabilityCVE-2026-46420cvecve-2026-46420cwe-78
Published: 07/17/2026 (07/17/2026, 19:51:10 UTC)
Source: CVE Database V5
Vendor/Project: shivammathur
Product: setup-php

Description

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.

CVSS v3.1

Score 5.6medium

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L

Affected software

GitHub Actionsmore threats →ai
shivammathur/setup-php
pkg:github/shivammathur/setup-php
Affected versions
>=2.25.0 <2.37.1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/25/2026, 22:45:53 UTC

Technical Analysis

The setup-php GitHub Action by shivammathur, used to configure PHP environments, improperly neutralizes special elements in inputs derived from repository files (.php-version, composer.lock, composer.json). These inputs are incorporated into generated shell or PowerShell setup scripts without sufficient constraints, leading to OS command injection on GitHub Actions runners. This vulnerability affects versions >=2.25.0 and <2.37.1 and is resolved in version 2.37.1.

Potential Impact

An attacker who can influence repository files checked out in GitHub Actions workflows (e.g., pull_request_target) may execute arbitrary OS commands on the runner environment. This can lead to limited confidentiality, integrity, and availability impacts as indicated by the CVSS vector (AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L).

Mitigation Recommendations

Upgrade to version 2.37.1 or later where this vulnerability is fixed. Until then, avoid running setup-php in workflows that check out untrusted or attacker-controlled repository content, especially in pull_request_target events. Patch status is confirmed fixed in 2.37.1.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-05-13T22:18:22.829Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 6a5b5eac2d1edb114c7fb21d

Added to database: 07/18/2026, 11:08:28 UTC

Last enriched: 07/25/2026, 22:45:53 UTC

Last updated: 08/29/2026, 22:52:11 UTC

Views: 78

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses