CVE-2021-21707

Special characters break path parsing in XML functions

MEDIUM
5.3
CVSS Score
Published: November 29, 2021 at 06:25 AM UTC
Updated: June 17, 2026 at 03:36 AM UTC
4 products affected across 4 vendorsDebian LinuxPHPClustered Data ONTAP

Using PHP by PHP Group?

Get instant alerts when new vulnerabilities affect PHP - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.3
Exploit prediction
EPSS 25%

Description

In PHP versions 7.3.x below 7.3.33, 7.4.x below 7.4.26 and 8.0.x below 8.0.13, certain XML parsing functions, like simplexml_load_file(), URL-decode the filename passed to them. If that filename contains URL-encoded NUL character, this may cause the function to interpret this as the end of the filename, thus interpreting the filename differently from what the user intended, which may lead it to reading a different file than intended.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

PHP· PHPdrupal
95%
7.3.0 ≤ v < 7.3.337.3.x ≤ v < 7.3.337.4.0 ≤ v < 7.4.267.4.x ≤ v < 7.4.268.0.0 ≤ v < 8.0.138.0.X ≤ v < 8.0.137.3.x7.4.x8.0.X
Affected range stops below 7.3.33, so it looks safe — our inference, not a vendor statement
Affected range stops below 7.4.26, so it looks safe — our inference, not a vendor statement
Affected range stops below 8.0.13, so it looks safe — our inference, not a vendor statement
v < 5.21.0
Affected range stops below 5.21.0, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (5)

CVSS

5.3MEDIUMphp
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
LOW
Integrity
NONE
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-159NVD-CWE-Other

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card