Skip to content
High 7.8

Vulnerability in phpunit/phpunit

CVE-2026-41570 First seen on SecPulse

AI summary

Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.

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.

What is the problem

A vulnerability (CWE-88) exists in phpunit/phpunit. Attackers reach the vulnerable code path via auto_prepend_file.

Affected scope

Check the vendor advisory for the affected versions of phpunit/phpunit. Attack surface: auto_prepend_file / extension / disable_functions / open_basedir.

Severity

Severity: High (CVSS 7.8/10). Successful exploitation can lead to full system takeover.

How to fix

Update to 13.1.6.

Workaround

Workaround: - Audit INI values: Ensure no <ini value="…"> entry in `phpunit.

Detection

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

  1. 1
    Identify exposureidentify
    grep -r 'phpunit/phpunit' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で phpunit/phpunit を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply temporary workaroundmitigate
    - Audit INI values: Ensure no `<ini value="…">` entry in `phpunit.

    パッチが適用されるまでの応急処置として、- Audit INI values: Ensure no <ini value="…"> entry in `phpunit. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patchpatch
    Upgrade phpunit/phpunit to 13.1.6

    ステージング環境で 13.1.6 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  4. 4
    Post-deployment verificationverify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

PackageAffected → Fixed
composerphpunit/phpunit
< 13.1.6→ 13.1.6
Packagistphpunit/phpunit
≥ 13.1.5, < 13.1.6→ 13.1.6

Fix status by distribution

Records published by each distribution for this CVE. Fixed versions differ by release; check each link.

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

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details