CVE-2021-21707

CVE-2021-21707 is a medium-severity vulnerability in Php with a CVSS 3.x base score of 5.3. Its EPSS exploit-prediction score of 26% places it in the 98th percentile, indicating an elevated likelihood of exploitation. The underlying weakness is classified as CWE-159.

Key facts

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.

Frequently asked questions

What is CVE-2021-21707?
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.
How severe is CVE-2021-21707?
CVE-2021-21707 has a CVSS 3.x base score of 5.3, rated medium severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is low, integrity none, and availability none.
Is CVE-2021-21707 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 26% (98th percentile), an estimate of the probability of exploitation in the next 30 days.
What products are affected by CVE-2021-21707?
CVE-2021-21707 primarily affects Php. In total, 5 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
How do I fix CVE-2021-21707?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
When was CVE-2021-21707 published?
CVE-2021-21707 was published on 2021-11-29 and last updated on 2026-06-17.

References

Affected products (5)

More vulnerabilities in Php

All CVEs affecting Php →

Other CWE-159 vulnerabilities

Browse all CWE-159 vulnerabilities →

Threat intelligence

Threat-intel indicators referencing this CVE: