GHSA-5wxr-w449-57cm

Suggest an improvement
Source
https://github.com/advisories/GHSA-5wxr-w449-57cm
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-5wxr-w449-57cm/GHSA-5wxr-w449-57cm.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-5wxr-w449-57cm
Published
2026-05-20T15:32:31Z
Modified
2026-09-15T06:34:36Z
Severity
  • 5.9 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
Summary
Setup PHP: GitHub tokens configured by setup-php may be exposed through pinned affected Composer versions
Details

Impact

This affects only workflows that pin an exact affected Composer semver version through setup-php, for example tools: composer:2.9.7.

Workflows 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.

setup-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.

Public 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.

Patches

setup-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.

Workarounds

Upgrade 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.

It 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.

Database specific
{
    "cwe_ids":  [
        "CWE-532"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-05-20T15:32:31Z",
    "nvd_published_at":  null,
    "severity":  "MODERATE"
}
References

Affected packages

GitHub Actions / shivammathur/setup-php

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
2.37.1
Type
GIT
Repo
https://github.com/shivammathur/setup-php
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

1.*
1.0.0
1.1.0
1.1.1
1.1.2
1.2.1
1.3.0
1.3.1
1.3.2
1.3.3
1.3.4
1.3.5
1.3.6
1.3.7
1.3.8
1.3.9
1.4.0
1.4.1
1.4.2
1.4.3
1.4.4
1.4.5
1.4.6
1.5.0
1.5.1
1.5.2
1.5.3
1.5.4
1.5.5
1.5.6
1.5.7
1.5.8
1.6.0
1.6.1
1.6.2
1.7.0
1.7.1
1.7.2
1.7.3
1.7.4
1.8.0
1.8.1
1.8.2
2.*
2.0.0
2.0.1
2.0.2
2.1.0
2.1.2
2.1.3
2.1.4
2.11.0
2.12.0
2.13.0
2.14.0
2.15.0
2.16.0
2.17.0
2.17.1
2.18.0
2.18.1
2.19.0
2.19.1
2.2.0
2.2.1
2.2.2
2.20.0
2.20.1
2.21.0
2.21.1
2.21.2
2.22.0
2.23.0
2.24.0
2.25.0
2.25.1
2.25.2
2.25.3
2.25.4
2.25.5
2.26.0
2.27.0
2.27.1
2.28.0
2.29.0
2.3.0
2.3.1
2.3.2
2.30.0
2.30.1
2.30.2
2.30.3
2.30.4
2.30.5
2.31.0
2.31.1
2.32.0
2.33.0
2.34.0
2.34.1
2.35.0
2.35.1
2.35.2
2.35.3
2.35.4
2.35.5
2.36.0
2.37.0
2.4.0
2.4.2
2.4.3

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"