CVE-2017-9841

Summary

CVECVE-2017-9841
StatePUBLISHED
Assignermitre
Source PriorityCVE Program / NVD first with legacy fallback
Published2017-06-27 17:29:00 UTC
Updated2026-04-21 18:00:56 UTC
DescriptionUtil/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.

Risk And Classification

Primary CVSS: v3.1 9.8 CRITICAL from [email protected]

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

EPSS: 0.942100000 probability, percentile 0.999230000 (date 2026-04-22)

CISA KEV: Listed on 2022-02-15; due 2022-08-15; ransomware use Unknown

Problem Types: CWE-94 | n/a | CWE-94 CWE-94 Improper Control of Generation of Code ('Code Injection')


VersionSourceTypeScoreSeverityVector
3.1[email protected]Primary9.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
3.1ADPDECLARED9.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
3.1134c704f-9b21-4f2e-91b3-4a467353bcc0Secondary9.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
2.0[email protected]Primary7.5AV:N/AC:L/Au:N/C:P/I:P/A:P

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CVSS v2.0 Breakdown

Access Vector
Network
Access Complexity
Low
Authentication
None
Confidentiality
Partial
Integrity
Partial
Availability
Partial

AV:N/AC:L/Au:N/C:P/I:P/A:P

CISA Known Exploited Vulnerability

VendorPHPUnit
ProductPHPUnit
NamePHPUnit Command Injection Vulnerability
Required ActionApply updates per vendor instructions.
Noteshttps://nvd.nist.gov/vuln/detail/CVE-2017-9841

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Oracle Communications Diameter Signaling Router All All All All
Application Phpunit Project Phpunit All All All All
Application Phpunit Project Phpunit All All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Na N/a affected n/a Not specified

References

ReferenceSourceLinkTags
Oracle Critical Patch Update Advisory - October 2021 af854a3a-2127-422b-91ae-364da2661108 www.oracle.com Patch, Third Party Advisory
www.cisa.gov/known-exploited-vulnerabilities-catalog 134c704f-9b21-4f2e-91b3-4a467353bcc0 www.cisa.gov US Government Resource
PHPUnit CVE-2017-9841 Arbitrary Code Execution Vulnerability af854a3a-2127-422b-91ae-364da2661108 www.securityfocus.com Broken Link
Fix insulated tests with phpdbg by nicolas-grekas · Pull Request #1956 · sebastianbergmann/phpunit · GitHub af854a3a-2127-422b-91ae-364da2661108 github.com Patch, Third Party Advisory
MediaWiki Multiple Flaws Let Remote Users Modify Data, Obtain Potentially Sensitive Information, and Conduct Cross-Site Scripting Attacks and Let Local Users Obtain Passwords - SecurityTracker af854a3a-2127-422b-91ae-364da2661108 www.securitytracker.com Broken Link
PHPUnit: Remote code execution (GLSA 201711-15) — Gentoo security af854a3a-2127-422b-91ae-364da2661108 security.gentoo.org Third Party Advisory
Correct fix for #1956 · sebastianbergmann/phpunit@284a69f · GitHub af854a3a-2127-422b-91ae-364da2661108 github.com Patch, Third Party Advisory
CVE-2017-9841 RCE vulnerability in phpunit af854a3a-2127-422b-91ae-364da2661108 web.archive.org Third Party Advisory
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis
CISA Known Exploited Vulnerabilities catalog CISA www.cisa.gov kev

Additional Advisory Data

SourceTimeEvent
ADP2022-02-15T00:00:00.000ZCVE-2017-9841 added to CISA KEV

Legacy QID Mappings

  • 710371 Gentoo Linux Hypertext Preprocessor (PHP) Unit Remote code execution Vulnerability (GLSA 201711-15)
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report