Skip to main content

Composer CVE-2026-45793

| EUVDEUVD-2026-44723 HIGH
Information Exposure (CWE-200)
2026-05-19 https://github.com/composer/composer GHSA-f9f8-rm49-7jv2
7.5
CVSS 3.1 · Vendor: https://github.com/composer/composer
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Observe public CI workflow logs
  2. Delivery
    Wait for run with hyphen-containing GITHUB_TOKEN
  3. Exploit
    Composer regex rejects token
  4. Install
    Exception leaks plaintext token to stderr
  5. C2
    Masker bypassed via Console wrapping
  6. Execute
    Harvest token before TTL expiry
  7. Impact
    Abuse token scope on target repository

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V14 - Data Protection Data exposure prevention
MITRE ATT&CK

2 techniques across 2 tactics: Collection, Discovery

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Triggering conditions: (1) Composer 1.0-1.10.27, 2.0.0-2.2.27, or 2.3.0-2.9.7 is invoked during a CI run; (2) a GitHub OAuth/Actions token is registered into Composer's auth.json (commonly via shivammathur/setup-php or any action that populates COMPOSER_AUTH/GITHUB_TOKEN); (3) the token's character set falls outside ^[.A-Za-z0-9_]+$ - in practice, a hyphen, which is present in GitHub's new ghs_<id>_<base64url-JWT> Actions/App installation token format currently being rolled out. Limiting factors: classic ghp_ PATs do not contain hyphens and are not triggered by this specific regex bug; the leak only matters if stderr is captured somewhere readable (public workflow logs, log shippers, support exports); GitHub-hosted Actions tokens expire at job end (max 6h) and are scoped to a single repository, sharply bounding blast radius; self-hosted runners extend TTL up to 24h; rollout of the new token format is gradual, so not all repositories are affected yet.

Impact

CVSS 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N) reflects confidentiality-only network-scored impact, but the real-world risk profile diverges from that score. The CVSS network vector is somewhat misleading: an attacker does not directly attack Composer over the network - instead, a privileged CI process leaks its own token into logs that an attacker must subsequently access (e.g., via public workflow logs on a public repo, a compromised log shipper, or an artifact share). No EPSS, KEV, or SSVC data was provided; no public exploit identified at time of analysis. The blast radius is meaningfully bounded by token TTL: GitHub-hosted runner GITHUB_TOKENs expire when the job ends (max 6 hours), self-hosted at most 24 hours, and they are scoped to a single repository. However, App-minted tokens (actions/create-github-app-token) and any future long-lived credential containing - raise the stakes considerably. The vendor's own assessment of medium is reasonable; this should be prioritized for any organization running public-log CI with Composer, but is not a drop-everything emergency for private pipelines with disciplined log access.

Exploit ScenarioDerived

