LiveActive security incident?Get immediate response
CVE Record

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

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.

CriticalCVSS 9.8Known exploitedUpdated
Glexia's TakeAutomated analysiscritical

Security readout for executives and security teams

Plain-English summary

CVE-2017-9841 is a critical remote code execution flaw in old PHPUnit releases. If a production website exposes PHPUnit files under its public vendor directory, an unauthenticated attacker can make the server run PHP code. CISA lists it in KEV, so treat internet exposure as urgent.

Executive priority

Treat this as immediate remediation for internet-facing PHP estates. The issue is old but still business-relevant because CISA KEV confirms real-world exploitation and successful compromise can give attackers server-side code execution.

Technical view

PHPUnit before 4.8.28 and 5.x before 5.6.3 included Util/PHP/eval-stdin.php, which evaluates PHP provided through POST data when reachable over HTTP. The described exposure is a web-accessible /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php path. CWE-94 and CVSS 9.8 reflect unauthenticated network code execution.

Likely exposure

Highest risk is PHP applications that shipped development dependencies to production and expose /vendor under the web root. Composer-based PHP sites, older CMS deployments, and legacy hosting environments should be checked. The source bundle does not identify every downstream product embedding vulnerable PHPUnit.

Exploitation context

Active exploitation is supported by CISA KEV. Public descriptions show attacks against sites with exposed vendor folders. The available sources establish remote unauthenticated code execution conditions, but this analysis does not rely on exploit code or provide operational attack steps.

Researcher notes

Key evidence is consistent: affected PHPUnit version ranges, the eval-stdin.php component, unauthenticated HTTP reachability, CWE-94, CVSS 9.8, and KEV listing. Downstream exposure depends on deployment layout, not only package presence. Avoid assuming impact where PHPUnit is not web-accessible.

Mitigation direction

  • Upgrade PHPUnit to 4.8.28, 5.6.3, or a later supported release.
  • Remove PHPUnit and other development dependencies from production deployments.
  • Ensure /vendor is not directly reachable from the public web root.
  • Review vendor guidance for embedded or packaged PHPUnit copies.
  • Prioritize internet-facing PHP applications before internal-only systems.

Validation and detection

  • Inventory production PHP applications for installed PHPUnit versions.
  • Check whether public web roots expose Composer vendor directories.
  • Confirm vulnerable eval-stdin.php is absent or unreachable externally.
  • Review web logs for requests targeting PHPUnit paths.
  • Verify deployed builds exclude development dependencies.
Prepared
Confidence
high
Sources
6

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-94: Code execution behavior lookup

Code execution and unsafe deserialization weaknesses often justify reviewing execution behavior and process telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2017-9841 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Critical
CVSS
9.8 (3.1)
Known Exploited
Yes
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
6Source links

CISA KEV status

Status
Known exploited
Source
CISA / ADP
Date added
Not provided

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
9.8CVSS 3.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H3.95.9Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

9.8Critical
CVSS 3.1 vector shape for CVE-2017-9841Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
n/an/an/aListed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-94 · source CWE mapping

Improper Control of Generation of Code ('Code Injection')

Improper Control of Generation of Code ('Code Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.