Every CVE Search/ Get API key

CVE-2026-59948

Composer: Arbitrary file write outside vendor via malicious transitive package name

7.0 HighFix available

CVE-2026-59948 is a high vulnerability (CVSS 7.0) in Composer, published July 8, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.14%, the 3rd percentile. Fixed in composer/composer 2.10.2.

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.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
High
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

0.14%Unchanged since Jul 9, 2026
90%50%10%1%

What each source reports

CVE List Score used 7.0

Composer: Arbitrary file write outside vendor via malicious transitive package name

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.

Record
CVE-2026-59948
CVSS 3.1
7.0 HighCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-22, CWE-787
Updated
2026-11-02
EUVDEUVD-2026-42362 7.0

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.

Record
EUVD-2026-42362
CVSS 3.1
7.0 HighCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
GitHub AdvisoriesGHSA-499r-g7pc-vmp9 7.0

Composer: Arbitrary file write outside vendor via malicious transitive package name

Summary

A maliciously crafted package, published on an untrusted third party repository other than Packagist.org or Private Packagist, can cause Composer to write files outside the vendor/ directory and outside your project, with attacker-controlled content, during a normal install or update through using an invalid package name, which was not correctly validated by Composer.

This is an arbitrary file write that can be used to execute code outside the Composer project's context in which you expected the package code to execute (for example by writing shell startup files, SSH authorized_keys, or a cron entry). It is a supply-chain issue: it requires a malicious or compromised package to be present in the dependency graph, it is not otherwise remotely exploitable against a machine.

The fix makes Composer validate every package produced by dependency resolution before anything is written to composer.lock or installed, and abort with a security error if a package name is not a valid vendor/package name.

Am I affected?

You may be affected if you install packages from an untrusted third party repository, which does not sufficiently validate package names. Packagist.org and Private Packagist are safe, as they validate package names correctly.

Patched versions

Fixed in 2.2.29 and 2.10.2. Composer 1.x is also affected and you should move to a safe 2.x release.

Workarounds

Do not use untrusted package repositories. If you have to, mirror them through an internal repository like Private Packagist.

Record
GHSA-499r-g7pc-vmp9
CVSS 3.1
7.0 HighCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-22, CWE-787
Updated
2026-11-02
NVD 7.0

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.

Record
CVE-2026-59948
CVSS 3.1
7.0 HighCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-22, CWE-787
Updated
2026-11-02
OSV 7.0

Composer: Arbitrary file write outside vendor via malicious transitive package name

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.

Record
CVE-2026-59948
CVSS 3.1
7.0 HighCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-22, CWE-787
Updated
2026-11-02
OSVDEBIAN-CVE-2026-59948 7.0

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.

Record
DEBIAN-CVE-2026-59948
CVSS 3.1
7.0 HighCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
Show 10 moreShow less
OSVGHSA-499r-g7pc-vmp9 7.0

Composer: Arbitrary file write outside vendor via malicious transitive package name

Summary

A maliciously crafted package, published on an untrusted third party repository other than Packagist.org or Private Packagist, can cause Composer to write files outside the vendor/ directory and outside your project, with attacker-controlled content, during a normal install or update through using an invalid package name, which was not correctly validated by Composer.

This is an arbitrary file write that can be used to execute code outside the Composer project's context in which you expected the package code to execute (for example by writing shell startup files, SSH authorized_keys, or a cron entry). It is a supply-chain issue: it requires a malicious or compromised package to be present in the dependency graph, it is not otherwise remotely exploitable against a machine.

The fix makes Composer validate every package produced by dependency resolution before anything is written to composer.lock or installed, and abort with a security error if a package name is not a valid vendor/package name.

Am I affected?

You may be affected if you install packages from an untrusted third party repository, which does not sufficiently validate package names. Packagist.org and Private Packagist are safe, as they validate package names correctly.

Patched versions

