Security advisories
SBOMIFY-SA-2026-0006

Command injection in Composer used by sbomify Action for PHP projects (CVE-2026-40176)

sbomify Action v26.8.0 to v26.10.2 ran Composer 2.9.4 from its php tool bundle when scanning PHP projects without a composer.lock. That version allows command injection from a crafted composer.json (CVE-2026-40176, CVE-2026-40261). The bundle was fixed with Composer 2.10.3 on 2026-10-26 for every Action release; persisted tool caches must be cleared.

High Resolved
CVSS 8.8 CVE ID CVE-2026-40176 Published 2 Nov 2026 Updated

Am I affected?

sbomify Action

Fixed

Upgrade to sbomify Action v26.10.3 or later. It pins sbom-tools v26.10.3, whose php bundle ships Composer 2.10.3. Earlier releases download the rolling php bundle, which has carried Composer 2.10.3 since 2026-10-26. Self-hosted runners that persist the sbomify tool cache should delete bundle-php-tools-rolling-*.

Affected versions

  • v26.10.2
  • v26.10.1
  • v26.10.0
  • v26.9.0
  • v26.8.0
  • Before v26.10.3

Description

Summary

Command injection in Composer, which sbomify Action runs while generating SBOMs for PHP projects.

sbomify Action downloads a php tool bundle from sbomify/sbom-tools at run time. When a scanned PHP project has a composer.json but no composer.lock, cdxgen runs Composer from that bundle to resolve the dependencies. From 2026-08-08 until 2026-10-26 the bundle shipped Composer 2.9.4, which is affected by:

  • CVE-2026-40176 (GHSA-wg36-wvj6-r67p, CVSS 3.1 7.8): command injection through Perforce connection parameters in a VCS repository declared in composer.json.
  • CVE-2026-40261 (GHSA-gqw4-4w2p-838q, CVSS 3.1 8.8): command injection through a malicious Perforce reference.
  • CVE-2026-84361 (GHSA-rvx4-ffvw-m9q3) and CVE-2026-59948 (GHSA-499r-g7pc-vmp9): command execution through a package's Perforce source URL, and file writes outside the vendor directory through a malicious package name.

Affected

  • sbomify Action v26.8.0, v26.9.0, v26.10.0, v26.10.1 and v26.10.2, when generating an SBOM for a PHP project without a composer.lock, until the php tool bundle was rebuilt on 2026-10-26. Every release fetches the bundle from the tools-rolling release of sbomify/sbom-tools at run time.
  • Projects that commit a composer.lock are not affected: cdxgen reads the lockfile as data and does not run Composer.
  • Other ecosystems are not affected.

Impact

Composer's advisories cover running Composer on an untrusted project. In sbomify Action, that is a composer.json the workflow's own maintainers do not control. Examples are a pull request from a fork that the workflow scans, or a third-party project or submodule. A composer.json that declares a Perforce VCS repository with crafted parameters runs arbitrary shell commands in the CI job, with that job's environment and credentials. A malicious package source reference from a repository the project uses can do the same. We have found no evidence that this happened.

Remediation

  • Fix: https://github.com/sbomify/sbom-tools/pull/51 moves the php bundle to Composer 2.10.3, which fixes all four advisories. The tools-rolling bundle was rebuilt from it on 2026-10-26, and running composer --version from the published bundle reports 2.10.3.
  • Users: no Action upgrade is needed, because every release now downloads the fixed bundle. However, the action reuses a bundle it has already downloaded. If your runner keeps the sbomify tool cache between jobs (a self-hosted runner, or a persisted SBOMIFY_TOOL_CACHE, XDG_CACHE_HOME or HOME), delete the bundle-php-tools-rolling-* directory under sbomify/runtimes (or under SBOMIFY_TOOL_CACHE) so the next run downloads it. GitHub-hosted runners start clean and need no action.

References

CVE-2026-40176

CVSS 3.1: 8.8

Timeline

Last updated 1 week ago

  1. Published

    1 week ago 4 days later

    Published as SBOMIFY-SA-2026-0006 (public).

  2. Update

    2 weeks ago 3 days later

    sbomify Action v26.10.3 is released. It pins sbom-tools v26.10.3, and its php bundle ships Composer 2.10.3, checked in the published php-linux-amd64.tar.gz (composer --version reports 2.10.3). Fixed version set to v26.10.3.

  3. Resolved

    2 weeks ago moments later

    Fixed for every sbomify Action release: the php tool bundle in sbomify/sbom-tools tools-rolling was rebuilt on 2026-10-26 from https://github.com/sbomify/sbom-tools/pull/51 with Composer 2.10.3 (verified with composer --version on the published bundle). Runners that persist the sbomify tool cache should delete bundle-php-tools-rolling-*.

  4. Fix in progress

    2 weeks ago first entry