CVE Catalog

CVE-2026-46420

MediumCVSS 5.6
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Elevated risk
1.15%

64th percentile - higher than 64% of all known CVEs

Summary

A command injection vulnerability has been found in the GitHub action setup-php versions 2.25.0 through 2.37.1. The vulnerability is due to insufficient constraint of values from repository-controlled files such as .php-version, composer.lock, and composer.json, which are used to generate shell or PowerShell scripts.

Risk Assessment

An attacker can exploit this vulnerability in GitHub Actions workflows such as pull_request_target that check out attacker-controlled contents before invoking setup-php, potentially leading to arbitrary command execution on the runner.

Recommendation

Update setup-php to version 2.37.1 or later, which contains the fix.

Related vulnerabilities

Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS