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

Published Nov 15, 2021
·
Updated

Fixed bug (special character is breaking the path in xml function). (CVE-2021-21707)

Other sources

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 simplexmlloadfile(), 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.

Launchpad

Special characters break path parsing in XML functions

Microsoft

Affected Software

10 affected componentsFixes available
PHP PHP<8.0.13
8.0.13
debian/php7.4
7.4.33-1+deb11u57.4.33-1+deb11u8
PHP PHP>=7.3.0<7.3.33
PHP PHP>=7.4.0<7.4.26
PHP PHP>=8.0.0<8.0.13
NetApp Clustered Data ONTAP
Debian Debian Linux=10.0
Debian Debian Linux=11.0
Tenable Tenable.Sc<5.21.0
Microsoft cbl2 php

Event History

Nov 18, 2021
CVE Published
via PHP·12:00 AM
Nov 29, 2021
CVE Published
via MITRE·06:25 AM
Data Sourced
via MITRE·06:25 AM
DescriptionSeverityWeakness
Jan 11, 2024
Data Sourced
via Launchpad·11:54 PM
Description
Sep 16, 2024
Data Sourced
via Ubuntu·02:30 AM
RemedyDescriptionSeverityAffected Software
Mar 23, 2025
Data Sourced
via Debian·03:46 AM
DescriptionAffected Software
Oct 1, 2025
Data Sourced
via Microsoft·11:11 PM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·11:11 PM
Affected Software
Updated
via Microsoft·11:11 PM
DescriptionSeverity
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID for this bug?

The vulnerability ID for this bug is CVE-2021-21707.

2

What is the severity level of CVE-2021-21707?

The severity level of CVE-2021-21707 is medium with a severity value of 5.3.

3

Which versions of PHP are affected by CVE-2021-21707?

PHP versions 7.3.x below 7.3.33, 7.4.x below 7.4.26, and 8.0.x below 8.0.13 are affected by CVE-2021-21707.

4

How does CVE-2021-21707 impact the affected software?

CVE-2021-21707 can cause certain XML parsing functions in PHP to interpret an URL-encoded NUL character as the end of the filename, potentially leading to file path manipulation.

5

Where can I find more information about CVE-2021-21707?

More information about CVE-2021-21707 can be found at the following references: [Mitre](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-21707), [Ubuntu Security Notices - USN-5300-1](https://ubuntu.com/security/notices/USN-5300-1), [Ubuntu Security Notices - USN-5300-2](https://ubuntu.com/security/notices/USN-5300-2).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203