CVE-2017-9841

CRITICAL KEV NUCLEI

PHPUnit < 4.8.28 and 5.x < 5.6.3 - Remote Code Execution via HTTP POST Data

Title source: llm
STIX 2.1

Exploitation Summary

CVE-2017-9841 is actively exploited and listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, added February 15, 2022. EIP tracks 23 public exploits from researchers including souzo, RandomRobbieBF, incogbyte. A Nuclei detection template is also available.

AI-analyzed exploit summary This exploit targets CVE-2017-9841, a remote code execution vulnerability in PHPUnit 4.8.28. It checks for the presence of the vulnerable `eval-stdin.php` file and allows arbitrary command execution via HTTP requests.

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 "<?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.

Exploits (23)

exploitdb WORKING POC
by souzo · pythonwebappsphp
https://www.exploit-db.com/exploits/50702

This exploit targets CVE-2017-9841, a remote code execution vulnerability in PHPUnit 4.8.28. It checks for the presence of the vulnerable `eval-stdin.php` file and allows arbitrary command execution via HTTP requests.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: PHPUnit 4.8.28
No auth needed
Prerequisites: Exposed `eval-stdin.php` file in the target web root
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec SCANNER 29 stars
by RandomRobbieBF · remote
https://github.com/RandomRobbieBF/phpunit-brute

This repository contains a Python script that brute-forces paths to exploit CVE-2017-9841, a PHPUnit RCE vulnerability. It tests multiple paths to locate the vulnerable `eval-stdin.php` file and logs successful findings.

Classification
Scanner 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: PHPUnit (versions affected by CVE-2017-9841)
No auth needed
Prerequisites: Access to the target web server · PHPUnit vulnerable path exposed
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec SCANNER 23 stars
by incogbyte · remote
https://github.com/incogbyte/laravel-phpunit-rce-masscaner

This repository contains a mass scanner for CVE-2017-9841, a remote code execution vulnerability in Laravel's PHPUnit configuration. The tool checks for the presence of the vulnerable endpoint and attempts to execute a simple PHP payload to verify exploitation.

Classification
Scanner 90%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: Laravel with vulnerable PHPUnit configuration
No auth needed
Prerequisites: Target must have exposed PHPUnit endpoint · Network access to target
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 7 stars
by Chocapikk · remote
https://github.com/Chocapikk/CVE-2017-9841

This repository contains a functional exploit for CVE-2017-9841, targeting PHPUnit's `eval-stdin.php` RCE vulnerability. It includes both a mass scanner and an interactive shell for exploitation.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: PHPUnit versions before 4.8.28 and 5.x before 5.6.3
No auth needed
Prerequisites: Exposed `/vendor` directory · Access to `/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php`
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec SCANNER 6 stars
by ludy-dev · remote
https://github.com/ludy-dev/PHPUnit_eval-stdin_RCE

This repository contains a Python script that scans for the presence of CVE-2017-9841, a remote code execution vulnerability in PHPUnit. The script checks multiple common paths for the vulnerable `eval-stdin.php` file and verifies the vulnerability by sending a test payload.

Classification
Scanner 90%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: PHPUnit 4.8.19 - 4.8.27, PHPUnit 5.0.10 - 5.6.2
No auth needed
Prerequisites: Target must have PHPUnit installed and the vulnerable file accessible
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 5 stars
by MadExploits · poc
https://github.com/MadExploits/PHPunit-Exploit

This repository contains a Python-based exploit for CVE-2017-9841, targeting PHPUnit's deserialization vulnerability. The exploit uses obfuscated code to generate a malicious payload for remote code execution (RCE).

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: PHPUnit (versions prior to 4.8.28 and 5.6.3)
No auth needed
Prerequisites: PHPUnit installed on the target system · Ability to upload or include a malicious file
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec SCANNER 4 stars
by drcrypterdotru · remote
https://github.com/drcrypterdotru/PHPUnit-GoScan

This is a multithreaded Go scanner for detecting vulnerable PHPUnit eval-stdin.php endpoints (CVE-2017-9841). It tests multiple common paths and verifies vulnerability by checking for a specific MD5 hash response.

Classification
Scanner 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: PHPUnit (versions affected by CVE-2017-9841)
No auth needed
Prerequisites: Exposed eval-stdin.php endpoint · Network access to target
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 4 stars
by K3ysTr0K3R · poc
https://github.com/K3ysTr0K3R/CVE-2017-9841-EXPLOIT

This Go-based exploit targets CVE-2017-9841, a PHPUnit RCE vulnerability. It checks for exposed eval-stdin.php files and provides an interactive shell for command execution.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: PHPUnit versions before 4.8.28 and 5.x before 5.6.3
No auth needed
Prerequisites: Exposed /vendor directory with PHPUnit's eval-stdin.php accessible
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec SCANNER 4 stars
by MrG3P5 · remote
https://github.com/MrG3P5/CVE-2017-9841

