{"id":"GHSA-5wxr-w449-57cm","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.","modified":"2026-09-15T06:34:36.836948251Z","published":"2026-05-20T15:32:31Z","database_specific":{"github_reviewed_at":"2026-05-20T15:32:31Z","nvd_published_at":null,"cwe_ids":["CWE-532"],"severity":"MODERATE","github_reviewed":true},"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"}],"affected":[{"package":{"name":"shivammathur/setup-php","ecosystem":"GitHub Actions"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.37.1"}]},{"type":"GIT","repo":"https://github.com/shivammathur/setup-php","events":[{"introduced":"0"},{"fixed":"7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc"}]}],"versions":["2.37.0","2.36.0","2.35.5","2.35.4","2.35.3","2.35.2","2.35.1","2.35.0","2.34.1","2.34.0","2.33.0","2.32.0","2.31.1","2.31.0","2.30.5","2.30.4","2.30.3","2.30.2","2.30.1","2.30.0","2.29.0","2.28.0","2.27.1","2.27.0","2.26.0","2.25.5","2.25.4","2.25.3","2.25.2","2.25.1","2.25.0","2.24.0","2.23.0","2.22.0","2.21.2","2.21.1","2.21.0","2.20.1","2.20.0","2.19.1","2.19.0","2.18.1","2.18.0","2.17.1","2.17.0","2.16.0","2.15.0","2.14.0","2.13.0","2.12.0","2.11.0","2.4.3","2.4.2","2.4.0","2.3.2","2.3.1","2.3.0","2.2.2","2.2.1","2.2.0","2.1.4","2.1.3","2.1.2","2.1.0","2.0.2","2.0.1","2.0.0","1.8.2","1.8.1","1.8.0","1.7.4","1.7.3","1.7.2","1.7.1","1.7.0","1.6.2","1.6.1","1.6.0","1.5.8","1.5.7","1.5.6","1.5.5","1.5.4","1.5.3","1.5.2","1.5.1","1.5.0","1.4.6","1.4.5","1.4.4","1.4.3","1.4.2","1.4.1","1.4.0","1.3.9","1.3.8","1.3.7","1.3.6","1.3.5","1.3.4","1.3.3","1.3.2","1.3.1","1.3.0","1.2.1","1.1.2","1.1.1","1.1.0","1.0.0"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-5wxr-w449-57cm/GHSA-5wxr-w449-57cm.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"}]}