| ID | PPSA-202611-2 |
|---|---|
| Published | 2026-11-19 |
| Private Packagist Cloud | Affected. Fixed on 2026-11-19. |
| Private Packagist Self-Hosted (KOTS) | Affected <= 2.0.39. Fixed in 2.0.40. |
| Private Packagist Self-Hosted (Helm) | Affected <= 2.0.39. Fixed in 2.0.40. |
Summary
Update Review wrote values from composer.lock into the markdown of its pull request comments without escaping them. A version or license could add table cells, rows, links, mentions of users and references to issues to the comment, and push the security advisory and malware markers and the links to the code changes out of the table.
Who was affected
Organizations on Private Packagist Cloud until the fix on November 19, 2026, and on Private Packagist Self-Hosted installations running a version before 2.0.40, if Update Review is enabled for a repository on GitHub, GitLab or Bitbucket, and a malicious user controls a value in the composer.lock of a pull request in that repository in one of these ways:
- The attacker opens or updates the pull request and writes the
composer.lockfile of the pull request. - The attacker publishes a release of a package that the pull request adds or updates, with a
versionin itscomposer.jsonthat has build metadata, the part after a+. Composer ignores the build metadata when it matches the version to the release tag, so the release is valid, butcomposer updatewrites the full version, build metadata included, intocomposer.lock. Packagist.org accepts such releases too. The build metadata cannot contain spaces or line breaks. - The attacker creates a branch in the repository of a package that the pull request adds or updates. Composer imports branches as development versions named after the branch, such as
dev-main, andcomposer updatewrites that name intocomposer.lockwhen the project requires the branch. Packagist.org imports such branches too. Git branch names cannot contain spaces or square brackets, so they cannot add links, but they can add table cells, mentions of users and references to issues. - The attacker publishes a release of a package that the pull request adds or updates, with a license that is not on the SPDX license list. Update Review showed such a license as written in the package. A package from a VCS repository or a third-party Composer repository can have a license with line breaks.
For a package the attacker publishes or creates a branch in, the pull request has to add or update that package to the attacker's release or branch, for example through a dependency update.
Impact
The Update Review comment that Private Packagist posts on the pull request could have shown content of the attacker's choice:
- Additional table cells, which push the markers for versions with known security advisories or flagged as malware, and the links to the code changes, out of the table, so that the platform does not show them.
- Additional table rows for package changes that are not part of the pull request, using a license with line breaks.
- Links to any website, for example in place of the link to the code changes.
- Mentions of users, which can notify them, and references to issues or merge requests in other projects, which add a reference to the pull request there.
A reviewer relying on the comment could have missed a vulnerable or malicious version, or followed a link to a website of the attacker. The attacker could not change the composer.lock file itself, which the pull request still showed with all its changes, and could not run code or access any data in Private Packagist or in the repository.
What we did
Update Review now escapes all values from composer.lock it shows in its comments, such as package names, versions, licenses and URLs, so that they cannot add table cells, rows, links or images. Line breaks are replaced with spaces, mentions of users and references to issues and merge requests are no longer linked, and the licenses of a package are cut off after 100 characters. The fix was deployed on Private Packagist Cloud on November 19, 2026, and released in Private Packagist Self-Hosted 2.0.40.
Do customers need to do anything
- Private Packagist Self-Hosted: Upgrade to 2.0.40 or any later version. We recommend upgrading to the latest release.
- Private Packagist Cloud: No action is required.
Credits
Thanks to andikafransisko for reporting this issue.
Start Free Trial
Login to create an organization and start your free trial!