Description
Composer is a dependency Manager for the PHP language. Prior to 2.2.29 and 2.10.2, when Composer is run with -vvv debug verbosity, it could print a credential embedded in the username slot of a repository or package URL, such as a GitHub Personal Access Token in https://TOKEN@host/, to debug output because AuthHelper, Url::sanitize, and ProcessExecutor did not sanitize username-only URL credentials. This issue is fixed in versions 2.2.29 and 2.10.2.
Published: 2026-07-08
Score: 4.7 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Composer, the dependency manager for PHP, contains a flaw that writes the username portion of a repository or package URL to verbose logs when the -vvv debug flag is enabled. If the URL embeds a GitHub Personal Access Token (PAT) in the form https://TOKEN@host/, the token appears in plain text in the log output. This is a direct information‑disclosure vulnerability (CWE‑532) that could expose private tokens to anyone who can read console output or stored logs, potentially granting unauthorized access to GitHub.

Affected Systems

The issue exists in Composer releases older than 2.2.29 and 2.10.2. Any installation running an affected version with the -vvv debug flag is vulnerable. Upgrading to either 2.2.29 or the newer 2.10.2 branch removes the bug.

Risk and Exploitability

The CVSS score of 4.7 indicates medium impact limited to credential disclosure. The EPSS score of less than 1% suggests a very low probability of exploitation, and the vulnerability is not listed in CISA’s KEV catalog. The likely attack vector requires local or shared access to Composer logs; an attacker reading the console or log files could capture the leaked PAT, which could then be used to obtain broader access if the token authorisation is wide.

Generated by OpenCVE AI on July 29, 2026 at 13:41 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Composer to version 2.2.29 or newer, including 2.10.2, to eliminate the credential leak.
  • Avoid enabling the -vvv debug verbosity flag in production or sensitive environments; use standard verbosity unless debugging is essential.
  • Restrict access to Composer output and logs so that only trusted users can view console output or stored log files.

Generated by OpenCVE AI on July 29, 2026 at 13:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-g6xq-892h-64w3 Composer: URL-embedded HTTP-Basic username leaks to verbose logs (GitHub PAT exposure)
History

Fri, 10 Jul 2026 09:30:00 +0000

Type Values Removed Values Added
First Time appeared Getcomposer
Getcomposer composer
Vendors & Products Getcomposer
Getcomposer composer

Thu, 09 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 08 Jul 2026 19:45:00 +0000

Type Values Removed Values Added
Description Composer is a dependency Manager for the PHP language. Prior to 2.2.29 and 2.10.2, when Composer is run with -vvv debug verbosity, it could print a credential embedded in the username slot of a repository or package URL, such as a GitHub Personal Access Token in https://TOKEN@host/, to debug output because AuthHelper, Url::sanitize, and ProcessExecutor did not sanitize username-only URL credentials. This issue is fixed in versions 2.2.29 and 2.10.2.
Title Composer: URL-embedded HTTP-Basic username leaks to verbose logs (GitHub PAT exposure)
Weaknesses CWE-532
References
Metrics cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N'}


Subscriptions

Getcomposer Composer
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-09T14:01:42.612Z

Reserved: 2026-07-07T18:49:15.607Z

Link: CVE-2026-59947

cve-icon Vulnrichment

Updated: 2026-07-09T14:01:38.080Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-29T13:45:02Z

Weaknesses
  • CWE-532

    Insertion of Sensitive Information into Log File