Vulnerability · Published Jun 16, 2022 · Assigned by php

CVE-2022-31626mysqlnd/pdo password buffer overflow

High 7.5

In plain English

A high-severity buffer overflow 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 58.1% (higher than 99.1% 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)7.5High
Exploit odds (30 days)58.1%top 0.9% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack tooling1Public PoC

Official description

In PHP versions 7.4.x below 7.4.30, 8.0.x below 8.0.20, and 8.1.x below 8.1.7, when pdo_mysql extension with mysqlnd driver, if the third party is allowed to supply host to connect to and the password for the connection, password of excessive length can trigger a buffer overflow in PHP, which can lead to a remote code execution vulnerability.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8apcu-panel5.1.20-1.module_el8.6.0+2739+efabdb8fALSA-2022:5468
AlmaLinux:8libzip1.7.3-1.module_el8.6.0+2739+efabdb8fALSA-2022:5468
AlmaLinux:8libzip-devel1.7.3-1.module_el8.6.0+2739+efabdb8fALSA-2022:5468
AlmaLinux:8libzip-tools1.7.3-1.module_el8.6.0+2739+efabdb8fALSA-2022:5468
AlmaLinux:9php8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-bcmath8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-cli8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-common8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-dba8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-dbg8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-devel8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-embedded8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-enchant8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-ffi8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-fpm8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-gd8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-gmp8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-intl8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-ldap8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-mbstring8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-mysqlnd8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-odbc8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-opcache8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-pdo8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:8php-pear1:1.10.13-1.module_el8.6.0+3268+b150a051ALSA-2022:5468
AlmaLinux:8php-pecl-apcu5.1.20-1.module_el8.6.0+2739+efabdb8fALSA-2022:5468
AlmaLinux:8php-pecl-apcu-devel5.1.20-1.module_el8.6.0+2739+efabdb8fALSA-2022:5468
AlmaLinux:8php-pecl-rrd2.0.3-1.module_el8.6.0+2739+efabdb8fALSA-2022:5468
AlmaLinux:8php-pecl-xdebug33.1.2-1.module_el8.6.0+2739+efabdb8fALSA-2022:5468
AlmaLinux:8php-pecl-zip1.19.2-1.module_el8.6.0+2739+efabdb8fALSA-2022:5468
AlmaLinux:9php-pgsql8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-process8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-snmp8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-soap8.0.13-2.el9_0ALSA-2022:5904
AlmaLinux:9php-xml8.0.13-2.el9_0ALSA-2022:5904
Rocky Linux:8libzip0:1.6.1-1.module+el8.6.0+789+2130c178RLSA-2022:5467
Rocky Linux:8libzip0:1.6.1-1.module+el8.4.0+415+e936cba3RLSA-2022:5467
Rocky Linux:8libzip0:1.7.3-1.module+el8.6.0+790+fc63e43fRLSA-2022:5468
Rocky Linux:8php0:8.0.13-3.module+el8.6.0+989+3fbff15cRLSA-2022:5468
Rocky Linux:8php0:7.4.19-3.module+el8.6.0+990+389ef54aRLSA-2022:5467
Rocky Linux:9php0:8.0.13-2.el9_0RLSA-2022:5904
Rocky Linux:8php-pear1:1.10.12-1.module+el8.6.0+789+2130c178RLSA-2022:5467
Rocky Linux:8php-pear1:1.10.12-1.module+el8.4.0+415+e936cba3RLSA-2022:5467
Rocky Linux:8php-pear1:1.10.13-1.module+el8.6.0+1006+0d5a469fRLSA-2022:5468
Rocky Linux:8php-pear1:1.10.13-1.module+el8.7.0+1067+0a7071ccRLSA-2022:5468
Rocky Linux:8php-pecl-apcu0:5.1.18-1.module+el8.6.0+789+2130c178RLSA-2022:5467
Rocky Linux:8php-pecl-apcu0:5.1.18-1.module+el8.4.0+415+e936cba3RLSA-2022:5467
Rocky Linux:8php-pecl-apcu0:5.1.20-1.module+el8.6.0+790+fc63e43fRLSA-2022:5468
Rocky Linux:8php-pecl-rrd0:2.0.1-1.module+el8.4.0+414+2e7afcddRLSA-2022:5467
Rocky Linux:8php-pecl-rrd0:2.0.3-1.module+el8.6.0+790+fc63e43fRLSA-2022:5468
Rocky Linux:8php-pecl-xdebug0:2.9.5-1.module+el8.4.0+415+e936cba3RLSA-2022:5467
Rocky Linux:8php-pecl-xdebug30:3.1.2-1.module+el8.6.0+790+fc63e43fRLSA-2022:5468
Rocky Linux:8php-pecl-zip0:1.18.2-1.module+el8.4.0+415+e936cba3RLSA-2022:5467
Rocky Linux:8php-pecl-zip0:1.19.2-1.module+el8.6.0+790+fc63e43fRLSA-2022:5468
Rocky Linux:8php-pecl-zip0:1.18.2-1.module+el8.6.0+789+2130c178RLSA-2022:5467
Ubuntu:22.04:LTSphp8.18.1.2-1ubuntu2.1USN-5479-1
Ubuntu:22.04:LTSphp8.18.1.2-1ubuntu2.1UBUNTU-CVE-2022-31626

Affected products (as reported)

VendorProductVersions
PHP Group PHP 7.4.X – before 7.4.308.0.X – before 8.0.208.1.X – before 8.1.7

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

References