{
  "id": "CVE-2017-9841",
  "url": "https://poc.griffinguard.io/cve/CVE-2017-9841",
  "published_at": "2017-06-27T17:00:00Z",
  "title": "PHPUnit Command Injection Vulnerability",
  "vendor": "PHPUnit",
  "product": "PHPUnit",
  "cvss": {
    "score": 9.8,
    "source": "cisa-adp",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": true,
    "added_at": "2022-02-15",
    "known_ransomware_campaign_use": "Unknown",
    "days_after_publication": 1694
  },
  "first_poc": {
    "created_at": "2020-01-06T23:27:15Z",
    "first_seen_at": "2026-11-14T11:25:11.578Z",
    "days_after_publication": 923.3,
    "repo": "mbrasile/CVE-2017-9841",
    "source": "github"
  },
  "poc_repo_count": 20,
  "exploit_count": 2,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP code via HTTP POST data beginning with a \"\u003c?php \" substring, as demonstrated by an attack on a site with an exposed /vendor folder, i.e., external access to the /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php URI.",
  "cwe": "CWE-94",
  "cvss_by_source": {
    "cisa-adp": 9.8
  },
  "repos": [
    {
      "repo": "K3ysTr0K3R/CVE-2017-9841-EXPLOIT",
      "url": "https://github.com/K3ysTr0K3R/CVE-2017-9841-EXPLOIT",
      "created_at": null,
      "first_seen_at": "2026-11-14T23:12:49.679Z",
      "stars": 0,
      "is_poc": "unknown",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "skipped"
    },
    {
      "repo": "Pwdnx1337/CVE-2017-9841",
      "url": "https://github.com/Pwdnx1337/CVE-2017-9841",
      "created_at": null,
      "first_seen_at": "2026-11-14T23:12:49.679Z",
      "stars": 0,
      "is_poc": "unknown",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "skipped"
    },
    {
      "repo": "yoloskr/CVE-2017-9841-Scan",
      "url": "https://github.com/yoloskr/CVE-2017-9841-Scan",
      "created_at": null,
      "first_seen_at": "2026-11-14T23:12:49.679Z",
      "stars": 0,
      "is_poc": "unknown",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "skipped"
    },
    {
      "repo": "mbrasile/CVE-2017-9841",
      "url": "https://github.com/mbrasile/CVE-2017-9841",
      "created_at": "2020-01-06T23:27:15Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "yes",
      "kind": "listed by PoC Index",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2012-12-18T10:54:25Z"
    },
    {
      "repo": "RandomRobbieBF/phpunit-brute",
      "url": "https://github.com/RandomRobbieBF/phpunit-brute",
      "created_at": "2020-05-18T20:55:05Z",
      "first_seen_at": "2026-11-14T14:50:35.824Z",
      "stars": 28,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2019-06-11T20:42:27Z"
    },
    {
      "repo": "cyberharsh/Php-unit-CVE-2017-9841",
      "url": "https://github.com/cyberharsh/Php-unit-CVE-2017-9841",
      "created_at": "2020-06-24T09:37:04Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2019-11-06T07:47:57Z"
    },
    {
      "repo": "ludy-dev/PHPUnit_eval-stdin_RCE",
      "url": "https://github.com/ludy-dev/PHPUnit_eval-stdin_RCE",
      "created_at": "2020-09-14T12:33:44Z",
      "first_seen_at": "2026-11-14T14:50:35.824Z",
      "stars": 6,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 15,
      "suspicious": false,
      "suspicion_reasons": [
        "owner account created less than 30 days before the repo"
      ],
      "status": "analyzed",
      "owner_created_at": "2020-08-30T08:00:41Z"
    },
    {
      "repo": "incogbyte/laravel-phpunit-rce-masscaner",
      "url": "https://github.com/incogbyte/laravel-phpunit-rce-masscaner",
      "created_at": "2021-07-04T16:15:27Z",
      "first_seen_at": "2026-11-14T14:50:35.824Z",
      "stars": 23,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2019-08-03T15:17:22Z"
    },
    {
      "repo": "akr3ch/CVE-2017-9841",
      "url": "https://github.com/akr3ch/CVE-2017-9841",
      "created_at": "2022-03-20T07:01:52Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 3,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2022-01-07T15:12:44Z"
    },
    {
      "repo": "p1ckzi/CVE-2017-9841",
      "url": "https://github.com/p1ckzi/CVE-2017-9841",
      "created_at": "2022-04-09T11:12:58Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 3,
      "is_poc": "no",
      "kind": "writeup",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2018-11-08T20:22:25Z"
    },
    {
      "repo": "jax7sec/CVE-2017-9841",
      "url": "https://github.com/jax7sec/CVE-2017-9841",
      "created_at": "2022-04-20T07:01:20Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 15,
      "suspicious": false,
      "suspicion_reasons": [
        "owner account created less than 30 days before the repo"
      ],
      "status": "analyzed",
      "owner_created_at": "2022-03-21T15:20:28Z"
    },
    {
      "repo": "mileticluka1/eval-stdin",
      "url": "https://github.com/mileticluka1/eval-stdin",
      "created_at": "2022-10-20T19:05:12Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "fake",
      "kind": "fake",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2022-08-27T14:09:31Z"
    },
    {
      "repo": "Jhonsonwannaa/CVE-2017-9841-",
      "url": "https://github.com/Jhonsonwannaa/CVE-2017-9841-",
      "created_at": "2022-11-21T16:36:48Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 1,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2022-10-01T23:03:48Z"
    },
    {
      "repo": "dream434/CVE-2017-9841",
      "url": "https://github.com/dream434/CVE-2017-9841",
      "created_at": "2022-11-21T16:36:48Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 1,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2022-10-01T23:03:48Z"
    },
    {
      "repo": "dream434/CVE-2017-9841-",
      "url": "https://github.com/dream434/CVE-2017-9841-",
      "created_at": "2022-11-21T16:36:48Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 1,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2022-10-01T23:03:48Z"
    },
    {
      "repo": "MadExploits/PHPunit-Exploit",
      "url": "https://github.com/MadExploits/PHPunit-Exploit",
      "created_at": "2022-12-07T11:26:16Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 5,
      "is_poc": "yes",
      "kind": "listed by PoC Index",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2021-03-17T11:49:05Z"
    },
    {
      "repo": "MrG3P5/CVE-2017-9841",
      "url": "https://github.com/MrG3P5/CVE-2017-9841",
      "created_at": "2023-03-13T07:42:32Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 4,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2019-11-10T15:09:34Z"
    },
    {
      "repo": "Chocapikk/CVE-2017-9841",
      "url": "https://github.com/Chocapikk/CVE-2017-9841",
      "created_at": "2023-08-27T21:20:19Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 7,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2021-08-06T09:10:49Z"
    },
    {
      "repo": "Mariam-kabu/cybersec-labs",
      "url": "https://github.com/Mariam-kabu/cybersec-labs",
      "created_at": "2024-04-22T11:55:43Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 1,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2021-04-11T18:56:00Z"
    },
    {
      "repo": "moonwayy/hindicybersec",
      "url": "https://github.com/moonwayy/hindicybersec",
      "created_at": "2024-04-22T11:55:43Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 1,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2021-04-11T18:56:00Z"
    },
    {
      "repo": "marvinoon/P1BG3-ExploitScan",
      "url": "https://github.com/marvinoon/P1BG3-ExploitScan",
      "created_at": "2025-02-25T07:17:18Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2023-08-28T16:23:22Z"
    },
    {
      "repo": "joelindra/CVE-2017-9841",
      "url": "https://github.com/joelindra/CVE-2017-9841",
      "created_at": "2025-04-22T01:31:34Z",
      "first_seen_at": "2026-11-14T14:50:35.824Z",
      "stars": 1,
      "is_poc": "no",
      "kind": "list",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2018-10-15T16:27:28Z"
    },
    {
      "repo": "drcrypterdotru/PHPUnit-GoScan",
      "url": "https://github.com/drcrypterdotru/PHPUnit-GoScan",
      "created_at": "2025-08-30T12:59:47Z",
      "first_seen_at": "2026-11-14T14:50:35.824Z",
      "stars": 5,
      "is_poc": "yes",
      "kind": "scanner",
      "suspicion_score": 35,
      "suspicious": false,
      "suspicion_reasons": [
        "README asks to download a release/binary/archive"
      ],
      "status": "analyzed",
      "owner_created_at": "2024-09-17T15:20:17Z"
    },
    {
      "repo": "krisdewa/CVE-2017-9841-PHPUnit-Remote-Code-Execution-PoC",
      "url": "https://github.com/krisdewa/CVE-2017-9841-PHPUnit-Remote-Code-Execution-PoC",
      "created_at": "2026-06-11T05:59:55Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2019-12-23T15:24:39Z"
    },
    {
      "repo": "CyberCTF/vulhub-phpunit-cve-2017-9841",
      "url": "https://github.com/CyberCTF/vulhub-phpunit-cve-2017-9841",
      "created_at": "2026-10-08T20:52:21Z",
      "first_seen_at": "2026-11-14T14:50:35.824Z",
      "stars": 0,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2024-12-01T11:12:42Z"
    },
    {
      "repo": "lnlight05/Information-Security-Work1",
      "url": "https://github.com/lnlight05/Information-Security-Work1",
      "created_at": "2026-10-20T02:57:02Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 0,
      "suspicious": false,
      "suspicion_reasons": [],
      "status": "analyzed",
      "owner_created_at": "2023-08-15T03:40:09Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "",
        "product": "phpunit/phpunit",
        "ranges": [
          "\u003e= 4.8.19, \u003c 4.8.28"
        ],
        "fixed_in": [
          "4.8.28"
        ],
        "ecosystem": "Packagist",
        "advisory": "GHSA-r7c9-c69m-rph8"
      },
      {
        "vendor": "",
        "product": "phpunit/phpunit",
        "ranges": [
          "\u003e= 5.0.10, \u003c 5.6.3"
        ],
        "fixed_in": [
          "5.6.3"
        ],
        "ecosystem": "Packagist",
        "advisory": "GHSA-r7c9-c69m-rph8"
      }
    ],
    "upgrade": [
      "Upgrade phpunit/phpunit to 4.8.28 or later.",
      "Upgrade phpunit/phpunit to 5.6.3 or later."
    ]
  },
  "exploit_refs": [
    {
      "url": "https://www.exploit-db.com/exploits/50702",
      "source": "exploitdb",
      "title": "PHP Unit 4.8.28 - Remote Code Execution (RCE) (Unauthenticated)",
      "published_at": "2022-02-02T00:00:00Z",
      "first_seen_at": "2026-11-14T10:26:36.149Z"
    },
    {
      "url": "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2017/CVE-2017-9841.yaml",
      "source": "nuclei",
      "title": "nuclei template: PHPUnit - Remote Code Execution",
      "published_at": "2023-04-27T04:28:59Z",
      "first_seen_at": "2026-11-14T10:26:36.149Z"
    }
  ],
  "hunt_profile": [
    {
      "method": "POST",
      "path_template": "/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php",
      "body_markers": [
        "\u003c?php echo '[S]'; echo(shell_exec('",
        "\u003c?php system('id'); ?\u003e",
        "\u003c?php echo 'PWNED-'.(7*7); ?\u003e="
      ],
      "content_type": "application/x-www-form-urlencoded",
      "ports": [
        5000,
        8080
      ],
      "protocol": "http",
      "repos": [
        "Chocapikk/CVE-2017-9841",
        "Jhonsonwannaa/CVE-2017-9841-",
        "dream434/CVE-2017-9841",
        "dream434/CVE-2017-9841-",
        "lnlight05/Information-Security-Work1"
      ],
      "repo_count": 5,
      "confidence": 0.7,
      "evidence": [
        "Chocapikk/CVE-2017-9841/exploit.py:28",
        "Jhonsonwannaa/CVE-2017-9841-/app.py:23",
        "dream434/CVE-2017-9841/app.py:23",
        "dream434/CVE-2017-9841-/app.py:23",
        "lnlight05/Information-Security-Work1/README.md:170",
        "lnlight05/Information-Security-Work1/README.md:244"
      ]
    },
    {
      "method": "GET",
      "path_template": "/",
      "query_markers": [
        "q=",
        "file=../../../../etc/passwd",
        "cmd=whoami"
      ],
      "body_markers": [
        "\u003c?php echo md5(phpunit_rce); ?\u003e"
      ],
      "content_type": "text/html",
      "user_agents": [
        "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0"
      ],
      "protocol": "https",
      "repos": [
        "MrG3P5/CVE-2017-9841",
        "marvinoon/P1BG3-ExploitScan"
      ],
      "repo_count": 2,
      "confidence": 0.7,
      "evidence": [
        "MrG3P5/CVE-2017-9841/main.py:35",
        "marvinoon/P1BG3-ExploitScan/background.js:45",
        "marvinoon/P1BG3-ExploitScan/background.js:71",
        "marvinoon/P1BG3-ExploitScan/background.js:150",
        "marvinoon/P1BG3-ExploitScan/background.js:167"
      ]
    },
    {
      "method": "GET",
      "path_template": "/dashboard",
      "headers": [
        {
          "name": "Cookie",
          "value": "data={var}"
        }
      ],
      "ports": [
        32409
      ],
      "protocol": "http",
      "repos": [
        "Mariam-kabu/cybersec-labs",
        "moonwayy/hindicybersec"
      ],
      "repo_count": 2,
      "confidence": 0.7,
      "evidence": [
        "Mariam-kabu/cybersec-labs/Payload.py:12",
        "moonwayy/hindicybersec/Payload.py:12"
      ]
    },
    {
      "method": "GET",
      "path_template": "/api/data",
      "headers": [
        {
          "name": "Authorization",
          "value": "Bearer {var}"
        },
        {
          "name": "Authorization",
          "value": "Bearer not-a-real-token"
        }
      ],
      "ports": [
        5000,
        8080
      ],
      "protocol": "http",
      "repos": [
        "lnlight05/Information-Security-Work1"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "lnlight05/Information-Security-Work1/README.md:31",
        "lnlight05/Information-Security-Work1/README.md:35",
        "lnlight05/Information-Security-Work1/selfcheck.py:45",
        "lnlight05/Information-Security-Work1/selfcheck.py:51",
        "lnlight05/Information-Security-Work1/selfcheck.py:55",
        "lnlight05/Information-Security-Work1/selfcheck.py:61",
        "lnlight05/Information-Security-Work1/selfcheck.py:65"
      ]
    },
    {
      "method": "GET",
      "path_template": "/composer.json",
      "ports": [
        8080
      ],
      "protocol": "http",
      "repos": [
        "lnlight05/Information-Security-Work1"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "lnlight05/Information-Security-Work1/README.md:256"
      ]
    },
    {
      "method": "GET",
      "path_template": "/fetch/https://nginx.org/en/download.html\";",
      "protocol": "https",
      "repos": [
        "marvinoon/P1BG3-ExploitScan"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "marvinoon/P1BG3-ExploitScan/background.js:17"
      ]
    },
    {
      "method": "GET",
      "path_template": "/vendor/phpunit/phpunit/ChangeLog-5.6.md",
      "ports": [
        8080
      ],
      "protocol": "http",
      "repos": [
        "CyberCTF/vulhub-phpunit-cve-2017-9841"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "CyberCTF/vulhub-phpunit-cve-2017-9841/checks/phpunit.sh:4"
      ]
    },
    {
      "method": "GET",
      "path_template": "/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php",
      "body_markers": [
        "\u003c?php system(\""
      ],
      "ports": [
        80
      ],
      "protocol": "http",
      "repos": [
        "akr3ch/CVE-2017-9841"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "akr3ch/CVE-2017-9841/cve-2017-9841.py:31"
      ]
    },
    {
      "method": "POST",
      "path_template": "/",
      "body_markers": [
        "\u003c?=die(@md5(Apri1));?\u003e"
      ],
      "protocol": "http",
      "repos": [
        "ludy-dev/PHPUnit_eval-stdin_RCE"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "ludy-dev/PHPUnit_eval-stdin_RCE/PHPUnit_eval-stdin_RCE.py:27"
      ]
    },
    {
      "method": "POST",
      "path_template": "/api/posts",
      "headers": [
        {
          "name": "Authorization",
          "value": "Bearer {var}"
        }
      ],
      "body_markers": [
        "\"content\":\"hello\"",
        "\"content\":\"no token here\"",
        "\"content\":\"{var}alert('xss')\u003c/script\u003e\""
      ],
      "content_type": "application/json",
      "ports": [
        5000,
        8080
      ],
      "protocol": "http",
      "repos": [
        "lnlight05/Information-Security-Work1"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "lnlight05/Information-Security-Work1/README.md:39",
        "lnlight05/Information-Security-Work1/selfcheck.py:71",
        "lnlight05/Information-Security-Work1/selfcheck.py:76"
      ]
    },
    {
      "method": "POST",
      "path_template": "/auth/login",
      "body_markers": [
        "\"login\":\"alice\"",
        "\"password\":\"secret123\"",
        "\"password\":\"wrong\"",
        "\"login\":\"nobody\"",
        "\"password\":\"x\"",
        "\"login\":\"{var}alert('xss')\u003c/script\u003e\""
      ],
      "content_type": "application/json",
      "ports": [
        5000,
        8080
      ],
      "protocol": "http",
      "repos": [
        "lnlight05/Information-Security-Work1"
      ],
      "repo_count": 1,
      "confidence": 0.7,
      "evidence": [
        "lnlight05/Information-Security-Work1/README.md:25",
        "lnlight05/Information-Security-Work1/selfcheck.py:26",
        "lnlight05/Information-Security-Work1/selfcheck.py:31",
        "lnlight05/Information-Security-Work1/selfcheck.py:35",
        "lnlight05/Information-Security-Work1/selfcheck.py:40"
      ]
    }
  ],
  "rules": []
}
