Skip to content

← Public intelligence

GitHub Actions package

shivammathur/setup-php

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

2 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 5.9GitHub ActionsPublished

    Setup PHP: GitHub tokens configured by setup-php may be exposed through pinned affected Composer versions

    GHSA-5wxr-w449-57cm

    Affected
    • GitHub Actions shivammathur/setup-php < 2.37.1
    Fixed in
    2.37.1· Vendor fix available
    Issue
    Impact This affects only workflows that pin an exact affected Composer semver version through setup-php, for example tools: composer:2.9.7. Workflows using the default Composer version, composer:v2, or no pinned Composer version are not affected through setup-php, because those Composer URLs have been updated to patched Composer releases for all setup-php versions. setup-php does not directly print the token. The token may be exposed through Composer when Composer validates github-oauth auth and rejects GitHub's newer hyphen-containing token format. Public repository logs may expose the token. GitHub-hosted runner GITHUBTOKEN values expire after the job, but exposure may still matter during the token lifetime and for longer-lived GitHub App or user tokens. Patches setup-php 2.37.1 skips generated GitHub OAuth auth for pinned Composer versions affected by Composer GHSA-f9f8-rm49-7jv2 while preserving other Composer auth, including Packagist auth. Workarounds Upgrade to setup-php…

    Recommended action: Upgrade to 2.37.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  2. Medium, CVSS 5.6GitHub ActionsPublished

    Setup PHP: Command Injection in Repository-Derived PHP Version Resolution

    CVE-2026-46420 · GHSA-pqwm-q9pv-ph8r

    Affected
    • GitHub Actions shivammathur/setup-php >= 2.25.0, < 2.37.1
    Fixed in
    2.37.1· Vendor fix available
    Issue
    A command injection vulnerability was identified in shivammathur/setup-php when the action resolves the PHP version from repository-controlled files and uses that value while generating the platform setup script. In affected versions, setup-php may read the PHP version from: - .php-version - composer.lock via platform-overrides.php - composer.json via config.platform.php If an attacker can influence one of these files and the workflow executes setup-php in a trusted context, they may be able to execute commands on the GitHub Actions runner. Impact This issue is exploitable when setup-php is run after checking out attacker-controlled repository contents and resolves the PHP version from repository files. The most significant example is a privileged workflow such as pullrequesttarget that checks out untrusted pull request code before invoking setup-php. Similar risk can also arise in other workflows that operate on attacker-controlled refs, branches, or repository contents in a…

    Recommended action: Upgrade to 2.37.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →