PHPUnit up to 4.8.27/5.6.2 HTTP POST Util/PHP/eval-stdin.php code injection

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
8.4$0-$5k0.00

Summaryinfo

A vulnerability was found in PHPUnit up to 4.8.27/5.6.2. It has been rated as critical. The impacted element is an unknown function of the file Util/PHP/eval-stdin.php of the component HTTP POST Handler. Performing a manipulation results in code injection. This vulnerability is cataloged as CVE-2017-9841. It is possible to initiate the attack remotely. Furthermore, there is an exploit available. Upgrading the affected component is advised.

Detailsinfo

A vulnerability classified as critical has been found in PHPUnit up to 4.8.27/5.6.2. This affects an unknown function of the file Util/PHP/eval-stdin.php of the component HTTP POST Handler. The manipulation with an unknown input leads to a code injection vulnerability. CWE is classifying the issue as CWE-94. The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. This is going to have an impact on confidentiality, integrity, and availability. The summary by CVE is:

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.

The bug was discovered 06/27/2017. The weakness was shared 06/27/2017 (Website). It is possible to read the advisory at phpunit.vulnbusters.com. This vulnerability is uniquely identified as CVE-2017-9841 since 06/24/2017. The exploitability is told to be easy. It is possible to initiate the attack remotely. No form of authentication is needed for exploitation. Technical details and a public exploit are known. The attack technique deployed by this issue is T1059 according to MITRE ATT&CK.

The exploit is shared for download at exploit-db.com. It is declared as attacked. By approaching the search of inurl:Util/PHP/eval-stdin.php it is possible to find vulnerable targets with Google Hacking. The vulnerability scanner Nessus provides a plugin with the ID 104693 (FreeBSD : mediawiki -- multiple vulnerabilities (298829e2-ccce-11e7-92e4-000c29649f92)), which helps to determine the existence of the flaw in a target environment. It is assigned to the family FreeBSD Local Security Checks and running in the context l. The commercial vulnerability scanner Qualys is able to test this issue with plugin 277023 (Fedora Security Update for mediawiki (FEDORA-2017-59251d350d)). The CISA Known Exploited Vulnerabilities Catalog lists this issue since 02/15/2022 with a due date of 08/15/2022:

Apply updates per vendor instructions.

Upgrading to version 4.8.28 or 5.6.3 eliminates this vulnerability. A possible mitigation has been published 6 months after the disclosure of the vulnerability.

The vulnerability is also documented in the databases at Exploit-DB (50702), Tenable (104693) and SecurityFocus (BID 101798†). The entries VDB-109444, VDB-109445, VDB-109446 and VDB-109447 are related to this item. Be aware that VulDB is the high quality source for vulnerability data.

Productinfo

Name

Version

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 8.5
VulDB Meta Temp Score: 8.4

VulDB Base Score: 7.3
VulDB Temp Score: 7.0
VulDB Vector: 🔍
VulDB Reliability: 🔍

NVD Base Score: 9.8
NVD Vector: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

NVD Base Score: 🔍

Exploitinginfo

Class: Code injection
CWE: CWE-94 / CWE-74 / CWE-707
CAPEC: 🔍
ATT&CK: 🔍

Physical: No
Local: No
Remote: Yes

Availability: 🔍
Access: Public
Status: Attacked
Download: 🔍
Google Hack: 🔍

EPSS Score: 🔍
EPSS Percentile: 🔍

KEV Added: 🔍
KEV Due: 🔍
KEV Remediation: 🔍
KEV Ransomware: 🔍
KEV Notice: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 104693
Nessus Name: FreeBSD : mediawiki -- multiple vulnerabilities (298829e2-ccce-11e7-92e4-000c29649f92)
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Context: 🔍

OpenVAS ID: 56245
OpenVAS Name: PHPUnit CVE-2017-9841 Remote Code Execution Vulnerability
OpenVAS File: 🔍
OpenVAS Family: 🔍

Qualys ID: 🔍
Qualys Name: 🔍

Exploit-DB: 🔍

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍

Upgrade: PHPUnit 4.8.28/5.6.3
Patch: github.com

Timelineinfo

06/24/2017 🔍
06/27/2017 +3 days 🔍
06/27/2017 +0 days 🔍
06/27/2017 +0 days 🔍
06/27/2017 +0 days 🔍
06/28/2017 +1 days 🔍
11/19/2017 +144 days 🔍
11/20/2017 +1 days 🔍
10/15/2025 +2886 days 🔍

Sourcesinfo

Advisory: 284a69fb88a2d0845d23f42974a583d8f59bf5a5
Researcher: David Mudrák
Status: Confirmed

CVE: CVE-2017-9841 (🔍)
GCVE (CVE): GCVE-0-2017-9841
GCVE (VulDB): GCVE-100-102879
SecurityFocus: 101798 - PHPUnit CVE-2017-9841 Arbitrary Code Execution Vulnerability
SecurityTracker: 1039812

scip Labs: https://www.scip.ch/en/?labs.20161013
See also: 🔍

Entryinfo

Created: 06/28/2017 07:57
Updated: 10/15/2025 23:54
Changes: 06/28/2017 07:57 (75), 12/29/2019 20:21 (4), 12/29/2020 20:28 (2), 12/29/2020 20:31 (1), 12/09/2022 10:50 (4), 04/22/2024 21:32 (25), 09/09/2024 22:29 (1), 01/22/2025 21:18 (3), 10/15/2025 23:54 (3)
Complete: 🔍
Cache ID: 216::103

Be aware that VulDB is the high quality source for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Want to know what is going to be exploited?

We predict KEV entries!