This repository contains a Python-based scanner for CVE-2017-9841, which exploits a PHPUnit RCE vulnerability by checking for the presence of vulnerable `eval-stdin.php` files in common web application paths. It uses multithreading to test multiple domains for vulnerability.

Classification
Scanner 90%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: PHPUnit (versions affected by CVE-2017-9841)
No auth needed
Prerequisites: List of target domains · Network access to target web servers
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 3 stars
by akr3ch · remote
https://github.com/akr3ch/CVE-2017-9841

This PoC exploits CVE-2017-9841, a remote code execution vulnerability in PHPUnit 5.6.2, by sending arbitrary commands to an exposed eval-stdin.php endpoint. The script allows interactive command execution on the target system.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: PHPUnit 5.6.2
No auth needed
Prerequisites: Exposed /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php endpoint
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 3 stars
by p1ckzi · remote
https://github.com/p1ckzi/CVE-2017-9841

This repository contains a Python3 script that exploits CVE-2017-9841, a remote code execution vulnerability in PHPUnit before 4.8.28 and 5.x before 5.6.3. The script sends a POST request to the target with user-supplied system commands.

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: PHPUnit before 4.8.28 and 5.x before 5.6.3
No auth needed
Prerequisites: Python3 · requests module · bs4 module · target running vulnerable PHPUnit
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC 1 stars
by dream434 · remote
https://github.com/dream434/CVE-2017-9841

This repository contains a Flask-based PoC for CVE-2017-9841, which exploits a PHP code execution vulnerability in PHPUnit's eval-stdin.php. The exploit sends a POST request with a PHP payload to execute arbitrary commands (e.g., 'id') on the target server.

Classification
Working Poc 90%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: PHPUnit (versions before 4.8.28 and 5.x before 5.6.3)
No auth needed
Prerequisites: Target server with vulnerable PHPUnit version · Network access to the target server
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by krisdewa · remote
https://github.com/krisdewa/CVE-2017-9841-PHPUnit-Remote-Code-Execution-PoC

This repository contains a functional Python-based exploit for CVE-2017-9841, which targets a remote code execution vulnerability in PHPUnit's eval-stdin.php. The exploit automates the discovery of vulnerable endpoints and allows for command execution, server information gathering, and an interactive shell.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: PHPUnit < 5.6.3, 6.x < 6.4.2
No auth needed
Prerequisites: Publicly accessible eval-stdin.php file in PHPUnit installation
mistral-large-3 · analyzed Jun 11, 2026 Full analysis →
nomisec WORKING POC
by krisdewa · poc
https://github.com/krisdewa/CVE-2017-9841-PHPUnit-Remote-Code-Execution-RCE-PoC

This repository contains a functional Python-based exploit for CVE-2017-9841, which targets a remote code execution vulnerability in PHPUnit's eval-stdin.php file. The exploit includes multiple modes such as vulnerability checking, command execution, and an interactive shell.

Classification
Working Poc 100%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: PHPUnit < 5.6.3, 6.x < 6.4.2
No auth needed
Prerequisites: Publicly accessible eval-stdin.php file in the target's vendor directory
mistral-large-3 · analyzed Jun 11, 2026 Full analysis →
github WORKING POC
by dyeat · pythonpoc
https://github.com/dyeat/cve-reproduction/tree/main/PHP/PHPUnit/CVE-2017-9841

The repository contains a functional Python script that exploits CVE-2017-9841, an unauthenticated RCE vulnerability in PHPUnit's eval-stdin.php endpoint. The script sends a crafted POST request with PHP code to execute arbitrary commands on the target system.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: PHPUnit (versions with eval-stdin.php exposed)
No auth needed
Prerequisites: Target must have PHPUnit installed with eval-stdin.php accessible
mistral-large-3 · analyzed May 22, 2026 Full analysis →
nomisec WRITEUP
by MR-LeonardoGomes · poc
https://github.com/MR-LeonardoGomes/CVE-2017-9841

This repository provides a detailed technical analysis of CVE-2017-9841, a critical RCE vulnerability in PHPUnit. It explains the root cause (exposed eval-stdin.php file), exploitation method (POST requests with PHP code), and mitigation steps.

Classification
Writeup 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: PHPUnit (versions before 5.6.3 and 4.8.28)
No auth needed
Prerequisites: Publicly accessible eval-stdin.php file in the PHPUnit directory
mistral-large-3 · analyzed Mar 02, 2026 Full analysis →
gitlab SCANNER
by drygdryg · poc
https://gitlab.com/drygdryg/phpunit-brute

This repository contains a Python script that scans for vulnerable paths to exploit CVE-2017-9841, a PHPUnit RCE vulnerability. It brute-forces common paths and logs successful hits but does not include a full exploit payload.

Classification
Scanner 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: PHPUnit (versions affected by CVE-2017-9841)
No auth needed
Prerequisites: Target URL with exposed PHPUnit paths · Network access to the target
mistral-large-3 · analyzed Feb 23, 2026 Full analysis →
nomisec SCANNER
by joelindra · poc
https://github.com/joelindra/CVE-2017-9841

