CVE-2017-9841criticalunder attackCWE-94

CVE-2017-9841

Published · Updated

E-mail alert when it lands in KEV, gets a public PoC or its score goes up.

100Vexday Risk Score

Patch now. It under exploitation confirmed by CISA and has a working public exploit.

ssvc Actcvss 9.8epss 100%
from disclosure to weapon923 days
Published on NVDJun 27
1st PoC+923d
CISA KEV+1694d
What the vendors declare (VEX)

Official vendor statements in CSAF/VEX format: whether their product is affected, already fixed, or ruled out — and why. These are the vendor's assertions, not Vexday's judgment.

Not affected
1 product — because the vulnerable code is not present in the product
red_hat_products
Action required by CISAfederal deadline: 2022-08-15

Apply updates per vendor instructions.

In short

PHPUnit's eval-stdin.php script allows attackers to execute arbitrary PHP code by sending specially crafted HTTP POST requests. This is critical because it gives complete control over the server to anyone who can access the exposed file.

Technical detail

A remote code execution vulnerability in PHPUnit versions before 4.8.28 and 5.x before 5.6.3 exists in the eval-stdin.php utility script, which unsafely evaluates PHP code from POST data. An unauthenticated attacker can exploit this if the /vendor directory is publicly accessible, achieving arbitrary code execution on the server with the privileges of the web process.

Summary generated and translated by AI from the official description.

The full analysis of this CVE is available in Portuguese →

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.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Affected products
n/a · n/a
public PoCs found — 37
exploitdbwww.exploit-db.com/exploits/50702unverifiedgithubgithub.com/RandomRobbieBF/phpunit-brute★ 29githubgithub.com/incogbyte/laravel-phpunit-rce-masscaner★ 23githubgithub.com/Chocapikk/CVE-2017-9841★ 7githubgithub.com/ludy-dev/PHPUnit_eval-stdin_RCE★ 6githubgithub.com/K3ysTr0K3R/CVE-2017-9841-EXPLOIT★ 6githubgithub.com/drcrypterdotru/PHPUnit-GoScan★ 5githubgithub.com/MadExploits/PHPunit-Exploit★ 5githubgithub.com/MrG3P5/CVE-2017-9841★ 4githubgithub.com/akr3ch/CVE-2017-9841★ 3githubgithub.com/p1ckzi/CVE-2017-9841★ 3githubgithub.com/dream434/CVE-2017-9841★ 1githubgithub.com/joelindra/CVE-2017-9841★ 1githubgithub.com/MR-LeonardoGomes/CVE-2017-9841★ 1githubgithub.com/CheLover86/CVE-2017-9841★ 1githubgithub.com/jax7sec/CVE-2017-9841★ 0githubgithub.com/CyberCTF/vulhub-phpunit-cve-2017-9841★ 0githubgithub.com/mbrasile/CVE-2017-9841★ 0githubgithub.com/mileticluka1/eval-stdin★ 0githubgithub.com/krisdewa/CVE-2017-9841-PHPUnit-Remote-Code-Execution-PoC★ 0githubgithub.com/cyberharsh/Php-unit-CVE-2017-9841★ 0vulncheckvulncheck.com/xdb/42d8d075303funverifiedvulncheckvulncheck.com/xdb/7d5cdaa33e78unverifiedvulncheckvulncheck.com/xdb/2f94822ef64aunverifiedvulncheckvulncheck.com/xdb/7a39231796b7unverifiedvulncheckvulncheck.com/xdb/f2a50a4ad68funverifiedvulncheckvulncheck.com/xdb/f2c6ac384408unverifiedvulncheckvulncheck.com/xdb/8e4c8dfc7380unverifiedvulncheckvulncheck.com/xdb/487df0327bceunverifiedvulncheckvulncheck.com/xdb/0ca48238fb60unverifiedvulncheckvulncheck.com/xdb/2e43500dd68aunverifiedvulncheckvulncheck.com/xdb/6435c08ede60unverifiedvulncheckvulncheck.com/xdb/e74331211046unverifiedvulncheckvulncheck.com/xdb/519ed136afcfunverifiedvulncheckvulncheck.com/xdb/dc847405f88eunverifiedvulncheckvulncheck.com/xdb/d1456567755funverifiedvulncheckvulncheck.com/xdb/d69e5db4e174unverified
⚠ Public resources, to assess the exposure of systems you control or are authorized to test. Test only with authorization.