Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐘
🐘 Packagist
CISA KEV · ACTIVELY EXPLOITED
CRITICAL severity

CVE-2017-9841 — phpunit

CRITICALFix: sebastianbergmann/phpunit@284a69f

CVE-2017-9841 is a critical-severity (CVSS 9.8) Code Injection vulnerability in phpunit/phpunit. It is in CISA's Known Exploited Vulnerabilities catalog (added 2022-02-15) — treat it as actively exploited and patch now. A fix is available for phpunit/phpunit — see the affected versions and patch details below.

Code Injection in PHPUnit

Also known asGHSA-r7c9-c69m-rph8
Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
25 known
Exploitation data as of Oct 24, 2026 · OSV.dev, NVD, CISA KEV, FIRST.org (EPSS)

Exploitation Status

Actively exploited in the wild

  • Confirmed by CISA's Known Exploited Vulnerabilities catalog on 2022-02-15. Federal agencies were required to remediate by 2022-08-15.
  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA (KEV catalog and SSVC triage) for CVE-2017-9841.

EPSS Exploitation Probability

via FIRST.org ↗
100.0%probability of exploitation in next 30 days
Very High Risk0.00%
Lower risk than most CVEs100th percentile — riskier than 100% of all scored CVEsHighest risk
92.5%95.0%97.5%100.0%94.2%100.0%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2017-9841 by exploitation likelihood (EPSS) against impact (CVSS). In the shaded patch-first corner (EPSS 50%+, CVSS 7.0+).

Where this sits among everything scored

Of 395,492 CVEs with a current EPSS score, this one falls in the ≥ 90% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

2 pkgs affected
🐘phpunit/phpunit🐘phpunit/phpunit

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

Description

Util/PHP/eval-stdin.php in PHPUnit starting with 4.8.19 and before 4.8.28, as well as 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.

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
🐘Packagistphpunit/phpunit≥ 4.8.19&&< 4.8.284.8.28composer require phpunit/phpunit:^4.8.28
🐘Packagistphpunit/phpunit≥ 5.0.10&&< 5.6.35.6.3composer require phpunit/phpunit:^5.6.3

Affected Products

2 products · 3 configurations
Application
communications diameter signaling routeroracle
≥ 8.0.0 && ≤ 8.5.0
range
Application
phpunitphpunit_project
≥ 5.0.0 && ≤ 4.8.27
range
Exploits & PoCs
25

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

EDB-50702webappsphp

PHP Unit 4.8.28 - Remote Code Execution (RCE) (Unauthenticated)

by souzo · Feb 2, 2022

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for phpunit/phpunit, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update phpunit/phpunit to 4.8.28 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2017-9841 is resolved across your whole dependency graph.

  3. Workarounds

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.

How to detect CVE-2017-9841

A community-maintained Nuclei template exists for this CVE. You can scan for it directly:

nuclei -id cve-2017-9841 -u https://target
Template
PHPUnit - Remote Code Execution
Severity
critical
Impact
Remote attackers can execute arbitrary PHP code on the server, leading to full system compromise.
Remediation
Upgrade to PHPUnit version 5.7.21 or 6.1.6 or later.

Template by ProjectDiscovery nuclei-templates (Random_Robbie, pikpikcu), MIT licensed. View the full template. Scan only systems you are authorised to test.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

UbuntuCRITICAL

Frequently Asked Questions

Util/PHP/eval-stdin.php in PHPUnit starting with 4.8.19 and before 4.8.28, as well as 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.
O3 Security · Impact-Aware SCA

Is CVE-2017-9841 in your dependencies?

Find it across Packagist, including transitive dependencies.

Actively Exploited: CVE-2017-9841: phpunit (Critical 9.8)