Vulnerability · Published Nov 29, 2021 · Assigned by php

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

Medium 5.3

In plain English

A medium-severity security flaw in PHP from PHP Group. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 25.3% (higher than 98% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.3Medium
Exploit odds (30 days)25.3%top 2.0% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack tooling1Public PoC

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

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8apcu-panel5.1.18-1.module_el8.6.0+2750+78feabcbALSA-2022:7628
AlmaLinux:8libzip1.6.1-1.module_el8.6.0+2750+78feabcbALSA-2022:7628
AlmaLinux:8libzip1.6.1-1.module_el8.6.0+3239+bedf0508ALSA-2022:7628
AlmaLinux:8libzip-devel1.6.1-1.module_el8.6.0+2750+78feabcbALSA-2022:7628
AlmaLinux:8libzip-devel1.6.1-1.module_el8.6.0+3239+bedf0508ALSA-2022:7628
AlmaLinux:8libzip-tools1.6.1-1.module_el8.6.0+3239+bedf0508ALSA-2022:7628
AlmaLinux:8libzip-tools1.6.1-1.module_el8.6.0+2750+78feabcbALSA-2022:7628
AlmaLinux:8php7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-bcmath7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-cli7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-common7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-dba7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-dbg7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-devel7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-embedded7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-enchant7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-ffi7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-fpm7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-gd7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-gmp7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-intl7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-json7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-ldap7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-mbstring7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-mysqlnd7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-odbc7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-opcache7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-pdo7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-pear1:1.10.13-1.module_el8.6.0+3268+b150a051ALSA-2022:7628
AlmaLinux:8php-pecl-apcu5.1.18-1.module_el8.6.0+2750+78feabcbALSA-2022:7628
AlmaLinux:8php-pecl-apcu5.1.18-1.module_el8.6.0+3239+bedf0508ALSA-2022:7628
AlmaLinux:8php-pecl-apcu-devel5.1.18-1.module_el8.6.0+3239+bedf0508ALSA-2022:7628
AlmaLinux:8php-pecl-apcu-devel5.1.18-1.module_el8.6.0+2750+78feabcbALSA-2022:7628
AlmaLinux:8php-pecl-rrd2.0.1-1.module_el8.6.0+2750+78feabcbALSA-2022:7628
AlmaLinux:8php-pecl-rrd2.0.1-1.module_el8.6.0+3239+bedf0508ALSA-2022:7628
AlmaLinux:8php-pecl-xdebug2.9.5-1.module_el8.6.0+3239+bedf0508ALSA-2022:7628
AlmaLinux:8php-pecl-xdebug2.9.5-1.module_el8.6.0+2750+78feabcbALSA-2022:7628
AlmaLinux:8php-pecl-zip1.18.2-1.module_el8.6.0+2750+78feabcbALSA-2022:7628
AlmaLinux:8php-pecl-zip1.18.2-1.module_el8.6.0+3239+bedf0508ALSA-2022:7628
AlmaLinux:8php-pgsql7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-process7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-snmp7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-soap7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-xml7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
AlmaLinux:8php-xmlrpc7.4.30-1.module_el8.7.0+3286+227f3cf0ALSA-2022:7628
Rocky Linux:8libzip0:1.6.1-1.module+el8.6.0+789+2130c178RLSA-2022:7628
Rocky Linux:8libzip0:1.6.1-1.module+el8.4.0+415+e936cba3RLSA-2022:7628
Rocky Linux:8php0:7.4.30-1.module+el8.7.0+1067+0a7071ccRLSA-2022:7628
Rocky Linux:8php-pear1:1.10.13-1.module+el8.7.0+1067+0a7071ccRLSA-2022:7628
Rocky Linux:8php-pear1:1.10.13-1.module+el8.6.0+1006+0d5a469fRLSA-2022:7628
Rocky Linux:8php-pecl-apcu0:5.1.18-1.module+el8.6.0+789+2130c178RLSA-2022:7628
Rocky Linux:8php-pecl-apcu0:5.1.18-1.module+el8.4.0+415+e936cba3RLSA-2022:7628
Rocky Linux:8php-pecl-rrd0:2.0.1-1.module+el8.4.0+414+2e7afcddRLSA-2022:7628
Rocky Linux:8php-pecl-xdebug0:2.9.5-1.module+el8.4.0+415+e936cba3RLSA-2022:7628
Rocky Linux:8php-pecl-zip0:1.18.2-1.module+el8.6.0+789+2130c178RLSA-2022:7628
Rocky Linux:8php-pecl-zip0:1.18.2-1.module+el8.4.0+415+e936cba3RLSA-2022:7628

Affected products (as reported)

VendorProductVersions
PHP Group PHP 7.3.x – before 7.3.337.4.x – before 7.4.268.0.X – before 8.0.13

Weakness: CWE-159 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

References