A maintainer runs a public GitHub Actions workflow that uses shivammathur/setup-php (which injects GITHUB_TOKEN into Composer's auth.json) on a repository whose runner has been rolled to GitHub's new ghs_<id>_<base64url-JWT> token format containing a hyphen. Composer's loadConfiguration() rejects the token, throws UnexpectedValueException with the raw token in the message, and Symfony Console prints it to stderr where it bypasses Actions' substring masker due to line wrapping. An external observer reading the public workflow log - or anyone with access to log shippers, support transcripts, or cached artifacts - harvests the token within its 6-hour TTL and uses it to push commits, read private content within the repo's scope, or pivot through linked App permissions.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 19, 2026

Sensitive token disclosure in Composer (PHP dependency manager) versions prior to 1.10.28, 2.2.28, and 2.9.8 causes GitHub Actions GITHUB_TOKEN values to be written verbatim to stderr/CI logs whenever the token contains characters outside Composer's hardcoded validation regex. The new GitHub Actions token format (ghs_<id>_<base64url-JWT>) includes hyphens, which fail Composer's ^[.A-Za-z0-9_]+$ check and trigger an UnexpectedValueException that interpolates the raw token into its message. No public exploit identified at time of analysis, but the leak triggers automatically without unusual configuration on any pipeline using common actions like shivammathur/setup-php that auto-register GITHUB_TOKEN into Composer's auth.json.

RemediationAI

Vendor-released patches: upgrade Composer to 2.9.8 (for 2.3.x-2.9.x branch), 2.2.28 (for 2.0.x-2.2.x LTS branch), or 1.10.28 (for legacy 1.x branch), per the GHSA-f9f8-rm49-7jv2 advisory at https://github.com/composer/composer/security/advisories/GHSA-f9f8-rm49-7jv2. In CI pipelines this typically means pinning a fixed Composer version in setup actions (e.g., shivammathur/setup-php with tools: composer:2.9.8). Until upgraded, the most effective compensating control is to stop auto-registering GITHUB_TOKEN into Composer's auth.json - either unset COMPOSER_AUTH/disable the action input that injects it, or restrict Composer invocations to public package fetches that do not require authentication; the trade-off is that private Packagist or rate-limited GitHub API fetches will fail. Where token use is unavoidable, rotate any potentially exposed GITHUB_TOKEN-derived credentials (especially App installation tokens minted via actions/create-github-app-token), make affected workflow runs and logs private, and scrub log retention. Generic secret-masker reliance is insufficient because Symfony Console line-wrapping and ANSI framing defeat substring matching.

Affected VersionsENISA

composer 1.0, < 1.10.28
composer 2.3.0, < 2.9.8
composer 2.0.0, < 2.2.28

Affected Packages

composer composer/composer fix: 1.10.28, 2.2.28, 2.9.8
euvd composer_1_0 fix: 1.10.28
euvd composer_2_0_0 fix: 2.2.28
euvd composer_2_3_0 fix: 2.9.8

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 4 packages in composer, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Composer is the de-facto dependency manager for PHP and is routinely invoked inside CI pipelines, including GitHub Actions. The root cause is CWE-200 (Exposure of Sensitive Information): in src/Composer/IO/BaseIO.php::loadConfiguration(), tokens registered for GitHub OAuth domains are validated against ^[.A-Za-z0-9_]+$, a regex written in 2021 around GitHub's then-current ghp_/gho_ format. When validation fails, the offending token is concatenated directly into an UnexpectedValueException message that Symfony Console then prints to stderr. GitHub has rolled out a new structured installation/Actions token format (ghs_<numeric-id>_<base64url-JWT>) that uses base64url alphabet (RFC 4648 §5), which includes - and _ - the hyphen fails the regex. GitHub Actions' built-in secret masker compares registered secrets as exact substrings, but Symfony Console wraps lines, prepends In BaseIO.php line N: framing, and interleaves ANSI escapes, so the plaintext token slips past redaction. CPE data (pkg:composer/composer_composer) confirms the upstream Composer package is the only affected component.

Know when PHP gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/composer/composer) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
SUSE 5.3 MEDIUM
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
Red Hat 7.5 HIGH

