Vulnerability in phpunit/phpunit (CVE-2026-41570)
Summary
Vulnerability in phpunit/phpunit (CVE-2026-41570). Successful exploitation can lead to full system takeover. Exploitable via auto_prepend_file. Mitigation: upgrade to 13.1.6 or later.
Original description
The description as published by the source.
PHPUnit is a testing framework for PHP. In versions 12.5.21 and 13.1.5, PHPUnit forwards PHP INI settings to child processes (used for isolated/PHPT test execution) as -d name=value command-line arguments without neutralizing INI metacharacters. Because PHP's INI parser interprets " as a string delimiter, ; as the start of a comment, and most importantly a newline as a directive separator, a value containing a newline is parsed by the child process as multiple INI directives. An attacker able to influence a single INI value can therefore inject arbitrary additional directives into the child's configuration, including auto_prepend_file, extension, disable_functions, open_basedir, and others. Setting auto_prepend_file to an attacker-controlled path yields remote code execution in the child process. This issue has been patched in versions 12.5.22 and 13.1.6.
Source: NIST National Vulnerability Database NVD GitHub Advisory
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-2026-41570 has been found in phpunit/phpunit.
Attackers can target a specific entry point like auto_prepend_file over the network to misuse the product.
Successful exploitation can lead to full system takeover. CVSS score: 7.8/10.
What to do: upgrade phpunit/phpunit to 13.1.6 or later.
If unsure, ask your IT team or search "phpunit/phpunit CVE-2026-41570" on the vendor's site.
CVE-2026-41570 (phpunit/phpunit) — CWE-88 / CVSS v3 7.8
Attack vector: local / no user interaction
Attack surface: auto_prepend_file / extension / disable_functions / open_basedir
Patched: 13.1.6 — apply immediately
Workaround: - Audit INI values: Ensure no <ini value="…"> entry in `phpunit.
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.
A vulnerability (CWE-88) exists in phpunit/phpunit. Attackers reach the vulnerable code path via auto_prepend_file.
Check the vendor advisory for the affected versions of phpunit/phpunit. Attack surface: auto_prepend_file / extension / disable_functions / open_basedir.
Severity: High (CVSS 7.8/10). Successful exploitation can lead to full system takeover.
Update to 13.1.6.
Workaround: - Audit INI values: Ensure no <ini value="…"> entry in `phpunit.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'phpunit/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/phpunit' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
phpunit/phpunitを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
- Audit INI values: Ensure no `<ini value="…">` entry in `phpunit.パッチが適用されるまでの応急処置として、- Audit INI values: Ensure no
<ini value="…">entry in `phpunit. を実施。回避策の副作用 (機能低下) を確認した上で。 -
3Apply patch patch
Upgrade phpunit/phpunit to 13.1.6ステージング環境で 13.1.6 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2026-41570 phpunit
- Ubuntu UBUNTU-CVE-2026-41570 phpunit
References
- advisory github.com
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- patch github.com
- web github.com
- web github.com