GHSA-5wxr-w449-57cm: Setup PHP GitHub Tokens Configured By Setup-php Vulnerability
MODERATEGHSA-5wxr-w449-57cm is a MODERATE (CVSS 5.9) github tokens configured by setup-php vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Setup PHP libraries in the GitHub Actions ecosystem. The issue involves github tokens configured by setup-php may be exposed through pinned affected composer versions. Remediation is available by upgrading affected packages to version 2.37.1.
GHSA-5wxr-w449-57cm at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix GHSA-5wxr-w449-57cm
To remediate this vulnerability, upgrade all affected Setup PHP dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade shivammathur/setup-php to 2.37.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for shivammathur/setup-php
How to Check if You Are Affected
To determine whether your application is affected by GHSA-5wxr-w449-57cm, inspect your project dependencies for Setup PHP:
inspect dependencies for shivammathur/setup-php
Analyze the terminal output to locate any version of Setup PHP in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.37.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-532: Insertion of Sensitive Information into Log File, where the product writes sensitive information to a log file. In Setup PHP, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-5wxr-w449-57cm Affected Setup PHP Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
shivammathur/setup-php
|
GitHub Actions |
< 2.37.1
|
2.37.1
|
References
Frequently Asked Questions
What is GHSA-5wxr-w449-57cm?
Which Setup PHP versions are affected?
What version fixes GHSA-5wxr-w449-57cm?
Is shivammathur/setup-php affected?
What is the CVSS score of GHSA-5wxr-w449-57cm?
What CWE is associated with GHSA-5wxr-w449-57cm?
How can I check GitHub Actions dependencies for GHSA-5wxr-w449-57cm?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5wxr-w449-57cm",
"modified" : "2026-05-20T15:32:31Z",
"published" : "2026-05-20T15:32:31Z",
"aliases" : [ ],
"summary" : "Setup PHP: GitHub tokens configured by setup-php may be exposed through pinned affected Composer versions",
"details" : "### Impact\nThis affects only workflows that pin an exact affected Composer semver version through setup-php, for example `tools: composer:2.9.7`.\n\nWorkflows using the default Composer version, `composer:v2`, or no pinned Composer version are not affected through setup-php, because those Composer URLs have been updated to patched Composer releases for all setup-php versions.\n\nsetup-php does not directly print the token. The token may be exposed through Composer when Composer validates github-oauth auth and rejects GitHub's newer hyphen-containing token format.\n\nPublic repository logs may expose the token. GitHub-hosted runner GITHUB_TOKEN values expire after the job, but exposure may still matter during the token lifetime and for longer-lived GitHub App or user tokens.\n\n### Patches\nsetup-php 2.37.1 skips generated GitHub OAuth auth for pinned Composer versions affected by Composer GHSA-f9f8-rm49-7jv2 while preserving other Composer auth, including Packagist auth.\n\n### Workarounds\nUpgrade to setup-php `2.37.1` or newer. You can also avoid the affected path by using a patched Composer version: 2.9.8, 2.2.28, 1.10.28, or newer supported Composer releases.\n\nIt is recommended to avoid pinning affected Composer versions such as `composer:2.9.7`, unless you have automations to do timely updates in your workflows.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "GitHub Actions",
"name" : "shivammathur/setup-php"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.37.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/composer/composer/security/advisories/GHSA-f9f8-rm49-7jv2"
}, {
"type" : "WEB",
"url" : "https://github.com/shivammathur/setup-php/security/advisories/GHSA-5wxr-w449-57cm"
}, {
"type" : "WEB",
"url" : "https://github.com/shivammathur/setup-php/commit/7748c243803a56671412f9f7c745769e9573c6d4"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/shivammathur/setup-php"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-532" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-20T15:32:31Z",
"nvd_published_at" : null
}
}