Primary rating from Vendor (https://github.com/composer/composer).

CVSS VectorVendor: https://github.com/composer/composer

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

DescriptionCVE.org

Summary

Composer leaks the full contents of tokens configured as GitHub OAuth tokens if they do not match Composer's expected format for such tokens to stderr. GitHub has introduced a new format for GitHub Actions GITHUB_TOKEN values. These tokens are validated in the same way by Composer on GitHub Actions. The new format including a - (hyphen) fails Composer's validation and leads to disclosure of the GITHUB_TOKEN in logs.

Many widely-used Actions (e.g. shivammathur/setup-php) auto-register GITHUB_TOKEN into composer's global auth.json, so the leak triggers without any unusual user configuration.

GitHub Actions tokens expire when the associated job finishes, and they are scoped to the respective repository only. So in most regular cases the Composer validation, which errors while leaking the token, also immediately ends the job, expiring the token immediately. Tokens expire at the very latest after 6 hours on GitHub-hosted runners. If you use self-hosted runner, expiration is at most 24 hours after creation. The new token format is being rolled out gradually, so not all repositories are affected yet, but will be soon.

Classic ghp_ PATs are not affected by the regex bug per se, but the same leak primitive applies to any future credential that fails validation for any reason.

Details

When a GitHub token fails regular expression validation of the character set, the rejected token is interpolated verbatim into the UnexpectedValueException message thrown by Composer\IO\BaseIO::loadConfiguration(), which Symfony Console then prints. Validation reliably fails for any token containing a - (hyphen), which includes the modern ghs_<id>_<base64url-JWT> GitHub App installation token format, the same format used by GitHub Actions' built-in GITHUB_TOKEN and by actions/create-github-app-token.

Severity: medium. Pre-conditions are common in real-world CI. Practical blast radius is bounded by the leaked credential's scope and TTL (short for a workflow GITHUB_TOKEN, longer for App-minted tokens or user-issued credentials that happen to contain -).

Vulnerable code, src/Composer/IO/BaseIO.php (line 139 on main, line 143 on 2.8.x), inside loadConfiguration():

php
// allowed chars for GH tokens are from https://github.blog/changelog/2021-03-04-authentication-token-format-updates/
// plus dots which were at some point used for GH app integration tokens
if (!Preg::isMatch('{^[.A-Za-z0-9_]+$}', $token)) {
    throw new \UnexpectedValueException(
        'Your github oauth token for '.$domain.' contains invalid characters: "'.$token.'"'
    );
}

Three issues combine to produce the leak:

  1. The rejected token is interpolated into the exception message. The exception bubbles up to Symfony Console's default error renderer, which writes it to stderr. Any environment that captures stderr (CI logs, log shippers, monitoring, support transcripts) now has the raw token.
  2. The validation regex ^[.A-Za-z0-9_]+$ does not permit -. GitHub's current ghs_<numeric-id>_<base64url-JWT> structured installation tokens routinely contain -, because base64url (RFC 4648 §5) uses - and _ as URL-safe replacements for + and /. The regex was chosen in 2021 on the understanding that GitHub tokens use only [A-Za-z0-9_] plus ..
  3. Detection / mitigation in upstream platforms is unreliable. GitHub Actions' built-in secret masker matches registered values as exact substrings. When the exception message is rendered by Symfony Console it may wrap, embed in In BaseIO.php line N: framing, or interleave with ANSI control sequences. So the masker does not redact, and the plaintext token reaches the log.

Executive ViewAI

Why It Matters

Composer, the PHP dependency manager, contains a vulnerability affecting versions prior to 1.10.28, 2.2.28, and 2.9.8 that automatically writes GitHub Actions GITHUB_TOKEN credentials to CI logs in plain text. This exposes development infrastructure and code repositories to unauthorized access for any organization using GitHub Actions with PHP projects.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: enable GitHub Actions token auto-rotation and expiration settings; use GitHub's built-in secret scanning to detect exposed tokens in logs; enforce read-only scopes for GITHUB_TOKEN in Composer operations; implement aggressive log retention/deletion policies; use GitHub deploy keys instead of GITHUB_TOKEN for package manager authentication; monitor the Composer project for patch release announcements.

Threat Intelligence Overview

EPSS Score
0.1%
Top 81% exploitable
Threat Intel
1
1 source
Social Media
12
Sightings
Data Quality
4 sources
Confidence: Medium
EUVD NVD CVE.org EPSS GHSA Vendor CIRCL 12 sightings GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in PHP

View all
CVE-2019-11043 CRITICAL POC
9.8 Oct 28

In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it

CVE-2012-1823 CRITICAL POC
9.8 May 11

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2018-11138 CRITICAL POC
9.8 May 31

The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise High Performance Computing 15 SP7 SUSE Linux Enterprise Module for Web and Scripting 15 SP7 SUSE Linux Enterprise Server 15 SP7 SUSE Linux Enterprise Server for SAP Applications 15 SP7 Fixed
SUSE Linux Enterprise Server 15 SP6-LTSS Fixed
SUSE Linux Enterprise Server for SAP Applications 15 SP6 Fixed
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy