{"id":"CVE-2021-21707","published":"2021-11-29T06:25:08Z","modified":"2024-09-17T03:38:22Z","title":"Special characters break path parsing in XML functions","vendor":"PHP","product":"PHP","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.25315,"percentile":0.97988,"provenance":"source"},"cwes":[{"id":"CWE-159","name":"Improper Handling of Invalid Use of Special Elements"}],"references":[{"url":"https://bugs.php.net/bug.php?id=79971","tags":[]},{"url":"https://security.netapp.com/advisory/ntap-20211223-0005/","tags":[]},{"url":"https://www.debian.org/security/2022/dsa-5082","tags":["vendor-advisory"]},{"url":"https://www.tenable.com/security/tns-2022-09","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2022/12/msg00030.html","tags":["mailing-list"]}],"priority":{"score":28.3,"factors":[{"name":"EPSS percentile","points":19.6},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":3.71}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2025-09-08","earliestUrl":"https://github.com/useru1k/php-8.1.0-dev-exploit","repos":[{"name":"useru1k/php-8.1.0-dev-exploit","url":"https://github.com/useru1k/php-8.1.0-dev-exploit","stars":0,"created":"2025-09-08"}]},"first":{"date":"2025-09-08","source":"PoC-in-GitHub","url":"https://github.com/useru1k/php-8.1.0-dev-exploit"},"provenance":"source"},"vendorSlug":"php","affectedVersions":[{"vendor":"PHP Group","product":"PHP","versions":[">= 7.3.x, < 7.3.33",">= 7.4.x, < 7.4.26",">= 8.0.X, < 8.0.13"]}],"summary":{"text":"A flaw in PHP's XML parsing functions, such as simplexml_load_file(), affects PHP 7.3.x before 7.3.33, 7.4.x before 7.4.26 and 8.0.x before 8.0.13: these functions URL-decode the filename they receive, and an encoded NUL character inside it can be read as the end of the name, so a different file is opened than the one intended. An attacker who can influence the filename passed to these functions over the network, with no authentication or user interaction required, can cause the application to read a file other than the one it was meant to load.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:41:10Z"},"euvd":{"id":"EUVD-2021-8879","exploited":false,"provenance":"source"}}