Absolute Path Traversal in PHP - CVE-2021-21706

 

Absolute Path Traversal in PHP - CVE-2021-21706

Published: September 29, 2021 / Updated: September 30, 2021


Vulnerability identifier: #VU56905
CSH Severity: Medium
CVSS v4: 9.1 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N]
CVE-ID: CVE-2021-21706
CWE-ID: CWE-36
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker overwrite files on the system.

The vulnerability exists due to insufficient filtration of file names in the php_zip_make_relative_path() function on Windows systems. A remote attacker can construct a specially crafted ZIP archive, which once extracted by the ZipArchive::extractTo() function, can overwrite files outside of the destination directory.

Successful exploitation of the vulnerability may allow an attacker to overwrite arbitrary files on the system with privileges of the web server, but requires that the web application is running on Windows.


Affected software

PHP
EasyApache
SUSE Manager Proxy
SUSE Manager Retail Branch Server
SUSE Manager Server
SUSE Enterprise Storage
SUSE Linux Enterprise High Performance Computing
SUSE Linux Enterprise Module for Web Scripting
SUSE Linux Enterprise Server
SUSE Linux Enterprise Server for SAP Applications
SUSE Linux Enterprise Software Development Kit
SUSE Linux Enterprise Server for SAP
openSUSE Leap
SUSE Linux Enterprise Module for Packagehub Subpackages
php74-sodium
php74-opcache
php74-sockets-debuginfo
php74-sockets
php74-soap-debuginfo
php74-soap
php74-snmp-debuginfo
php74-snmp
php74-shmop-debuginfo
php74-shmop
php74-readline-debuginfo
php74-readline
php74-posix-debuginfo
php74-posix
php74-phar-debuginfo
php74-phar
php74-pgsql-debuginfo
php74-pgsql
php74-pdo-debuginfo
php74-pdo
php74-pcntl-debuginfo
php74-pcntl
php74-openssl-debuginfo
php74-openssl
php74-opcache-debuginfo
php74-debuginfo
php74-tokenizer-debuginfo
php74-zlib-debuginfo
php74-zlib
php74-zip-debuginfo
php74-zip
php74-xsl-debuginfo
php74-xsl
php74-xmlwriter-debuginfo
php74-xmlwriter
php74-xmlrpc-debuginfo
php74-xmlrpc
php74-xmlreader-debuginfo
php74-xmlreader
php74-sodium-debuginfo
php74-tokenizer
php74-tidy-debuginfo
php74-tidy
php74-sysvshm-debuginfo
php74-sysvshm
php74-sysvsem-debuginfo
php74-sysvsem
php74-sysvmsg-debuginfo
php74-sysvmsg
php74-sqlite-debuginfo
php74-sqlite
php74-ctype
php74-fastcgi
php74-exif-debuginfo
php74-exif
php74-enchant-debuginfo
php74-enchant
php74-dom-debuginfo
php74-dom
php74-dba-debuginfo
php74-dba
php74-curl-debuginfo
php74-curl
php74-ctype-debuginfo
php74-odbc
php74-calendar-debuginfo
php74-calendar
php74-bz2-debuginfo
php74-bz2
php74-bcmath-debuginfo
php74-bcmath
php74
apache2-mod_php74-debuginfo
apache2-mod_php74
php74-devel
php74-debugsource
php74-odbc-debuginfo
php74-fileinfo
php74-fastcgi-debuginfo
php74-mysql-debuginfo
php74-mysql
php74-mbstring-debuginfo
php74-mbstring
php74-ldap-debuginfo
php74-ldap
php74-json-debuginfo
php74-json
php74-intl-debuginfo
php74-intl
php74-iconv-debuginfo
php74-gmp-debuginfo
php74-iconv
php74-fileinfo-debuginfo
php74-fpm
php74-fpm-debuginfo
php74-ftp
php74-ftp-debuginfo
php74-gd
php74-gd-debuginfo
php74-gettext
php74-gettext-debuginfo
php74-gmp
php7-phar-debuginfo
php7-posix
php7-posix-debuginfo
php7-readline
php7-readline-debuginfo
php7-shmop
php7-shmop-debuginfo
php7-snmp
php7-snmp-debuginfo
php7-soap
php7-soap-debuginfo
php7-sockets
php7-sockets-debuginfo
php7-phar
php7-pgsql-debuginfo
php7-pgsql
php7-pdo-debuginfo
php7-pdo
php7-pcntl-debuginfo
php7-pcntl
php7-openssl-debuginfo
php7-openssl
php7-opcache-debuginfo
php7-opcache
php7-odbc-debuginfo
php7-odbc
php7-tokenizer
php7-zlib-debuginfo
php7-zlib
php7-zip-debuginfo
php7-zip
php7-xsl-debuginfo
php7-xsl
php7-xmlwriter-debuginfo
php7-xmlwriter
php7-xmlrpc-debuginfo
php7-xmlrpc
php7-xmlreader-debuginfo
php7-xmlreader
php7-tokenizer-debuginfo
php7-sodium
php7-tidy-debuginfo
php7-tidy
php7-test
php7-sysvshm-debuginfo
php7-sysvshm
php7-sysvsem-debuginfo
php7-sysvsem
php7-sysvmsg-debuginfo
php7-sysvmsg
php7-sqlite-debuginfo
php7-sqlite
php7-sodium-debuginfo
php7-ctype-debuginfo
php7-enchant-debuginfo
php7-enchant
php7-embed-debuginfo
php7-embed
php7-dom-debuginfo
php7-dom
php7-devel
php7-debugsource
php7-debuginfo
php7-dba-debuginfo
php7-dba
php7-curl-debuginfo
php7-curl
php7-exif
php7-ctype
php7-calendar-debuginfo
php7-calendar
php7-bz2-debuginfo
php7-bz2
php7-bcmath-debuginfo
php7-bcmath
php7
apache2-mod_php7-debuginfo
apache2-mod_php7
php7-firebird-debuginfo
php7-firebird
php7-gettext-debuginfo
php7-mysql
php7-mbstring-debuginfo
php7-mbstring
php7-ldap-debuginfo
php7-ldap
php7-json-debuginfo
php7-json
php7-intl-debuginfo
php7-intl
php7-iconv-debuginfo
php7-iconv
php7-gmp-debuginfo
php7-gmp
php7-mysql-debuginfo
php7-gettext
php7-gd-debuginfo
php7-gd
php7-ftp-debuginfo
php7-ftp
php7-fpm-debuginfo
php7-fpm
php7-fileinfo-debuginfo
php7-fileinfo
php7-fastcgi-debuginfo
php7-fastcgi
php7-exif-debuginfo

