CVE-2026-45793: Composer sensitive information disclosure in GitHub token validation

CVE-2026-45793 · Severity: high · CVSS 7.5 · Published 2026-07-15

Composer, a widely used dependency manager for the PHP programming language, contains a flaw that can lead to the accidental exposure of GitHub authentication tokens. When using certain GitHub Actions tokens that contain hyphens, the software fails to validate them correctly and may print the full, sensitive token into system logs or error consoles. If these logs are accessible to unauthorized individuals or stored in public continuous integration (CI) environments, it could allow attackers to hijack GitHub sessions and access private code repositories.

Technologies: Composer (Packagist), composer/composer (Packagist). Vendors: Packagist.

Quick answers

Is CVE-2026-45793 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-45793 being exploited in the wild.
How severe is CVE-2026-45793?
High severity, with a CVSS score of 7.5, published 15 July 2026.
Which products and versions are affected?
Composer (Packagist) < 1.10.28, >= 2.0.0 < 2.2.28, >= 2.3.0 < 2.9.8, >= 2.3.0, < 2.9.8; >= 2.0.0, < 2.2.28; >= 1.0, < 1.10.28; composer/composer (Packagist) ECOSYSTEM:introduced=2.3.0,fixed=2.9.8.
Is there a fix for CVE-2026-45793?
Yes. composer/composer (Packagist): upgrade to 2.9.8 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-45793 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-45793?
Check whether you run Composer (Packagist) or composer/composer (Packagist) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • composer/composer (Packagist): upgrade to 2.9.8 or later
    composer require composer/composer:^2.9.8

Technical details

A vulnerability in Composer's `BaseIO::loadConfiguration()` method arises from an overly restrictive regular expression (`^[.A-Za-z0-9_]+$`) used to validate GitHub OAuth tokens. GitHub Actions `GITHUB_TOKEN` values using the `ghs_` format often contain hyphens, which fail this validation check. When validation fails, the rejected token is interpolated into an `UnexpectedValueException`, causing the plaintext sensitive token to be disclosed via stderr or CI logs. This exposure of sensitive information (CWE-200) allows anyone with access to build logs to obtain valid authentication credentials. The issue is resolved in versions 1.10.28, 2.2.28, and 2.9.8 by updating the validation logic and preventing token interpolation into exceptions.

Affected products

  • Composer Composer < 1.10.28, >= 2.0.0 < 2.2.28, >= 2.3.0 < 2.9.8

Identifiers

  • CVE-2026-45793
  • GHSA-f9f8-rm49-7jv2

Timeline

  • 2026-05-13: patched: Fixes merged into branches 1.10, 2.2, and 2.9
  • 2026-07-15: disclosed: CVE-2026-45793 published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.