PHPUnit up to 4.8.27/5.6.2 HTTP POST Util/PHP/eval-stdin.php code injection
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 8.4 | $0-$5k | 0.00 |
Summary
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.
Details
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.
Product
Name
Version
- 4.8.0
- 4.8.1
- 4.8.2
- 4.8.3
- 4.8.4
- 4.8.5
- 4.8.6
- 4.8.7
- 4.8.8
- 4.8.9
- 4.8.10
- 4.8.11
- 4.8.12
- 4.8.13
- 4.8.14
- 4.8.15
- 4.8.16
- 4.8.17
- 4.8.18
- 4.8.19
- 4.8.20
- 4.8.21
- 4.8.22
- 4.8.23
- 4.8.24
- 4.8.25
- 4.8.26
- 4.8.27
- 5.6.0
- 5.6.1
- 5.6.2
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 8.5VulDB 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: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
NVD Base Score: 🔍
Exploiting
Class: Code injectionCWE: 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-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
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 Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍
Upgrade: PHPUnit 4.8.28/5.6.3
Patch: github.com
Timeline
06/24/2017 🔍06/27/2017 🔍
06/27/2017 🔍
06/27/2017 🔍
06/27/2017 🔍
06/28/2017 🔍
11/19/2017 🔍
11/20/2017 🔍
10/15/2025 🔍
Sources
Advisory: 284a69fb88a2d0845d23f42974a583d8f59bf5a5Researcher: 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: 🔍
Entry
Created: 06/28/2017 07:57Updated: 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.
No comments yet. Languages: en.
Please log in to comment.