Debian Patches

Status for composer/2.8.8-1+deb13u4

Patch Description Author Forwarded Bugs Origin Last update
0014-Revert-Add-workaround-for-InstalledVersion-to-ensure.patch Revert "Add workaround for InstalledVersion to ensure we always run last version"

This reverts commit d2cd6dec2d924aa725ccf080eb48086d7eac90f7.
David Prévot <taffit@debian.org> no vendor, https://github.com/composer/composer/commit/d2cd6dec2d924aa725ccf080eb48086d7eac90f7 2025-01-22
0015-Revert-Fix-regression-from-12233-in-InstalledVersion.patch Revert "Fix regression from #12233 in InstalledVersions when reload is used, fixes #12235"

This reverts commit ee6dc33fd10f550237da9fa2518f0741ca2c7698.
David Prévot <taffit@debian.org> no vendor, https://github.com/composer/composer/commit/ee6dc33fd10f550237da9fa2518f0741ca2c7698 2025-01-22
0016-Modernize-PHPUnit-syntax.patch Modernize PHPUnit syntax David Prévot <taffit@debian.org> no 2025-02-27
0017-Merge-commit-from-fork.patch Merge commit from fork Jordi Boggiano <j.boggiano@seld.be> yes debian upstream upstream, https://github.com/composer/composer/commit/5db1876a76fdef76d3c4f8a27995c434c7a43e71 2025-12-30
0018-Merge-commit-from-fork.patch Merge commit from fork Jordi Boggiano <j.boggiano@seld.be> yes debian upstream upstream, https://github.com/composer/composer/commit/91f077050c13e49e22554b991c81378ce8b5ee16 2026-04-14
0019-Merge-commit-from-fork.patch Merge commit from fork Jordi Boggiano <j.boggiano@seld.be> yes debian upstream upstream, https://github.com/composer/composer/commit/4f02616e6fba3b1baf8d45725f847841b44fc15c 2026-04-14
0020-ProcessExecutor-mask-GitHub-fine-grained-access-toke.patch ProcessExecutor: mask GitHub fine grained access tokens similar to URL (#12487) Stephan <glaubinix@users.noreply.github.com> no upstream, https://github.com/composer/composer/commit/af81eac1816effad4fa959eb79b73ba214254540 2025-08-21
0021-Fix-regexp-to-support-new-GitHub-installation-tokens.patch Fix regexp to support new GitHub installation tokens format (#12853) Philipp Scheit <p.scheit@packagist.com> yes upstream upstream, https://github.com/composer/composer/commit/37872360dc9c0f8befc12f741e98db2aa9b1827c 2026-05-13
0001-Use-homade-autoload-for-CLI.patch Use homade autoload for CLI David Prévot <david@tilapin.org> not-needed 2015-02-15
0002-Adapt-res-path.patch Adapt res/ path David Prévot <david@tilapin.org> not-needed 2015-02-15
0003-Mimic-distribution-path-for-tests-and-help2man.patch Mimic distribution path for tests and help2man David Prévot <david@tilapin.org> not-needed 2015-02-15
0004-Adapt-LICENSE-path.patch Adapt LICENSE path David Prévot <david@tilapin.org> not-needed 2015-11-18
0006-Tag-tests-relying-on-remote-network.patch Tag tests relying on remote network David Prévot <taffit@debian.org> no 2020-12-11
0007-Tag-test-relying-on-git-repository.patch Tag test relying on git repository David Prévot <taffit@debian.org> no 2017-08-06
0009-Skip-tests-failing-on-32-bit-architectures.patch Skip tests failing on 32-bit architectures David Prévot <taffit@debian.org> no 2021-12-25
0008-Change-return-type.patch Change return type
No idea why this doesn’t work as is.
David Prévot <taffit@debian.org> no 2022-05-26
0009-Workaround-dh_phpcomposer-limitations.patch Workaround dh_phpcomposer limitations David Prévot <taffit@debian.org> no debian 2022-06-18
0010-Skip-incompatible-test-with-Debian-installed-version.patch Skip incompatible test with Debian installed version David Prévot <taffit@debian.org> no 2024-03-12
0011-Make-provider-functions-static-PHPUnit-11-Fix.patch Make provider functions static (PHPUnit 11 Fix) David Prévot <taffit@debian.org> no debian 2024-05-20
0012-Group-nophpunit11-for-tests-failing-with-PHPUnit-11.patch Group nophpunit11 for tests failing with PHPUnit 11 David Prévot <taffit@debian.org> no debian 2024-05-20
0013-Order-changed.patch Order changed David Prévot <taffit@debian.org> no 2024-10-04
0022-Merge-commit-from-fork.patch Merge commit from fork
* Validate resolved packages before locking (GHSA-499r-g7pc-vmp9)

Add ValidatingArrayLoader::validatePackage() and call it from
LockTransaction::setResultPackages() so every package coming out of the
solver is re-checked before it is written to / installed from composer.lock.

Packages served by a repository are loaded via the non-validating
ArrayLoader, so the name and source/dist url+reference checks done in
load() never run on them. This re-applies the security-sensitive subset of
those checks at the lock transaction (hit by both update and install),
guarding against malicious package names and "-"-prefixed urls/references
that could be interpreted as command-line options (argument injection).

Test fixtures in SolverTest/InstallerTest that used shorthand package names
(A, B, ...) are renamed to valid vendor/name form so they pass validation.

* Validate package bin paths against path traversal (GHSA-gjfg-22fp-rrxx)

Reject bin entries containing ".." path segments in both
ValidatingArrayLoader::load() (so packagist.org and `composer validate`
flag them at publish time) and ValidatingArrayLoader::validatePackage()
(so every resolved package is re-checked before it is written to or
installed from the lock file, on both update and install).

Without this a dependency's bin entry such as "../../../../etc/shadow"
makes BinaryInstaller resolve a path outside the package directory and
chmod(0777 & ~umask()) an arbitrary host file during composer install.

https://github.com/composer/composer/security/advisories/GHSA-499r-g7pc-vmp9
https://security-tracker.debian.org/tracker/CVE-2026-59948
Jordi Boggiano <j.boggiano@seld.be> yes debian upstream upstream, https://github.com/composer/composer/commit/502c6c4f699802d9cf464728b3e8a95674f919a0 2026-07-01
0023-Relax-token-validation-on-input-and-hide-more-things.patch Relax token validation on input, and hide more things on output (#12886) Jordi Boggiano <j.boggiano@seld.be> no 2026-05-28
0024-Merge-commit-from-fork.patch Merge commit from fork
* Sanitize URL-embedded usernames/tokens in verbose output

AuthHelper::addAuthenticationOptions() wrote the HTTP-Basic username
verbatim to the -vvv debug log. When a token is embedded in the URL user
slot (e.g. https://ghp_TOKEN@host/...), it leaked in plaintext.

Url::sanitize() and ProcessExecutor only matched the user:password@ form,
so the documented user@ (no-password) form was not sanitized either.

Consolidate the masking decision into Url::sanitizeUsername(): GitHub
tokens and long hex strings keep only their first 3 chars, other 12char+
values keep their first 8, short values and well-known non-secret markers
(x-token-auth, gitlab-ci-token, ...) are shown verbatim. The marker list
is now a shared Url::NON_SECRET_CREDENTIALS constant reused by
Git::maskCredentials. AuthHelper's basic-auth display now runs through it.

* Mask long (12char+) usernames to first 3 chars too

Previously non-token 12char+ usernames kept their first 8 chars while
GitHub tokens kept only 3. Treat both the same: keep only the first 3
chars. The two branches now collapse into one condition.


p
Jordi Boggiano <j.boggiano@seld.be> yes debian upstream backport, https://github.com/composer/composer/commit/8887ad76fbd830cb1861a2b1fd8ead78ed1fa1ec 2026-07-01
0025-Merge-commit-from-fork.patch Merge commit from fork
* Prevent bin symlinks from escaping the package directory (GHSA-96h3-5x6v-m776)

The GHSA-gjfg-22fp-rrxx fix rejects literal ".." components in bin metadata,
but that only inspects the metadata string. A malicious package can declare a
clean bin (e.g. bin/pwn) while shipping bin/pwn as a symlink to
../../../../victim.sh. BinaryInstaller would follow the symlink and chmod /
proxy a file outside the package install directory.

Verify realpath($binPath) stays within realpath($installPath) before using the
bin, skipping it with a warning otherwise. Legitimate in-package symlinks and
path-repository symlink installs still resolve inside the package and are
unaffected.

* Also guard the FileDownloader bin chmod against escaping paths (GHSA-96h3-5x6v-m776)

FileDownloader::install() chmods the package's bins itself, for single-file dists
which cannot carry a mode. That loop never went through
ValidatingArrayLoader::validatePackage(), and composer reinstall builds its
operations straight from installed.json without ever solving, so a ".." bin there
still reached the chmod even with the BinaryInstaller check in place.

Extract the containment check into BinaryInstaller::isBinPathInsidePackage() and
use it in both sinks.
Jordi Boggiano <j.boggiano@seld.be> yes debian upstream backport, https://github.com/composer/composer/commit/53b8bb4c24697b2f00a18cf1ef35a10392701b89 2026-08-27
0026-Merge-commit-from-fork.patch Merge commit from fork
A package's source.url is handed to the p4 client as P4PORT. The client
documents `rsh:<cmd>`/`jsh:<cmd>` endpoints as "start <cmd> locally and speak
the protocol over its stdio", so a repository operator could publish a package
with source.type=perforce and source.url=rsh:... and get arbitrary command
execution as soon as the victim installed it from source. Argv escaping does
not help here: the execution is a semantic of the p4 client, not of the shell.

Add Perforce::isValidPort(), which accepts only the documented network forms
([tcp|ssl:][host:]port) and rejects the rsh:/jsh: transports outright, and
enforce it at three points:

- Perforce::__construct() throws, covering both PerforceDownloader (the attack
path) and PerforceDriver.
- Perforce::checkServerExists() returns false rather than throwing, as it is a
detection probe run against every VCS repository url when no driver matched.
- ValidatingArrayLoader, in load() so `composer validate` and packagist reject
such a package at publish time, and in validatePackage() so a package coming
from a repository or a crafted lock file fails before any p4 call.

testGenerateP4CommandEscapesPortInjection is replaced by an assertion that the
constructor now rejects that port outright.
Jordi Boggiano <j.boggiano@seld.be> yes upstream backport, https://github.com/composer/composer/commit/0aac50528e83ed635cf788333635897469440220 2026-08-27
0027-Modernize-PHPUnit-syntax.patch Modernize PHPUnit syntax David Prévot <taffit@debian.org> no 2025-08-29

All known versions for source package 'composer'

Links