Skip to main content

Composer CVE-2026-59948

| EUVDEUVD-2026-42362 HIGH
Path Traversal (CWE-22)
2026-07-08 GitHub_M GHSA-499r-g7pc-vmp9
7.0
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Attacker publishes malicious package on untrusted repository
  2. Delivery
    Victim adds repository and requires package
  3. Exploit
    Run composer install/update
  4. Execution
    Invalid package name bypasses validation
  5. Persist
    Path traversal writes file outside project
  6. Impact
    Dropped file enables code execution

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

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

Exploitation Conditions

Exploitation requires the victim to have configured a repository OTHER than Packagist.org or Private Packagist (an untrusted custom 'repositories' entry) and to install or update a maliciously crafted package whose invalid, unvalidated package name carries the traversal payload; the attack only fires when the developer or CI actually runs 'composer install' or 'composer update' (UI:R). Limiting factors: it does NOT work against the default trusted Packagist/Private Packagist configuration, the CVSS attack complexity is High and the vector is Local (AV:L), and it depends on the victim both trusting a hostile repository and executing a Composer operation - so realistic risk is confined to supply-chain, self-hosted-mirror, or targeted-setup situations rather than default-configuration remote exploitation.

Impact

The CVSS 3.1 vector CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H (7.0, High) reflects a locally-triggered, high-complexity attack that needs user interaction (running install/update) but no pre-existing privileges, with high confidentiality, integrity and availability impact once an attacker-controlled file is written outside the project. The realistic priority is moderate rather than urgent: the AC:H and UI:R metrics, combined with the description's precondition that the victim must already trust and configure a hostile non-Packagist repository, confine exploitation to supply-chain or targeted-setup scenarios rather than opportunistic mass exploitation. No EPSS score, KEV listing, POC, or SSVC decision data was provided in the input, so exploitation likelihood cannot be quantified - the absence of KEV/POC signals suggests no observed active exploitation, but that is inferred from missing data, not confirmed. The C:H/I:H/A:H rating is vendor/NVD-assigned; an arbitrary file write outside the project can plausibly escalate to code execution depending on where the file lands, which justifies the high impact metrics.

Exploit ScenarioDerived

An attacker publishes a package with a deliberately invalid, traversal-laden name on a third-party Composer repository and persuades a developer to add that repository and require the package (for example via a tutorial, fork, or compromised internal mirror). When the developer runs 'composer install' or 'composer update', Composer writes the attacker-controlled file outside vendor/ and outside the project - for instance dropping a script into a startup or webroot path - potentially leading to code execution. No public exploit code has been identified at time of analysis.

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 – Jul 08, 2026

Arbitrary file write in Composer (the PHP dependency manager) before 2.2.29 and 2.10.2 allows a malicious package served from an untrusted, third-party repository to write attacker-controlled files outside the vendor directory and outside the project root during an install or update. The flaw stems from an invalid package name that is not validated before dependency-resolution results are written to disk (CWE-22 path traversal), and no public exploit has been identified at time of analysis. Exploitation requires the victim to have configured a non-default, untrusted repository (not Packagist.org or Private Packagist) and to run composer install/update, so it is not a default-configuration remote attack.

RemediationAI

