{
  "id": "CVE-2026-46420",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-46420",
  "published_at": "2026-07-17T19:51:10.253Z",
  "title": "setup-php: Command Injection in Repository-Derived PHP Version Resolution",
  "vendor": "shivammathur",
  "product": "setup-php",
  "cvss": {
    "score": 9.8,
    "source": "nvd",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": {
    "created_at": "2026-07-18T22:27:39Z",
    "first_seen_at": "2026-11-14T14:50:35.824Z",
    "days_after_publication": 1.1,
    "repo": "Jvr2022/CVE-2026-46420",
    "source": "github"
  },
  "poc_repo_count": 1,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "setup-php is a GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and tools. From 2.25.0 prior to 2.37.1, shivammathur/setup-php resolves the PHP version from repository-controlled files such as .php-version, composer.lock through platform-overrides.php, and composer.json through config.platform.php, and insufficiently constrains those values before incorporating them into generated shell or PowerShell setup scripts, allowing command injection on a GitHub Actions runner when workflows such as pull_request_target check out attacker-controlled contents before invoking setup-php. This issue is fixed in version 2.37.1.",
  "cwe": "CWE-78",
  "cpes": [
    "cpe:2.3:a:shivammathur:setup_php:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 5.6,
    "nvd": 9.8
  },
  "repos": [
    {
      "repo": "Jvr2022/CVE-2026-46420",
      "url": "https://github.com/Jvr2022/CVE-2026-46420",
      "created_at": "2026-07-18T22:27:39Z",
      "first_seen_at": "2026-11-14T14:50:35.824Z",
      "stars": 1,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 15,
      "suspicious": false,
      "suspicion_reasons": [
        "no network code found (normal for a local exploit)"
      ],
      "status": "analyzed",
      "owner_created_at": "2022-07-10T14:13:42Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "shivammathur",
        "product": "setup-php",
        "ranges": [
          "\u003e= 2.25.0, \u003c 2.37.1"
        ],
        "fixed_in": [
          "2.37.1"
        ]
      }
    ],
    "upgrade": [
      "Upgrade setup-php to 2.37.1 or later."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://github.com/shivammathur/setup-php/security/advisories/GHSA-pqwm-q9pv-ph8r"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/shivammathur/setup-php/commit/eeef37e059fb5368a5bc8ed8ce45ff54bd39b80b"
      },
      {
        "kind": "Release notes",
        "url": "https://github.com/shivammathur/setup-php/releases/tag/2.37.1"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
