# CVE-2026-59947: Composer sensitive information disclosure in verbose debug output

Source: https://junglewise.ai/threats/cve-2026-59947-composer-sensitive-information-disclosure-in-verbose-debug-output  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-08. Updated: 2026-07-20  
License: CC BY 4.0 with a link back

CVE-2026-59947 · Severity: medium · CVSS 4.7 · Published 2026-07-08

Composer, a popular dependency manager for PHP, contains a vulnerability where sensitive credentials like GitHub access tokens can be leaked into log files. When the tool is run in high-verbosity debug mode, it may print these secrets in plain text if they are embedded in repository URLs. This could allow anyone with access to build logs or CI/CD output to steal credentials and gain unauthorized access to private code repositories.

Technologies: [Composer (Packagist)](https://junglewise.ai/threats/technologies/composer), [composer/composer (Packagist)](https://junglewise.ai/threats/technologies/composer-composer). Vendors: [Packagist](https://junglewise.ai/threats/vendors/packagist).

## Quick answers

**Is CVE-2026-59947 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-59947 being exploited in the wild.

**How severe is CVE-2026-59947?** Medium severity, with a CVSS score of 4.7, published 8 July 2026.

**Which products and versions are affected?** Composer (Packagist) >= 1.0, < 2.2.29; >= 2.3.0, < 2.10.2, >= 1.0.0, < 2.2.29; composer/composer (Packagist) ECOSYSTEM:introduced=2.3.0,fixed=2.10.2.

**Is there a fix for CVE-2026-59947?** Yes. composer/composer (Packagist): upgrade to 2.10.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-59947 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-59947?** 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.10.2 or later

  ```sh
  composer require composer/composer:^2.10.2
  ```


## Technical details

Composer versions prior to 2.10.2 and 2.2.29 fail to mask the username portion of HTTP Basic Auth credentials when embedded in repository or package URLs. While the password field was previously masked, many services (like GitHub) allow authentication tokens to be placed in the username field (e.g., https://TOKEN@github.com). When Composer is executed with maximum verbosity (-vvv), these tokens are written to the debug output in clear text. An attacker with local access or access to shared build artifacts (like CI logs) can retrieve these tokens. The issue is fixed in versions 2.10.2 and 2.2.29 by applying masking to the username field in debug output.

## Affected products

- Composer Composer >= 1.0.0, < 2.2.29
- Composer Composer >= 2.3.0, < 2.10.2

## Identifiers

- CVE-2026-59947
- GHSA-g6xq-892h-64w3

## Timeline

- 2026-07-01: disclosed: Initial disclosure by reporter
- 2026-07-08: advisory: NVD publication date
- 2026-07-20: advisory: GitHub Advisory published
- 2026-07-20: patched: Patched versions 2.10.2 and 2.2.29 confirmed

## References

- [https://api.github.com/users/iliaal](https://api.github.com/users/iliaal)
- [https://github.com/iliaal](https://github.com/iliaal)
- [https://api.github.com/users/iliaal/gists%7B/gist_id%7D](https://api.github.com/users/iliaal/gists%7B/gist_id%7D)
- [https://api.github.com/users/iliaal/repos](https://api.github.com/users/iliaal/repos)
- [https://avatars.githubusercontent.com/u/158724?v=4](https://avatars.githubusercontent.com/u/158724?v=4)
- [https://api.github.com/users/iliaal/events%7B/privacy%7D](https://api.github.com/users/iliaal/events%7B/privacy%7D)

## Related threats

- [Composer bin path validation bypass via symlinks](https://junglewise.ai/threats/cve-2026-59944-composer-bin-path-validation-bypass-via-symlinks)
- [Composer arbitrary command execution via malicious Perforce source URL](https://junglewise.ai/threats/cve-2026-84361-composer-arbitrary-command-execution-via-malicious-perforce)
- [Composer sensitive information disclosure in GitHub token validation](https://junglewise.ai/threats/cve-2026-45793-composer-sensitive-information-disclosure-in-github-token)
- [Composer path traversal via malicious package name](https://junglewise.ai/threats/cve-2026-59948-composer-path-traversal-via-malicious-package-name)
- [Composer path traversal in package bin field](https://junglewise.ai/threats/cve-2026-59946-composer-path-traversal-in-package-bin-field)
