{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2017-9841","id":"CVE-2017-9841","title":"Code Injection in PHPUnit","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.","descriptionLong":"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.","published":"2017-06-27T17:00:00.000Z","updated":"2026-10-24T10:49:31.485073507Z","reserved":"2017-06-24T00:00:00.000Z","status":"Analyzed","rejected":false,"assigner":"mitre","metric":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},"metrics":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"CISA-ADP"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"OSV"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H","rating":"critical","source":"GitHub"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","rating":"high","source":"NVD"}],"rating":"critical","products":[],"affectedProducts":[{"vendor":"n/a","product":"n/a","defaultStatus":null,"versions":[{"status":"affected","version":"n/a"}],"platforms":[]}],"packages":[{"ecosystem":"Packagist","name":"phpunit/phpunit","purl":"pkg:composer/phpunit/phpunit","ranges":[">=4.8.19 <4.8.28",">=5.0.10 <5.6.3"],"fixed":["4.8.28","5.6.3"],"advisory":"GHSA-r7c9-c69m-rph8"}],"cwes":["CWE-94"],"aliases":["GHSA-r7c9-c69m-rph8"],"references":[{"url":"http://www.securityfocus.com/bid/101798","tags":["vdb-entry","x_refsource_BID","x_transferred","Broken Link","web"]},{"url":"http://www.securitytracker.com/id/1039812","tags":["vdb-entry","x_refsource_SECTRACK","x_transferred","Broken Link","web"]},{"url":"https://security.gentoo.org/glsa/201711-15","tags":["vendor-advisory","x_refsource_GENTOO","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://www.oracle.com/security-alerts/cpuoct2021.html","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/sebastianbergmann/phpunit/commit/284a69fb88a2d0845d23f42974a583d8f59bf5a5","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/sebastianbergmann/phpunit/pull/1956","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"http://web.archive.org/web/20170701212357/http://phpunit.vulnbusters.com/","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory"]},{"url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-9841","tags":["government-resource","US Government Resource","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2017-9841","tags":["advisory"]},{"url":"https://github.com/sebastianbergmann/phpunit/pull/1955","tags":["web"]},{"url":"https://github.com/sebastianbergmann/phpunit/commit/3aaddb1c5bd9b9b8d070b4cf120e71c36fd08412","tags":["web"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/phpunit/phpunit/CVE-2017-9841.yaml","tags":["web"]},{"url":"https://github.com/sebastianbergmann/phpunit","tags":["package"]},{"url":"http://web.archive.org/web/20170701212357/http://phpunit.vulnbusters.com","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":true,"kevAdded":"2022-02-15","kevDue":"2022-08-15","kevEntry":{"cveID":"CVE-2017-9841","vendorProject":"PHPUnit","product":"PHPUnit","vulnerabilityName":"PHPUnit Command Injection Vulnerability","dateAdded":"2022-02-15","shortDescription":"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.","requiredAction":"Apply updates per vendor instructions.","dueDate":"2022-08-15","knownRansomwareCampaignUse":"Unknown","notes":"https://nvd.nist.gov/vuln/detail/CVE-2017-9841","cwes":["CWE-94"]},"ssvc":{"exploitation":"active","automatable":"yes","technicalImpact":"total"},"epss":0.99999,"epssPercentile":0.99994,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2017-9841","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2017-9841","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2017-9841","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-r7c9-c69m-rph8","ok":true,"note":"GHSA-r7c9-c69m-rph8"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"added 2022-02-15"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2017-9841","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":["Exploited in the wild (CISA KEV)","EPSS 100% with CVSS 9.8"],"attention":null}