Fixed in 2.2.29 and 2.10.2. Composer 1.x is also affected and you should move to a safe 2.x release.

Workarounds

Do not use untrusted package repositories. If you have to, mirror them through an internal repository like Private Packagist.

Record
GHSA-499r-g7pc-vmp9
CVSS 3.1
7.0 HighCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-22, CWE-787
Updated
2026-11-02
OSVUBUNTU-CVE-2026-59948 7.0

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.

Record
UBUNTU-CVE-2026-59948
CVSS 3.1
7.0 HighCVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVBIT-composer-2026-59948 No score

Composer: Arbitrary file write outside vendor via malicious transitive package name

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.

Record
BIT-composer-2026-59948
Updated
2026-11-02
OSVopenSUSE-SU-2026:11268-1 No score

php-composer2-2.10.2-1.1 on GA media

These are all security issues fixed in the php-composer2-2.10.2-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2026:11268-1
Updated
2026-11-02
OSVopenSUSE-SU-2026:21520-1 No score

Security update for php-composer2

This update for php-composer2 fixes the following issues:

  • CVE-2026-45793: Github Actions issued GITHUB_TOKEN disclosure in GitHub Actions logs (bsc#1271504).
  • CVE-2026-59946: path traversal in package bin field lets dependencies chmod arbitrary host files (bsc#1271151).
  • CVE-2026-59947: URL-embedded HTTP-Basic username leaks to verbose logs (bsc#1271129).
  • CVE-2026-59948: arbitrary file write outside vendordirectory via malicious transitive package name (bsc#1271122).

Changes for php-composer2:

  • fix byte-swapped signature on s390x can cause broken or unsupported signature (bsc#1271729).
Record
openSUSE-SU-2026:21520-1
Updated
2026-11-02
OSVSUSE-SU-2026:23116-1 No score

Security update for php-composer2

This update for php-composer2 fixes the following issues:

  • CVE-2026-45793: Github Actions issued GITHUB_TOKEN disclosure in GitHub Actions logs (bsc#1271504).
  • CVE-2026-59946: path traversal in package bin field lets dependencies chmod arbitrary host files (bsc#1271151).
  • CVE-2026-59947: URL-embedded HTTP-Basic username leaks to verbose logs (bsc#1271129).
  • CVE-2026-59948: arbitrary file write outside vendordirectory via malicious transitive package name (bsc#1271122).

Changes for php-composer2:

  • fix byte-swapped signature on s390x can cause broken or unsupported signature (bsc#1271729).
Record
SUSE-SU-2026:23116-1
Updated
2026-11-02
OSVSUSE-SU-2026:23138-1 No score

Security update for php-composer2

This update for php-composer2 fixes the following issues:

  • CVE-2026-45793: Github Actions issued GITHUB_TOKEN disclosure in GitHub Actions logs (bsc#1271504).
  • CVE-2026-59946: path traversal in package bin field lets dependencies chmod arbitrary host files (bsc#1271151).
  • CVE-2026-59947: URL-embedded HTTP-Basic username leaks to verbose logs (bsc#1271129).
  • CVE-2026-59948: arbitrary file write outside vendordirectory via malicious transitive package name (bsc#1271122).

Changes for php-composer2:

  • fix byte-swapped signature on s390x can cause broken or unsupported signature (bsc#1271729).
Record
SUSE-SU-2026:23138-1
Updated
2026-11-02
OSVSUSE-SU-2026:3105-1 No score

Security update for php-composer2

This update for php-composer2 fixes the following issues:

  • CVE-2026-45793: Github Actions issued GITHUB_TOKEN disclosure in GitHub Actions logs (bsc#1271504).
  • CVE-2026-59946: path traversal in package bin field lets dependencies chmod arbitrary host files (bsc#1271151).
  • CVE-2026-59947: URL-embedded HTTP-Basic username leaks to verbose logs (bsc#1271129).
  • CVE-2026-59948: arbitrary file write outside vendordirectory via malicious transitive package name (bsc#1271122).
Record
SUSE-SU-2026:3105-1
Updated
2026-11-02
OSVSUSE-SU-2026:4283-1 No score

Security update for php-composer2

This update for php-composer2 fixes the following issues:

  • CVE-2026-45793: GitHub OAuth tokens failing regex validation can cause credential disclosure (bsc#1271504).
  • CVE-2026-59944: path traversal and link following issue can make files world readable and executable (bsc#1279898).
  • CVE-2026-59946: package bin entries with path segments can cause unintended host file permission modifications (bsc#1271152).
  • CVE-2026-59947: unsanitized URL credential handling in debug output within Composer can allow sensitive token disclosure (bsc#1271130).
  • CVE-2026-59948: missing package name validation during dependency resolution in Composer can allow path traversal (bsc#1271123).
  • CVE-2026-84361: arbitrary code execution via malicious Perforce source URL (bsc#1278257).

Changes for php-composer2:

  • version update to 2.2.30:
  • Fixed command injection via malicious Perforce url (GHSA-rvx4-ffvw-m9q3)
  • Sanitize URL-embedded usernames/token in a few more places (#13045)
  • Fixed matching of gitlab URLs to avoid possible credential leak to the wrong domain (#13042)
  • fix a regression on s390x due last change (bsc#1271729).

  • version update to 2.2.29:

  • Validate package names (GHSA-499r-g7pc-vmp9)
  • Validate package bin paths against path traversal (GHSA-gjfg-22fp-rrxx)
  • Sanitize URL-embedded usernames/token in verbose output (GHSA-g6xq-892h-64w3)
  • Only follow HTTP redirects from HTTP responses (#12948)
  • Prevent phar metadata unserialization on unsafe PHP versions (#12946)
  • Sanitize JSON parse errors in http responses to avoid leaking response body data (#12959)
  • Fixed GitHub token validation to be even more relaxed (#12856)
  • version update to 2.2.28.
Record
SUSE-SU-2026:4283-1
Updated
2026-11-02
OSVSUSE-SU-2026:4589-1 No score

Security update for php-composer2

This update for php-composer2 fixes the following issues:

  • CVE-2026-59946: package bin entries with path segments can cause unintended host file permission modifications (bsc#1271152).
  • CVE-2026-59947: unsanitized URL credential handling in debug output within Composer can allow sensitive token disclosure (bsc#1271130).
  • CVE-2026-59948: missing package name validation during dependency resolution in Composer can allow path traversal (bsc#1271123).
Record
SUSE-SU-2026:4589-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
composer/composer
Packagist
2.3.0 up to 2.10.2
2.10.2
composer/composer
Packagist
1.0.0 up to 2.2.29
2.2.29
composer
Bitnami
1.0.0 up to 2.2.29, 2.3.0 up to 2.10.2
2.2.292.10.2
composer
Debian:12
All versions, plus listed versions
2.10.0-12.10.0~rc1-12.10.0~rc1-22.10.0~rc1-32.10.0~rc2-1
Show 45 moreShow less
2.10.1-12.10.1-22.10.2-12.10.3-12.5.5-12.5.5-1+deb12u12.5.5-1+deb12u22.5.5-1+deb12u32.5.5-1+deb12u42.5.5-1+deb12u52.5.6-12.5.7-12.5.8-12.6.2-12.6.3-12.6.4-12.6.5-12.6.6-12.7.1-12.7.1-22.7.2-12.7.4-12.7.6-12.7.6-22.7.6-32.7.7-12.7.7-22.7.8-12.7.9-12.8.0-12.8.1-12.8.10-12.8.11-12.8.11-22.8.12-12.8.2-12.8.3-12.8.4-12.8.4-22.8.4-32.8.5-12.8.6-12.8.8-12.8.9-12.9.0~rc1-1
None known
composer
Debian:13
All versions, plus listed versions
2.10.0-12.10.0~rc1-12.10.0~rc1-22.10.0~rc1-32.10.0~rc2-1
Show 21 moreShow less
2.10.1-12.10.1-22.10.2-12.10.3-12.8.10-12.8.11-12.8.11-22.8.12-12.8.8-12.8.8-1+deb13u12.8.8-1+deb13u22.8.8-1+deb13u32.8.9-12.9.0~rc1-12.9.1-12.9.2-12.9.3-12.9.4-12.9.5-12.9.7-12.9.8-1
None known
composer
Debian:14
before 2.10.2-1, plus listed versions
2.10.0-12.10.0~rc1-12.10.0~rc1-22.10.0~rc1-32.10.0~rc2-1
Show 16 moreShow less
2.10.1-12.10.1-22.8.10-12.8.11-12.8.11-22.8.12-12.8.8-12.8.9-12.9.0~rc1-12.9.1-12.9.2-12.9.3-12.9.4-12.9.5-12.9.7-12.9.8-1
2.10.2-1
composer/composer
Packagist
2.3.0 up to 2.10.2, plus listed versions
2.10.02.10.0-RC12.10.0-RC22.10.12.3.1
Show 45 moreShow less
2.3.102.3.22.3.32.3.42.3.52.3.62.3.72.3.82.3.92.4.02.4.0-RC12.4.12.4.22.4.32.4.42.5.02.5.12.5.22.5.32.5.42.5.52.5.62.5.72.5.82.6.02.6.12.6.22.6.32.6.42.6.52.6.62.7.02.7.12.7.22.7.32.7.42.7.52.7.62.7.72.7.82.7.92.8.02.8.12.8.102.8.11
2.10.2
composer/composer
Packagist
1.0.0 up to 2.2.29, plus listed versions
1.0.11.0.21.0.31.1.01.1.0-RC
Show 45 moreShow less
1.1.11.1.21.1.31.10.01.10.0-RC1.10.11.10.101.10.111.10.121.10.131.10.141.10.151.10.161.10.171.10.181.10.191.10.21.10.201.10.211.10.221.10.231.10.241.10.251.10.261.10.271.10.281.10.31.10.41.10.51.10.61.10.71.10.81.10.91.2.01.2.0-RC1.2.11.2.21.2.31.2.41.3.01.3.0-RC1.3.11.3.21.3.31.4.0
2.2.29
php-composer2
SUSE:Linux Enterprise Server 16.0
before 2.8.9-160000.4.1
2.8.9-160000.4.1
php-composer2
SUSE:Linux Enterprise Server for SAP applications 16.0
before 2.8.9-160000.4.1
2.8.9-160000.4.1
Show 29 moreShow less
Affected packages
PackageAffectedFixed
php-composer2
SUSE:Linux Enterprise Module for Web and Scripting 15 SP7
before 2.6.4-150600.3.12.1
2.6.4-150600.3.12.1
php-composer2
SUSE:Linux Enterprise Server 15 SP6-LTSS
before 2.6.4-150600.3.12.1
2.6.4-150600.3.12.1
php-composer2
SUSE:Linux Enterprise Server for SAP Applications 15 SP6
before 2.6.4-150600.3.12.1
2.6.4-150600.3.12.1
php-composer2
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS
before 2.2.30-150400.3.21.1
2.2.30-150400.3.21.1
php-composer2
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS
before 2.2.30-150400.3.21.1
2.2.30-150400.3.21.1
php-composer2
SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS
before 2.2.30-150400.3.21.1
2.2.30-150400.3.21.1
php-composer2
SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS
before 2.2.30-150400.3.21.1
2.2.30-150400.3.21.1
php-composer2
SUSE:Linux Enterprise Server 15 SP4-LTSS
before 2.2.30-150400.3.21.1
2.2.30-150400.3.21.1
php-composer2
SUSE:Linux Enterprise Server 15 SP5-LTSS
before 2.2.30-150400.3.21.1
2.2.30-150400.3.21.1
php-composer2
SUSE:Linux Enterprise Server for SAP Applications 15 SP4
before 2.2.30-150400.3.21.1
2.2.30-150400.3.21.1
php-composer2
SUSE:Linux Enterprise Server for SAP Applications 15 SP5
before 2.2.30-150400.3.21.1
2.2.30-150400.3.21.1
php-composer2
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS
before 2.2.30-150400.3.24.1
2.2.30-150400.3.24.1
php-composer2
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS
before 2.2.30-150400.3.24.1
2.2.30-150400.3.24.1
php-composer2
SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS
before 2.2.30-150400.3.24.1
2.2.30-150400.3.24.1
php-composer2
SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS
before 2.2.30-150400.3.24.1
2.2.30-150400.3.24.1
php-composer2
SUSE:Linux Enterprise Server 15 SP4-LTSS
before 2.2.30-150400.3.24.1
2.2.30-150400.3.24.1
php-composer2
SUSE:Linux Enterprise Server 15 SP5-LTSS
before 2.2.30-150400.3.24.1
2.2.30-150400.3.24.1
php-composer2
SUSE:Linux Enterprise Server for SAP Applications 15 SP4
before 2.2.30-150400.3.24.1
2.2.30-150400.3.24.1
php-composer2
SUSE:Linux Enterprise Server for SAP Applications 15 SP5
before 2.2.30-150400.3.24.1
2.2.30-150400.3.24.1
composer
Ubuntu:Pro:16.04:LTS
All versions, plus listed versions
1.0.0~alpha10+20150602-11.0.0~alpha10+20150602-21.0.0~alpha11-11.0.0~alpha11-1ubuntu11.0.0~alpha11-2
Show 5 moreShow less
1.0.0~alpha11-31.0.0~beta1-1ubuntu11.0.0~beta2-11.0.0~beta2-1ubuntu0.1~esm11.0.0~beta2-1ubuntu0.1~esm2
None known
composer
Ubuntu:Pro:18.04:LTS
All versions, plus listed versions
1.5.1-11.5.2-11.6.2-11.6.3-11.6.3-1ubuntu0.1~esm11.6.3-1ubuntu0.1~esm2
None known
composer
Ubuntu:Pro:20.04:LTS
All versions, plus listed versions
1.9.0-21.9.1-11.9.2-11.9.3-11.10.0-11.10.1-11.10.1-1ubuntu0.1~esm11.10.1-1ubuntu0.1~esm2
None known
composer
Ubuntu:Pro:22.04:LTS
All versions, plus listed versions
2.0.9-2ubuntu22.0.9-2ubuntu32.0.13-1ubuntu12.1.12-1ubuntu12.2.6-2ubuntu42.2.6-2ubuntu4+esm1
None known
composer
Ubuntu:Pro:24.04:LTS
All versions, plus listed versions
2.5.8-12.6.5-12.6.6-12.7.1-22.7.1-2ubuntu0.1~esm1
None known
composer
Ubuntu:25.10
All versions, plus listed versions
2.8.6-12.8.8-1
None known
composer
Ubuntu:26.10
All versions, plus listed versions
2.9.5-12.10.1-22.10.2-1
None known
composer
Ubuntu:26.04:LTS
All versions, plus listed versions
2.8.8-12.9.5-1
None known
php-composer2
openSUSE:Tumbleweed
before 2.10.2-1.1
2.10.2-1.1
php-composer2
openSUSE:Leap 16.0
before 2.8.9-160000.4.1
2.8.9-160000.4.1

History

History
WhenChangedSources
2026-11-02createdCVE List, EUVD, GitHub Advisories, NVD, OSV

References

Show 32 moreShow less
This page doesn't list everything

Left out here: 124 versions. The JSON record has them.

MoveEnter Open