# CVE-2025-67746: Composer vulnerable to ANSI sequence injection

> Attackers can inject ANSI control characters into Composer terminal output, causing display corruption or denial of service.

- **Severity:** Low 1.3 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 30 Dec 2025
- **Updated:** 30 Dec 2025
- **Also known as:** BIT-composer-2025-67746, DEBIAN-CVE-2025-67746, GHSA-59pp-r3rg-353g, MINI-9q6x-466p-7x6x, MINI-gj2r-342r-cpvq, SUSE-SU-2026:0825-1, UBUNTU-CVE-2025-67746, openSUSE-SU-2026:10054-1

## What is CVE-2025-67746?

CVE-2025-67746 is a low-severity vulnerability in composer, published on 30 Dec 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Composer is a dependency manager for PHP. In versions on the 2.x branch prior to 2.2.26 and 2.9.3, attackers controlling remote sources that Composer downloads from might in some way inject ANSI control characters in the terminal output of various Composer commands, causing mangled output and potentially leading to confusion or DoS of the terminal application. There is no proven exploit and this has thus a low severity but we still publish a CVE as it has potential for abuse, and we want to be on the safe side informing users that they should upgrade. Versions 2.2.26 and 2.9.3 contain a patch for the issue.

Weakness: CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component)

## Which versions are affected by CVE-2025-67746?

5 open source packages ship an affected version, including composer/composer and composer. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `composer/composer` | Packagist | From 2.0.0 | 2.2.26 |
| `composer/composer` | Packagist | From 2.0.0 | 2.2.26 |
| `composer/composer` | Packagist | From 2.3.0 | 2.9.3 |
| `composer/composer` | Packagist | From 2.3.0 | 2.9.3 |
| `composer` | Bitnami | From 2.0.0 | 2.2.26, 2.9.3 |
| `php-composer2` | SUSE:Linux Enterprise Module for Web and Scripting 15 SP7 | All versions | 2.6.4-150600.3.6.1 |
| `php-composer2` | openSUSE:Leap 15.6 | All versions | 2.6.4-150600.3.6.1 |
| `php-composer2` | openSUSE:Tumbleweed | All versions | 2.9.3-1.1 |

Products: Getcomposer Composer.

## How do I fix CVE-2025-67746?

Upgrade composer/composer to a fixed version for your release line: 2.2.26 or 2.9.3.

## Is CVE-2025-67746 being exploited?

There is no known exploitation of CVE-2025-67746 in the wild and no public exploit code.

## Other vulnerabilities in composer

- [CVE-2026-40261](https://insights.sbomify.com/CVE-2026-40261/): Composer has Command Injection via Malicious Perforce Reference (high 8.8)
- [CVE-2024-24821](https://insights.sbomify.com/CVE-2024-24821/): Code execution and possible privilege escalation via compromised InstalledVersions.php or installed.php in Composer (high 8.8)
- [CVE-2015-8371](https://insights.sbomify.com/CVE-2015-8371/): Composer allows cache poisoning from other projects built on the same host (high 8.8)
- [CVE-2021-41116](https://insights.sbomify.com/CVE-2021-41116/): Command injection in composer on Windows (high 8.2)
- [CVE-2026-40176](https://insights.sbomify.com/CVE-2026-40176/): Composer is vulnerable to Command Injection via Malicious Perforce Repository (high 7.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-67746 and fix it if it is affected.

What it is: CVE-2025-67746 is a low-severity vulnerability in composer, published on 30 Dec 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-67746 in the wild and no public exploit code.

Affected packages and fixed versions:
- composer/composer (Packagist): affected from 2.0.0; fixed in 2.2.26
- composer/composer (Packagist): affected from 2.0.0; fixed in 2.2.26
- composer/composer (Packagist): affected from 2.3.0; fixed in 2.9.3
- composer/composer (Packagist): affected from 2.3.0; fixed in 2.9.3
- composer (Bitnami): affected from 2.0.0; fixed in 2.2.26, 2.9.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-67746/ (Markdown: https://insights.sbomify.com/CVE-2025-67746/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-67746
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-67746
- OSV: https://osv.dev/vulnerability/CVE-2025-67746

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-67746/
Summaries are generated and may contain mistakes; the official description above is the record.
