CVE-2021-21707

Public Exploit
Special characters break path parsing in XML functions

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.

Category

5.3
CVSS
Severity: Medium
CVSS 3.1 •
CVSS 2.0 •
EPSS 0.92% Top 30%
Vendor Advisory debian.org Vendor Advisory php.net
Affected: PHP Group PHP
Published at:
Updated at:

References

Link Tags
https://bugs.php.net/bug.php?id=79971 issue tracking release notes patch vendor advisory exploit
https://security.netapp.com/advisory/ntap-20211223-0005/ third party advisory
https://www.debian.org/security/2022/dsa-5082 third party advisory vendor advisory
https://www.tenable.com/security/tns-2022-09 release notes third party advisory patch
https://lists.debian.org/debian-lts-announce/2022/12/msg00030.html issue tracking mailing list

Frequently Asked Questions

What is the severity of CVE-2021-21707?
CVE-2021-21707 has been scored as a medium severity vulnerability.
How to fix CVE-2021-21707?
To fix CVE-2021-21707, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2021-21707 being actively exploited in the wild?
It is possible that CVE-2021-21707 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~1% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2021-21707?
CVE-2021-21707 affects PHP Group PHP.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.