Skip to content

← Actionable
Critical, CVSS 9.8Exploited · CISA KEV

Code Injection in PHPUnit

CVE-2017-9841GHSA-r7c9-c69m-rph8

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (phpunit/phpunit 5.6.3, 4.8.28), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • Packagist phpunit/phpunit

    Affected
    >= 4.8.19, < 4.8.28>= 5.0.10, < 5.6.3
    Fixed in
    5.6.3, 4.8.28

Sources

Severity and exploitation
Exploitation
Confirmed: listed in the CISA Known Exploited Vulnerabilities catalog.
CVSS
9.8 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H
EPSS
  • CVE-2017-9841: 100.00% estimated exploitation activity in the next 30 days; percentile 99.99 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

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.

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-r7c9-c69m-rph8

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2017-9841

Advisory: Code Injection in PHPUnit
IDs: CVE-2017-9841, GHSA-r7c9-c69m-rph8
Record: https://patchnext.com/advisories/cve-2017-9841 (revision 1, source checked 26 Oct 2026, 14:34 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Critical (CVSS 9.8)
Exploitation: confirmed: listed in the CISA Known Exploited Vulnerabilities catalog.
Vendor response: Vendor fix available; fixed versions by package: phpunit/phpunit 5.6.3, 4.8.28. A vendor fix does not mean a deployment is fixed.

## Affected components
- Packagist phpunit/phpunit: affected >= 4.8.19, < 4.8.28; >= 5.0.10, < 5.6.3; fixed in 5.6.3, 4.8.28

## Suggested inspection (read-only)
- Packagist phpunit/phpunit: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on phpunit/phpunit.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://www.cisa.gov/known-exploited-vulnerabilities-catalog (CISA added CVE-2017-9841 to the Known Exploited Vulnerabilities catalog on 2022-02-15.)
- Verified: https://github.com/advisories/GHSA-r7c9-c69m-rph8 (GitHub-reviewed advisory GHSA-r7c9-c69m-rph8 lists affected ranges: Packagist phpunit/phpunit >=4.8.19 =5.0.10 <5.6.3)

Commands are suggestions: review each one before running it.

Loading voting…