How to mitigate CVE-2021-21706

Install updates from vendor's website.

PHP - addressed in versions 7.3.31, 7.4.24, 8.0.11
EasyApache - update to 4 2021-9-29
php74-sodium - update to 7.4.33-1.47.2
php74-opcache - update to 7.4.33-1.47.2
php74-sockets-debuginfo - update to 7.4.33-1.47.2
php74-sockets - update to 7.4.33-1.47.2
php74-soap-debuginfo - update to 7.4.33-1.47.2
php74-soap - update to 7.4.33-1.47.2
php74-snmp-debuginfo - update to 7.4.33-1.47.2
php74-snmp - update to 7.4.33-1.47.2
php74-shmop-debuginfo - update to 7.4.33-1.47.2
php74-shmop - update to 7.4.33-1.47.2
php74-readline-debuginfo - update to 7.4.33-1.47.2
php74-readline - update to 7.4.33-1.47.2
php74-posix-debuginfo - update to 7.4.33-1.47.2
php74-posix - update to 7.4.33-1.47.2
php74-phar-debuginfo - update to 7.4.33-1.47.2
php74-phar - update to 7.4.33-1.47.2
php74-pgsql-debuginfo - update to 7.4.33-1.47.2
php74-pgsql - update to 7.4.33-1.47.2
php74-pdo-debuginfo - update to 7.4.33-1.47.2
php74-pdo - update to 7.4.33-1.47.2
php74-pcntl-debuginfo - update to 7.4.33-1.47.2
php74-pcntl - update to 7.4.33-1.47.2
php74-openssl-debuginfo - update to 7.4.33-1.47.2
php74-openssl - update to 7.4.33-1.47.2
php74-opcache-debuginfo - update to 7.4.33-1.47.2
php74-debuginfo - update to 7.4.33-1.47.2
php74-tokenizer-debuginfo - update to 7.4.33-1.47.2
php74-zlib-debuginfo - update to 7.4.33-1.47.2
php74-zlib - update to 7.4.33-1.47.2
php74-zip-debuginfo - update to 7.4.33-1.47.2
php74-zip - update to 7.4.33-1.47.2
php74-xsl-debuginfo - update to 7.4.33-1.47.2
php74-xsl - update to 7.4.33-1.47.2
php74-xmlwriter-debuginfo - update to 7.4.33-1.47.2
php74-xmlwriter - update to 7.4.33-1.47.2
php74-xmlrpc-debuginfo - update to 7.4.33-1.47.2
php74-xmlrpc - update to 7.4.33-1.47.2
php74-xmlreader-debuginfo - update to 7.4.33-1.47.2
php74-xmlreader - update to 7.4.33-1.47.2
php74-sodium-debuginfo - update to 7.4.33-1.47.2
php74-tokenizer - update to 7.4.33-1.47.2
php74-tidy-debuginfo - update to 7.4.33-1.47.2
php74-tidy - update to 7.4.33-1.47.2
php74-sysvshm-debuginfo - update to 7.4.33-1.47.2
php74-sysvshm - update to 7.4.33-1.47.2
php74-sysvsem-debuginfo - update to 7.4.33-1.47.2
php74-sysvsem - update to 7.4.33-1.47.2
php74-sysvmsg-debuginfo - update to 7.4.33-1.47.2
php74-sysvmsg - update to 7.4.33-1.47.2
php74-sqlite-debuginfo - update to 7.4.33-1.47.2
php74-sqlite - update to 7.4.33-1.47.2
php74-ctype - update to 7.4.33-1.47.2
php74-fastcgi - update to 7.4.33-1.47.2
php74-exif-debuginfo - update to 7.4.33-1.47.2
php74-exif - update to 7.4.33-1.47.2
php74-enchant-debuginfo - update to 7.4.33-1.47.2
php74-enchant - update to 7.4.33-1.47.2
php74-dom-debuginfo - update to 7.4.33-1.47.2
php74-dom - update to 7.4.33-1.47.2
php74-dba-debuginfo - update to 7.4.33-1.47.2
php74-dba - update to 7.4.33-1.47.2
php74-curl-debuginfo - update to 7.4.33-1.47.2
php74-curl - update to 7.4.33-1.47.2
php74-ctype-debuginfo - update to 7.4.33-1.47.2
php74-odbc - update to 7.4.33-1.47.2
php74-calendar-debuginfo - update to 7.4.33-1.47.2
php74-calendar - update to 7.4.33-1.47.2
php74-bz2-debuginfo - update to 7.4.33-1.47.2
php74-bz2 - update to 7.4.33-1.47.2
php74-bcmath-debuginfo - update to 7.4.33-1.47.2
php74-bcmath - update to 7.4.33-1.47.2
php74 - update to 7.4.33-1.47.2
apache2-mod_php74-debuginfo - update to 7.4.33-1.47.2
apache2-mod_php74 - update to 7.4.33-1.47.2
php74-devel - update to 7.4.33-1.47.2
php74-debugsource - update to 7.4.33-1.47.2
php74-odbc-debuginfo - update to 7.4.33-1.47.2
php74-fileinfo - update to 7.4.33-1.47.2
php74-fastcgi-debuginfo - update to 7.4.33-1.47.2
php74-mysql-debuginfo - update to 7.4.33-1.47.2
php74-mysql - update to 7.4.33-1.47.2
php74-mbstring-debuginfo - update to 7.4.33-1.47.2
php74-mbstring - update to 7.4.33-1.47.2
php74-ldap-debuginfo - update to 7.4.33-1.47.2
php74-ldap - update to 7.4.33-1.47.2
php74-json-debuginfo - update to 7.4.33-1.47.2
php74-json - update to 7.4.33-1.47.2
php74-intl-debuginfo - update to 7.4.33-1.47.2
php74-intl - update to 7.4.33-1.47.2
php74-iconv-debuginfo - update to 7.4.33-1.47.2
php74-gmp-debuginfo - update to 7.4.33-1.47.2
php74-iconv - update to 7.4.33-1.47.2
php74-fileinfo-debuginfo - update to 7.4.33-1.47.2
php74-fpm - update to 7.4.33-1.47.2
php74-fpm-debuginfo - update to 7.4.33-1.47.2
php74-ftp - update to 7.4.33-1.47.2
php74-ftp-debuginfo - update to 7.4.33-1.47.2
php74-gd - update to 7.4.33-1.47.2
php74-gd-debuginfo - update to 7.4.33-1.47.2
php74-gettext - update to 7.4.33-1.47.2
php74-gettext-debuginfo - update to 7.4.33-1.47.2
php74-gmp - update to 7.4.33-1.47.2
php7-phar-debuginfo - update to 7.4.33-150200.3.46.2
php7-posix - update to 7.4.33-150200.3.46.2
php7-posix-debuginfo - update to 7.4.33-150200.3.46.2
php7-readline - update to 7.4.33-150200.3.46.2
php7-readline-debuginfo - update to 7.4.33-150200.3.46.2
php7-shmop - update to 7.4.33-150200.3.46.2
php7-shmop-debuginfo - update to 7.4.33-150200.3.46.2
php7-snmp - update to 7.4.33-150200.3.46.2
php7-snmp-debuginfo - update to 7.4.33-150200.3.46.2
php7-soap - update to 7.4.33-150200.3.46.2
php7-soap-debuginfo - update to 7.4.33-150200.3.46.2
php7-sockets - update to 7.4.33-150200.3.46.2
php7-sockets-debuginfo - update to 7.4.33-150200.3.46.2
php7-phar - update to 7.4.33-150200.3.46.2
php7-pgsql-debuginfo - update to 7.4.33-150200.3.46.2
php7-pgsql - update to 7.4.33-150200.3.46.2
php7-pdo-debuginfo - update to 7.4.33-150200.3.46.2
php7-pdo - update to 7.4.33-150200.3.46.2
php7-pcntl-debuginfo - update to 7.4.33-150200.3.46.2
php7-pcntl - update to 7.4.33-150200.3.46.2
php7-openssl-debuginfo - update to 7.4.33-150200.3.46.2
php7-openssl - update to 7.4.33-150200.3.46.2
php7-opcache-debuginfo - update to 7.4.33-150200.3.46.2
php7-opcache - update to 7.4.33-150200.3.46.2
php7-odbc-debuginfo - update to 7.4.33-150200.3.46.2
php7-odbc - update to 7.4.33-150200.3.46.2
php7-tokenizer - update to 7.4.33-150200.3.46.2
php7-zlib-debuginfo - update to 7.4.33-150200.3.46.2
php7-zlib - update to 7.4.33-150200.3.46.2
php7-zip-debuginfo - update to 7.4.33-150200.3.46.2
php7-zip - update to 7.4.33-150200.3.46.2
php7-xsl-debuginfo - update to 7.4.33-150200.3.46.2
php7-xsl - update to 7.4.33-150200.3.46.2
php7-xmlwriter-debuginfo - update to 7.4.33-150200.3.46.2
php7-xmlwriter - update to 7.4.33-150200.3.46.2
php7-xmlrpc-debuginfo - update to 7.4.33-150200.3.46.2
php7-xmlrpc - update to 7.4.33-150200.3.46.2
php7-xmlreader-debuginfo - update to 7.4.33-150200.3.46.2
php7-xmlreader - update to 7.4.33-150200.3.46.2
php7-tokenizer-debuginfo - update to 7.4.33-150200.3.46.2
php7-sodium - update to 7.4.33-150200.3.46.2
php7-tidy-debuginfo - update to 7.4.33-150200.3.46.2
php7-tidy - update to 7.4.33-150200.3.46.2
php7-test - update to 7.4.33-150200.3.46.2
php7-sysvshm-debuginfo - update to 7.4.33-150200.3.46.2
php7-sysvshm - update to 7.4.33-150200.3.46.2
php7-sysvsem-debuginfo - update to 7.4.33-150200.3.46.2
php7-sysvsem - update to 7.4.33-150200.3.46.2
php7-sysvmsg-debuginfo - update to 7.4.33-150200.3.46.2
php7-sysvmsg - update to 7.4.33-150200.3.46.2
php7-sqlite-debuginfo - update to 7.4.33-150200.3.46.2
php7-sqlite - update to 7.4.33-150200.3.46.2
php7-sodium-debuginfo - update to 7.4.33-150200.3.46.2
php7-ctype-debuginfo - update to 7.4.33-150200.3.46.2
php7-enchant-debuginfo - update to 7.4.33-150200.3.46.2
php7-enchant - update to 7.4.33-150200.3.46.2
php7-embed-debuginfo - update to 7.4.33-150200.3.46.2
php7-embed - update to 7.4.33-150200.3.46.2
php7-dom-debuginfo - update to 7.4.33-150200.3.46.2
php7-dom - update to 7.4.33-150200.3.46.2
php7-devel - update to 7.4.33-150200.3.46.2
php7-debugsource - update to 7.4.33-150200.3.46.2
php7-debuginfo - update to 7.4.33-150200.3.46.2
php7-dba-debuginfo - update to 7.4.33-150200.3.46.2
php7-dba - update to 7.4.33-150200.3.46.2
php7-curl-debuginfo - update to 7.4.33-150200.3.46.2
php7-curl - update to 7.4.33-150200.3.46.2
php7-exif - update to 7.4.33-150200.3.46.2
php7-ctype - update to 7.4.33-150200.3.46.2
php7-calendar-debuginfo - update to 7.4.33-150200.3.46.2
php7-calendar - update to 7.4.33-150200.3.46.2
php7-bz2-debuginfo - update to 7.4.33-150200.3.46.2
php7-bz2 - update to 7.4.33-150200.3.46.2
php7-bcmath-debuginfo - update to 7.4.33-150200.3.46.2
php7-bcmath - update to 7.4.33-150200.3.46.2
php7 - update to 7.4.33-150200.3.46.2
apache2-mod_php7-debuginfo - update to 7.4.33-150200.3.46.2
apache2-mod_php7 - update to 7.4.33-150200.3.46.2
php7-firebird-debuginfo - update to 7.4.33-150200.3.46.2
php7-firebird - update to 7.4.33-150200.3.46.2
php7-gettext-debuginfo - update to 7.4.33-150200.3.46.2
php7-mysql - update to 7.4.33-150200.3.46.2
php7-mbstring-debuginfo - update to 7.4.33-150200.3.46.2
php7-mbstring - update to 7.4.33-150200.3.46.2
php7-ldap-debuginfo - update to 7.4.33-150200.3.46.2
php7-ldap - update to 7.4.33-150200.3.46.2
php7-json-debuginfo - update to 7.4.33-150200.3.46.2
php7-json - update to 7.4.33-150200.3.46.2
php7-intl-debuginfo - update to 7.4.33-150200.3.46.2
php7-intl - update to 7.4.33-150200.3.46.2
php7-iconv-debuginfo - update to 7.4.33-150200.3.46.2
php7-iconv - update to 7.4.33-150200.3.46.2
php7-gmp-debuginfo - update to 7.4.33-150200.3.46.2
php7-gmp - update to 7.4.33-150200.3.46.2
php7-mysql-debuginfo - update to 7.4.33-150200.3.46.2
php7-gettext - update to 7.4.33-150200.3.46.2
php7-gd-debuginfo - update to 7.4.33-150200.3.46.2
php7-gd - update to 7.4.33-150200.3.46.2
php7-ftp-debuginfo - update to 7.4.33-150200.3.46.2
php7-ftp - update to 7.4.33-150200.3.46.2
php7-fpm-debuginfo - update to 7.4.33-150200.3.46.2
php7-fpm - update to 7.4.33-150200.3.46.2
php7-fileinfo-debuginfo - update to 7.4.33-150200.3.46.2
php7-fileinfo - update to 7.4.33-150200.3.46.2
php7-fastcgi-debuginfo - update to 7.4.33-150200.3.46.2
php7-fastcgi - update to 7.4.33-150200.3.46.2
php7-exif-debuginfo - update to 7.4.33-150200.3.46.2

External References

Related Security Bulletins