[KEV] Code Injection in Phpunit (CVE-2017-9841)
Summary
Code injection in Phpunit (CVE-2017-9841). Successful exploitation can lead to full system takeover. Listed in CISA KEV — actively exploited.
Original description
The description as published by the source.
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.
Source: CISA Known Exploited Vulnerabilities NVD GitHub Advisory CISA KEV
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2017-9841 has been found in Phpunit.
Successful exploitation can lead to full system takeover.
Note: CISA has officially confirmed this is actively exploited in the wild. Treat it with elevated urgency.
What to do: apply the vendor's official patched release.
If unsure, ask your IT team or search "Phpunit CVE-2017-9841" on the vendor's site.
CVE-2017-9841 (Phpunit) — CWE-94
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Listed in CISA KEV — actively exploited, treat as top priority.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Arbitrary code execution (CWE-94) exists in Phpunit.
Check the vendor advisory for the affected versions of Phpunit.
Severity: High. Successful exploitation can lead to full system takeover. Listed in CISA KEV — actively exploited in the wild, treat as top priority.
Update to the patched release per vendor advisory.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'Phpunit' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'Phpunit' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
Phpunitを grep し、稼働しているサービス・バージョンを把握する。 -
2Consider incident declaration escalate
Notify SOC / on-callCISA KEV登録済 = 実環境で悪用が観測されている。侵入の兆候があればインシデント対応宣言、無くてもパッチ適用までWAF強化を最優先で。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2017-9841 phpunit Fixed in: 5.4.6-2
References
- advisory NVD
- advisory web.archive.org
- advisory security.gentoo.org
- patch github.com
- patch github.com
- patch oracle.com
- web securityfocus.com
- web securitytracker.com
- web cisa.gov