Wednesday, September 23, 2026

Composer Path Traversal Flaw Lets Malicious Packages Expose Sensitive Files

Composer users are urged to update their software following the disclosure of a path-traversal vulnerability. This flaw could allow a malicious or compromised PHP package to change file permissions outside of its own installation directory.

The vulnerability is tracked as CVE-2026-59944 and GHSA-96h3-5x6v-m776, affecting Composer versions 2.3.0 through 2.10.2 and versions 1.0 through 2.2.29.

Composer Path Traversal Flaw

The issue has been resolved in Composer versions 2.10.3 and 2.2.30. GitHub rates the severity of this vulnerability as Moderate and assigns it a CVSS v3.1 vector of CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N, indicating that exploitation requires local installation or update actions but can result in significant confidentiality impacts.

The vulnerability arises in Composer’s handling of binaries declared by installed packages. A malicious dependency may provide a binary path that resolves outside the package’s intended directory by exploiting path traversal or symbolic-link behaviors.

During installation, Composer can change permissions on the specified binary and register it as a runnable command in `vendor/bin`.

Before the patch, an attacker could misuse this process to direct Composer to a file outside the dependency’s own directory, allowing Composer to make that external file readable and executable by other users, depending on the permissions set during installation.

While the vulnerability does not directly enable remote code execution or automatically allow an attacker to retrieve files from a victim’s environment, it could reveal the contents of sensitive files on shared servers, multi-tenant hosting environments, or build systems where other local users can access files made world-readable.

The advisory notes that this vulnerability can bypass an earlier hardening measure introduced for GHSA-gjfg-22fp-rrxx. Although the earlier mitigation rejected literal “..” segments in declared package binaries, validation occurred only at a single point in the dependency resolution process.

Consequently, the protection could be bypassed when Composer rebuilt missing binaries from dependency metadata stored in `vendor/composer/installed.json` or when it followed a symbolic link that resolved to a path outside the package directory.

This issue is especially concerning when a project reuses a `vendor` directory that was not generated during the current trusted installation.

For example, this could include vendor directories restored from shared or untrusted CI caches, copied from a previous container build stage, inherited from an older Composer release, or modified by a lower-trust build process.

A realistic attack scenario involves a build or deployment pipeline running `composer install` against a reused `vendor` directory that contains tampered metadata or a malicious symlink.

Composer silently changes permissions using the privileges of the account executing the command. This means that a CI runner, deployment account, or shared hosting user could unintentionally alter access controls on files accessible via the crafted binary declaration.

The advisory connects the problem to CWE-22 (improper limitation of a pathname), CWE-59 (improper link resolution), and CWE-732 (incorrect permission assignment for a critical resource).

Composer now verifies that every declared binary resolves within the package being installed before modifying the target file. If a binary resolves outside that directory, Composer skips it and generates a warning.

Organizations are strongly advised to upgrade to Composer versions 2.10.3 or 2.2.30 immediately, as upgrading is the only complete solution to this issue.

Teams should also avoid restoring untrusted vendor directories, isolate CI caches by project and trust level, and regenerate dependencies from trusted lockfiles during production builds.

Prevent incidents due to slow investigations. Power your Tier 1 with threat intelligence from 15K SOCs: Integrate TI Lookup in your SOC

Divya
Divya
Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Hot this week

How To Access Dark Web Anonymously and know its Secretive and Mysterious Activities

What is Deep Web The deep web, invisible web, or...

How to Build and Run a Security Operations Center (SOC Guide) – 2023

Today’s Cyber security operations center (CSOC) should have everything...

Russian Hackers Bypass EDR to Deliver a Weaponized TeamViewer Component

TeamViewer's popularity and remote access capabilities make it an...

Web Server Penetration Testing Checklist – 2026

Web server pentesting is performed under three significant categories: identity,...

ATM Penetration Testing – Advanced Testing Methods to Find The Vulnerabilities

ATM Penetration testing, Hackers have found different approaches to...

ManageEngine RCE Flaw Enables SYSTEM Code Execution From Windows Login Screen

ManageEngine has addressed a critical remote code execution vulnerability...

Critical WordPress Flaw Lets Unauthenticated Attackers Execute Remote Code

WordPress has released version 7.1.2 to address a critical...

Microsoft SharePoint Flaw Lets Low-Privilege Attackers Execute Remote Code

A detailed Microsoft SharePoint vulnerability, tracked as CVE-2026-65660, allows...

ChatGPT Computer History Feature Creates New Data Theft Risk for macOS Infostealers

OpenAI's new ChatGPT Computer History feature for macOS aims...

Cisco Talos Launches CAIRN Tool to Hunt and Track AI-Integrated Malware

Cisco Talos has released CAIRN, an open-source research toolkit...

Related Articles

Recent News