Skip to main content
Public proof of conceptFix available

CVE-2021-21707

A public proof of concept exists; no exploitation attested.

  • Published2021-11-29
  • Fixed in8.0.13 · 7.4.26 · 7.3.33
  • WeaknessCWE-159

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2021-11-2907:15CVE publishedNVD

Versions per branch

NVD · OSV
PHP
BranchAffectedFixed in
8.0≥ 8.0.0, < 8.0.138.0.13
7.4≥ 7.4.0, < 7.4.267.4.26
7.3≥ 7.3.0, < 7.3.337.3.33
Debian debian linux
BranchAffectedFixed in
10.0= 10.0no fix published
11.0= 11.0no fix published
Netapp clustered data ontap
BranchAffectedFixed in
—all versionsno fix published

1 more product in the sources.

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • libzipRocky Linux:8all versions · fixed in 0:1.6.1-1.module+el8.4.0+415+e936cba3
  • libzipRocky Linux:8all versions · fixed in 0:1.6.1-1.module+el8.6.0+789+2130c178
  • libzipRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:1.6.1-1.module+el8.3.0+6678+b09f589eand 5 other packages
  • libzipAlmaLinux:8all versions · fixed in 1.6.1-1.module_el8.6.0+2750+78feabcband 2 other packages
  • libzipAlmaLinux:8all versions · fixed in 1.6.1-1.module_el8.6.0+3239+bedf0508and 2 other packages
  • phpTuxCare:RHEL:7all versions · fixed in 5.4.16-48.el7.tuxcare.els16and 24 other packages
  • phpTuxCare:OracleLinux:7all versions · fixed in 5.4.16-48.el7.tuxcare.els16and 24 other packages
  • phpTuxCare:CentOS:8.5all versions · fixed in 7.4.19-1.module_el8.5.0+2081+cc873159.tuxcare.els5and 26 other packages

108 more package ranges on OSV.dev

Vendor advisories

  • CVE-2021-21707 Red Hat Product Security423 products fixed · 101 known affected

    php: Special character breaks path in xml parsing

    php as a component of Red Hat Enterprise Linux 6 · php-bcmath as a component of Red Hat Enterprise Linux 6 · php-cli as a component of Red Hat Enterprise Linux 6 · +98 more

  • ICSA-26-027-02 CISA1 known affected

    Festo Didactic SE MES PC

    Festo Didactic SE MES PC shipped with Windows 10

  • RHSA-2022:7628 Red Hat Product Security301 products fixed

    Red Hat Security Advisory: php:7.4 security, bug fix, and enhancement update

  • RHSA-2022:5491 Red Hat Product Security122 products fixed

    Red Hat Security Advisory: rh-php73-php security and bug fix update

Full record on NVD

Fix

  1. Update PHP to 8.0.13 · 7.4.26 · 7.3.33
  2. Vendor fix CISA ICSA-26-027-02 · 1 productFesto Didactic has released Factory Control Panel as a replacement for XAMPP on its MES PCs. Contact technical support at services.didactic@festo.com to obtain the current version of Factory Control Panel which includes fixes for these vulnerabilities.
  3. Vendor fix Red Hat Product Security RHSA-2022:7628 · 301 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 After installing the updated packages, the httpd daemon must be restarted for the update to take effect.
  4. No fix planned, says the vendor Red Hat Product Security CVE-2021-21707 · 101 productsOut of support scope

Advisories and patches

Detection

read 2026-11-01 01:02 UTC
Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CNACVSS 3.15.3known since 2026-10-23
  • NVDCVSS 3.15.3read 2026-10-23
  • NVDCVSS 2.05read 2026-10-23
  • CNAweakness (CWE)CWE-159known since 2026-10-23
  • FIRST EPSSEPSS score25.3 %read 2026-12-04
  • PoC-in-GitHubproof of concept1known since 2026-11-01
  • OSVaffected packages—
  • GitHub Advisoriesadvisory—

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Published
2021-11-29
Last modified
2026-06-17
NVD status
Modified
GitHub advisory
GHSA-qh78-qfw9-93x9

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.

Is CVE-2021-21707 actively exploited?

Active exploitation of CVE-2021-21707 has not been confirmed. Its EPSS score was 25.3% on 2026-12-04, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2021-21707?

CVE-2021-21707 has a CVSS v3 base score of 5.3 (Medium severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.

Running PHP? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record