{"id":"GHSA-5wxr-w449-57cm","aliases":["GHSA-5wxr-w449-57cm"],"related":[],"kind":"vulnerability","state":"published","title":"Setup PHP: GitHub tokens configured by setup-php may be exposed through pinned affected Composer versions","summary":"### 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.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"}],"published":"2026-05-20T15:32:31.000Z","modified":"2026-05-20T15:48:07.549Z","severity":{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"}],"cwes":["CWE-532"],"affected":[{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.37.1"}],"ecosystem":"GitHub Actions","package":"shivammathur/setup-php","source":"ghsa"}],"references":[{"url":"https://github.com/composer/composer/security/advisories/GHSA-f9f8-rm49-7jv2","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/shivammathur/setup-php/security/advisories/GHSA-5wxr-w449-57cm","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/shivammathur/setup-php/commit/7748c243803a56671412f9f7c745769e9573c6d4","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/shivammathur/setup-php","tags":["package"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5wxr-w449-57cm","url":"https://github.com/advisories/GHSA-5wxr-w449-57cm","licence":"CC-BY-4.0","modified":"2026-05-20T15:48:07.549Z"}],"updatedAt":"2026-11-25T22:56:20.022Z"}