# CVE-2021-21707: Special characters break path parsing in XML functions

- Severity: Medium 5.3 (CVSS:3.1, scored by php) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 25.3%, higher than 97% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-11-29T06:25:08.814Z
- Modified: 2026-09-08T08:48:24.627Z
- Also known as: BIT-LIBPHP-2021-21707, BIT-PHP-2021-21707, BIT-PHP-MIN-2021-21707
- Weaknesses: CWE-159
- Assigned by: php

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

(As written by CVE List.)

## Affected

- PHP Group PHP: from 7.3.x before 7.3.33; from 7.4.x before 7.4.26; from 8.0.X before 8.0.13
- php php: from 7.3.0 before 7.3.33; from 7.4.0 before 7.4.26; from 8.0.0 before 8.0.13
- netapp clustered_data_ontap: no versions given
- debian debian_linux: 10.0; 11.0
- tenable tenable.sc: before 5.21.0
- libphp (Bitnami): from 7.3.0 before 7.3.33; from 7.4.0 before 7.4.26; from 8.0.0 before 8.0.13
- php (Bitnami): from 7.3.0 before 7.3.33; from 7.4.0 before 7.4.26; from 8.0.0 before 8.0.13
- php-min (Bitnami): from 7.3.0 before 7.3.33; from 7.4.0 before 7.4.26; from 8.0.0 before 8.0.13

## Every score

- php: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:P/I:N/A:N`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://bugs.php.net/bug.php?id=79971> (exploit, advisory, issue-tracking, patch, release-notes, vendor-advisory)
- <https://security.netapp.com/advisory/ntap-20211223-0005/> (advisory, third-party-advisory)
- <https://www.debian.org/security/2022/dsa-5082> (advisory, third-party-advisory, vendor-advisory)
- <https://www.tenable.com/security/tns-2022-09> (advisory, patch, release-notes, third-party-advisory)
- <https://lists.debian.org/debian-lts-announce/2022/12/msg00030.html> (issue-tracking, mailing-list, report)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-21707> (web)

## Sources

- CVE List: [CVE-2021-21707](https://www.cve.org/CVERecord?id=CVE-2021-21707), CVE Terms of Use, modified 2024-09-17
- NVD: [CVE-2021-21707](https://nvd.nist.gov/vuln/detail/CVE-2021-21707), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-LIBPHP-2021-21707](https://osv.dev/vulnerability/BIT-LIBPHP-2021-21707), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-PHP-2021-21707](https://osv.dev/vulnerability/BIT-PHP-2021-21707), Apache-2.0, modified 2026-09-08
- Bitnami Vulnerability Database: [BIT-PHP-MIN-2021-21707](https://osv.dev/vulnerability/BIT-PHP-MIN-2021-21707), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-21707 · Whole record: https://cve.day/CVE-2021-21707.json · Rebuilt by cve.day 2026-11-25T22:58:05.765Z