Vendor-released patch: upgrade Composer to 2.2.29 (if you must stay on the 2.2 LTS line) or 2.10.2 (current branch), per advisory GHSA-499r-g7pc-vmp9 (https://github.com/composer/composer/security/advisories/GHSA-499r-g7pc-vmp9); run 'composer self-update' or rebuild your CI/build image to pin one of these fixed versions. Until you can patch, the most effective compensating control is to restrict Composer to trusted repositories only - remove or avoid custom 'repositories' entries in composer.json that point to untrusted VCS/composer/path sources and rely solely on Packagist.org or Private Packagist, since the vulnerability cannot be triggered by packages from those trusted services; the trade-off is that legitimate use of self-hosted or third-party repositories is temporarily disabled. Additionally, run install/update inside isolated, least-privilege build containers so any file write escaping the project cannot reach sensitive host paths (trade-off: added CI/build tooling overhead). The underlying fix commits are 502c6c4f699802d9cf464728b3e8a95674f919a0 and c50b1efd13ebd73f6dca19b31424c5a02bf93cc1.

Affected VersionsENISA

composer 1.0, < 2.2.29
composer 2.3.0, < 2.10.2

Affected Packages

composer composer/composer fix: 2.2.29, 2.10.2
euvd composer_1_0 fix: 2.2.29
euvd composer_2_3_0 fix: 2.10.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 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, resolving and installing packages into a project's vendor/ directory based on composer.json and composer.lock. Package metadata - including the package name - is fetched from configured repositories and normally sourced from the trusted Packagist.org or Private Packagist services. Here, a package name is not correctly validated against Composer's naming rules before the resolved results are written or installed, so a crafted name containing path-traversal sequences causes install paths to escape vendor/ and the project directory (CWE-22, Improper Limitation of a Pathname to a Restricted Directory, 'path traversal'). The single affected CPE, cpe:2.3:a:composer:composer:*:*:*:*:*:*:*:*, covers the Composer application itself across all pre-fix versions on the two maintained branches (2.2.x and 2.10.x).

Know when Composer 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 (GitHub_M) PRIMARY 7.0 HIGH
AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.0 HIGH

Local trigger via running install/update (AV:L, UI:R); no prior privileges (PR:N) but a hostile non-default repository must be trusted, giving AC:H; arbitrary file write yields full C/I/A impact.

3.1 AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:H/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE HIGH
Red Hat 7.0 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

1
Patch available
Jul 08, 2026 - 21:04 EUVD

DescriptionCVE.org

Composer is a dependency Manager for the PHP language. Prior to 2.2.29 and 2.10.2, a maliciously crafted package from an untrusted repository other than Packagist.org or Private Packagist can cause Composer to write attacker-controlled files outside the vendor directory and outside the project during install or update by using an invalid package name that is not correctly validated before dependency-resolution results are written or installed. This issue is fixed in versions 2.2.29 and 2.10.2.

Executive ViewAI

Why It Matters

Composer, the PHP dependency manager, contains an arbitrary file write vulnerability affecting systems that use non-default third-party package repositories. Successful exploitation could allow attackers to inject malicious files into development and production environments, compromising code integrity and system security across PHP-based infrastructure.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: restrict Composer configuration to official repositories only (Packagist.org, Private Packagist); if third-party repositories are operationally necessary, enforce strict package verification, cryptographic hash validation, and mandatory code review before dependency installation; isolate composer install/update operations to controlled CI/CD environments with network segmentation; monitor and log all package installation activities.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
High
de facto dependency manager on nearly all PHP development and CI environments
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

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 Yes
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
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

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

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

CVE-2021-29472 HIGH POC
8.8 Apr 27

Composer is a dependency manager for PHP. Rated high severity (CVSS 8.8), this vulnerability is remotely exploitable, lo

CVE-2026-84361 HIGH POC
7.7 Sep 01

Command injection in PHP Composer's Perforce VCS handler allows arbitrary local command execution with the privileges of

CVE-2023-1596 MEDIUM POC
6.1 May 15

The tagDiv Composer WordPress plugin before 4.0 does not sanitise and escape a parameter before outputting it back in th

CVE-2021-41116 CRITICAL
9.8 Oct 05

Composer is an open source dependency manager for the PHP language. Rated critical severity (CVSS 9.8), this vulnerabili

CVE-2023-43655 HIGH
8.8 Sep 29

Composer is a dependency manager for PHP. Rated high severity (CVSS 8.8), this vulnerability is remotely exploitable, lo

CVE-2022-24828 HIGH
8.8 Apr 13

Composer is a dependency manager for the PHP programming language. Rated high severity (CVSS 8.8), this vulnerability is

CVE-2026-10043 HIGH
7.8 Jun 24

Arbitrary code execution in MosaicML Composer arises when the library loads a model or resumption checkpoint, because ch

CVE-2025-3510 MEDIUM
6.4 May 02

The tagDiv Composer plugin for WordPress is vulnerable to Stored Cross-Site Scripting via multiple shortcodes in all ver

CVE-2026-59946 MEDIUM
6.1 Jul 08

Path traversal in Composer's binary installation flow allows a malicious PHP package to cause arbitrary host files to be

CVE-2026-11914 MEDIUM
5.9 Jul 10

Improper input validation in the Drupal Composer contributed module (SA-contrib-2026-046) exposes sites to confidentiali

CVE-2026-109153 MEDIUM
5.3 Oct 13

Path traversal in MosaicML Composer 0.32.1 and earlier allows an attacker who supplies a crafted checkpoint archive to w

CVE-2026-59947 MEDIUM
4.7 Jul 08

Credential leakage in Composer PHP dependency manager exposes sensitive tokens - such as GitHub Personal Access Tokens e

Vendor StatusVendor

SUSE

Severity: Important
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