{"schemaVersion":3,"id":"CVE-2017-9841","aliases":["UBUNTU-CVE-2017-9841","USN-7171-1","DEBIAN-CVE-2017-9841"],"status":"published","duplicateOf":null,"title":"PHPUnit Command Injection Vulnerability","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.","dates":{"published":"2017-06-27T17:00:00.000Z","modified":"2025-10-21T23:55:39.301Z","reserved":null,"kevAdded":["2022-02-15T00:00:00.000Z"],"kevDue":["2022-08-15T00:00:00.000Z"]},"cvss":{"headline":{"score":9.8,"severity":"critical","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":7.5,"severity":"high","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true}]},"epss":{"probability":0.99999,"percentile":0.99994,"severity":"critical","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.99999},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.99999,"percentile":0.99994}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.99999,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.99999,"percentile":0.99994}]},"kev":{"state":"listed","entries":[{"source":"cisa","sourceLabel":"CISA","dateAdded":"2022-02-15T00:00:00.000Z","dueDate":"2022-08-15T00:00:00.000Z","requiredAction":"Apply updates per vendor instructions.","name":"PHPUnit Command Injection Vulnerability","description":"PHPUnit 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.","notes":[{"type":"url","href":"https://nvd.nist.gov/vuln/detail/CVE-2017-9841","label":"nvd.nist.gov/vuln/detail/CVE-2017-9841"}],"vendor":"PHPUnit","product":"PHPUnit","ransomware":false,"ransomwareUse":"Unknown","exploitationType":null}],"listedCount":1,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":true,"entry":{"source":"cisa","sourceLabel":"CISA","dateAdded":"2022-02-15T00:00:00.000Z","dueDate":"2022-08-15T00:00:00.000Z","requiredAction":"Apply updates per vendor instructions.","name":"PHPUnit Command Injection Vulnerability","description":"PHPUnit 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.","notes":[{"type":"url","href":"https://nvd.nist.gov/vuln/detail/CVE-2017-9841","label":"nvd.nist.gov/vuln/detail/CVE-2017-9841"}],"vendor":"PHPUnit","product":"PHPUnit","ransomware":false,"ransomwareUse":"Unknown","exploitationType":null}},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"50702","name":"PHP Unit 4.8.28 - Remote Code Execution (RCE) (Unauthenticated)","source":"exploit-database","url":"https://www.exploit-db.com/exploits/50702","maturity":"poc","reliabilityScore":0.5,"verified":false,"type":null,"platforms":["php"],"requiresAuth":null,"exploitdb":{"verified":false,"type":"webapps","platform":"php","file":"exploits/php/webapps/50702.py","codes":["CVE-2017-9841"]},"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-94","name":"Improper Control of Generation of Code ('Code Injection')","description":"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.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"Medium","url":"https://cwe.mitre.org/data/definitions/94.html"}],"affected":[{"vendor":"debian","product":"phpunit","name":"phpunit","label":"phpunit","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/phpunit","purlType":"deb","versions":[{"text":"< 5.4.6-2","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 5.4.6-2","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"phpunit","name":"phpunit","label":"phpunit","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/phpunit","purlType":"deb","versions":[{"text":"< 5.1.3-1+ubuntu3+esm1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 5.1.3-1+ubuntu3+esm1","eol":null,"hubHref":null},{"vendor":"oracle","product":"communications_diameter_signaling_router","name":"communications diameter signaling router","label":"communications_diameter_signaling_router","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 8.0.0, ≤ 8.5.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 8.0.0, ≤ 8.5.0","eol":null,"hubHref":"/vendor/oracle/communications_diameter_signaling_router"},{"vendor":"phpunit_project","product":"phpunit","name":"phpunit","label":"phpunit","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≤ 4.8.27","noFixRecorded":false,"fixedIn":null},{"text":"≥ 5.0.0, < 5.6.3","noFixRecorded":false,"fixedIn":null}],"versionsText":"≤ 4.8.27 | ≥ 5.0.0, < 5.6.3","eol":null,"hubHref":"/vendor/phpunit_project/phpunit"}],"affectedCount":4,"eol":{"hasEol":false,"count":0},"references":[{"url":"http://www.securityfocus.com/bid/101798","label":"www.securityfocus.com/bid/101798","hostname":"www.securityfocus.com","tags":["VDB Entry","X Refsource BID","Broken Link"]},{"url":"http://www.securitytracker.com/id/1039812","label":"www.securitytracker.com/id/1039812","hostname":"www.securitytracker.com","tags":["VDB Entry","X Refsource SECTRACK","Broken Link"]},{"url":"https://security.gentoo.org/glsa/201711-15","label":"security.gentoo.org/glsa/201711-15","hostname":"security.gentoo.org","tags":["Vendor Advisory","X Refsource GENTOO","Third Party Advisory"]},{"url":"https://www.oracle.com/security-alerts/cpuoct2021.html","label":"www.oracle.com/security-alerts/cpuoct2021.html","hostname":"www.oracle.com","tags":["X Refsource MISC","Patch","Third Party Advisory"]},{"url":"https://github.com/sebastianbergmann/phpunit/commit/284a69fb88a2d0845d23f42974a583d8f59bf5a5","label":"github.com/sebastianbergmann/phpunit/commit/284a69fb88a2d0845d23f42974a583d8f59bf5a5","hostname":"github.com","tags":["X Refsource MISC","Patch","Third Party Advisory","REPORT"]},{"url":"https://github.com/sebastianbergmann/phpunit/pull/1956","label":"github.com/sebastianbergmann/phpunit/pull/1956","hostname":"github.com","tags":["X Refsource MISC","Patch","Third Party Advisory","REPORT"]},{"url":"http://web.archive.org/web/20170701212357/http://phpunit.vulnbusters.com/","label":"web.archive.org/web/20170701212357/http://phpunit.vulnbusters.com/","hostname":"web.archive.org","tags":["X Refsource MISC","Third Party Advisory"]},{"url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-9841","label":"www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-9841","hostname":"www.cisa.gov","tags":["Government Resource","US Government Resource"]},{"url":"https://ubuntu.com/security/CVE-2017-9841","label":"ubuntu.com/security/CVE-2017-9841","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"http://phpunit.vulnbusters.com/","label":"phpunit.vulnbusters.com","hostname":"phpunit.vulnbusters.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2017-9841","label":"www.cve.org/CVERecord?id=CVE-2017-9841","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","label":"www.cisa.gov/known-exploited-vulnerabilities-catalog","hostname":"www.cisa.gov","tags":["REPORT"]},{"url":"https://ubuntu.com/security/notices/USN-7171-1","label":"ubuntu.com/security/notices/USN-7171-1","hostname":"ubuntu.com","tags":["Advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2017-9841","label":"security-tracker.debian.org/tracker/CVE-2017-9841","hostname":"security-tracker.debian.org","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":["MGASA-2017-0429"],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2017-06-27T17:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"kev-added","date":"2022-02-15T00:00:00.000Z","label":"Added to CISA KEV","detail":"PHPUnit Command Injection Vulnerability","source":"cisa"},{"kind":"kev-due","date":"2022-08-15T00:00:00.000Z","label":"CISA remediation due","detail":"Apply updates per vendor instructions.","source":"cisa"},{"kind":"modified","date":"2025-10-21T23:55:39.301Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":85,"level":"critical","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-19T22:56:30.413Z","stale":false,"partial":false}}