Live threats

All CVEs / PHPUnit

CVE-2017-9841PHPUnit

Remote Code Execution in PHPUnit via Exposed eval-stdin.php

Critical 9.8 KEV No auth neededHigh EPSS

Priority
84
CVSS 3.1
9.8
EPSS
100.0%
probability of exploitation in 30 days · percentile 100
Auth required
No
In KEV since
Feb 15, 2022
CISA deadline
Aug 15, 2022
Ransomware use
Unknown
Published
Jun 27, 2017
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-94
SSVC (CISA)
Exploitation: active · Automatable: yes · Technical impact: total
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

What happens

PHPUnit before version 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP code via HTTP POST data beginning with "<?php ". The vulnerability is exploited when the /vendor folder is publicly exposed. CISA has confirmed active exploitation of this vulnerability.

Show the original NVD text

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 text, unmodified. NVD.

Exploitation confirmed by CISA

PHPUnit 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.

Action required by CISA: Apply updates per vendor instructions.

Source text, unmodified. CISA KEV.

What to do

Patch available · fixed versions: 4.8.28, 5.6.3

Update PHPUnit to version 4.8.28 or later (4.x branch) or 5.6.3 or later (5.x branch). Ensure the /vendor folder is not publicly accessible.

Vendor advisory · github.com ↗

  1. Apply the vendor's security update for PHPUnit.
  2. CISA has confirmed it is exploited: treat it as urgent. The deadline for US federal agencies was August 15, 2022.
  3. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
  4. Check logs for signs of earlier exploitation.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
Packagist phpunit/phpunit ≥ 4.8.19 < 4.8.28 4.8.28 composer require "phpunit/phpunit:^4.8.28"
Packagist phpunit/phpunit ≥ 5.0.10 < 5.6.3 5.6.3 composer require "phpunit/phpunit:^5.6.3"

Per OSV / GitHub Advisories (GHSA-r7c9-c69m-rph8). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
phpunit_projectphpunit≤ 4.8.27
phpunit_projectphpunit≥ 5.0.0 < 5.6.3
oraclecommunications_diameter_signaling_router≥ 8.0.0 ≤ 8.5.0

Official sources

References

Links published by the sources. Open them with care.