This is a multi-threaded scanner for CVE-2017-9841, which targets PHPUnit's eval-stdin.php file for potential RCE. It checks multiple common paths and verifies vulnerability by sending a PHP payload to execute an MD5 hash check.

Classification
Scanner 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: PHPUnit (versions before 4.8.28 and 5.x before 5.6.3)
No auth needed
Prerequisites: Target must have exposed PHPUnit files · Network access to the target
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by mileticluka1 · remote
https://github.com/mileticluka1/eval-stdin

This Ruby script automates the exploitation of CVE-2017-9841, a remote code execution vulnerability in outdated eval-stdin.php. It provides an interactive shell to execute commands, check connections, run privilege escalation scripts, and spawn reverse shells.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: eval-stdin.php (outdated version)
No auth needed
Prerequisites: Target must have vulnerable eval-stdin.php exposed · Attacker must know the full URL to the vulnerable file
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec WORKING POC
by jax7sec · remote
https://github.com/jax7sec/CVE-2017-9841

This repository contains a Python script for exploiting CVE-2017-9841, a PHP code execution vulnerability in PHPUnit. It includes both a scanner for detecting vulnerable endpoints and an RCE module for executing arbitrary commands.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: PHPUnit < 4.8.28, PHPUnit 5.x < 5.6.3
No auth needed
Prerequisites: Exposed PHPUnit eval-stdin.php endpoint · Network access to target
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec WRITEUP
by cyberharsh · poc
https://github.com/cyberharsh/Php-unit-CVE-2017-9841

This repository provides a writeup and vulnerability details for CVE-2017-9841, a remote code execution vulnerability in PHPUnit. The vulnerability arises from an unsafe `eval` usage in `eval-stdin.php`, which can be exploited if the file is accessible via web requests.

Classification
Writeup 90%
Attack Type
Rce
Complexity
Trivial
Reliability
Reliable
Target: PHPUnit versions 4.8.19-4.8.27 and 5.0.10-5.6.2
No auth needed
Prerequisites: Exposed `eval-stdin.php` file in a web-accessible directory
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
nomisec SCANNER
by mbrasile · poc
https://github.com/mbrasile/CVE-2017-9841

This repository contains a bash script to detect vulnerable versions of PHPUnit (CVE-2017-9841) in web applications like PrestaShop and WordPress. It scans for PHPUnit directories and checks version numbers against known vulnerable ranges.

Classification
Scanner 100%
Attack Type
Info Leak
Complexity
Trivial
Reliability
Reliable
Target: PHPUnit (versions before 4.8.28, 5.x before 5.6.3, 7.x before 7.5.19, and 8.x before 8.5.1)
No auth needed
Prerequisites: Access to the target filesystem
mistral-large-3 · analyzed Feb 16, 2026 Full analysis →
vulncheck_xdb SCANNER
remote
https://github.com/joelindra/Argus

This repository contains a Python-based scanner for detecting CVE-2017-9841, a PHPUnit RCE vulnerability. It checks multiple common paths for the vulnerable `eval-stdin.php` file and verifies exploitation by sending a crafted PHP payload to check for a specific MD5 hash in the response.

Classification
Scanner 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: PHPUnit (versions prior to 4.8.28 and 5.6.3)
No auth needed
Prerequisites: target URLs with exposed PHPUnit paths
mistral-large-3 · analyzed Feb 25, 2026 Full analysis →

Nuclei Templates (1)

PHPUnit - Remote Code Execution
CRITICALby Random_Robbie,pikpikcu

References (8)

Core 8
Core References
Broken Link vdb-entry x_refsource_bid
http://www.securityfocus.com/bid/101798
Broken Link vdb-entry x_refsource_sectrack
http://www.securitytracker.com/id/1039812
Third Party Advisory vendor-advisory x_refsource_gentoo
https://security.gentoo.org/glsa/201711-15
Patch, Third Party Advisory x_refsource_misc
https://www.oracle.com/security-alerts/cpuoct2021.html
Patch, Third Party Advisory x_refsource_misc
https://github.com/sebastianbergmann/phpunit/pull/1956

Scores

CVSS v3 9.8
EPSS 1.0000
EPSS Percentile 100.0%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CISA SSVC

Vulnrichment
Exploitation active
Automatable yes
Technical Impact total

Details

CISA KEV 2022-02-15
VulnCheck KEV 2020-11-22
InTheWild.io 2021-04-08
ENISA EUVD EUVD-2022-1528
CWE
CWE-94
Status published
Products (3)
oracle/communications_diameter_signaling_router 8.0.0 - 8.5.0
phpunit/phpunit 4.8.19 - 4.8.28Packagist
phpunit_project/phpunit < 4.8.27
Published Jun 27, 2017
KEV Added Feb 15, 2022
Tracked Since Feb 18, 2026