CVE-2022-31626 in the critical feed json
mysqlnd/pdo password buffer overflow
published 2022-06-16 4 y ago modified 2026-09-08 2 mo ago also BIT-libphp-2022-31626 , BIT-php-2022-31626 , BIT-php-min-2022-31626 , EUVD-2022-53078
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 58.1%
- EPSS 58.1% chance of exploitation in 30 days, percentile 99%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- bitnami libphp 7.4.30, 8.0.20, 8.1.7
- bitnami php 7.4.30, 8.0.20, 8.1.7
- bitnami php-min 7.4.30, 8.0.20, 8.1.7
- PHP Group PHP 7.4.30, 8.0.20, 8.1.7
- php7.4 Debian 11 7.4.30-1+deb11u1
debian advisories DEBIAN-CVE-2022-31626
- php7.2 Ubuntu 18.04 LTS 7.2.24-0ubuntu0.18.04.12
- php7.4 Ubuntu 20.04 LTS 7.4.3-4ubuntu2.12
- php8.1 Ubuntu 22.04 LTS 8.1.2-1ubuntu2.1
- php7.0 Ubuntu Pro 16.04 LTS 7.0.33-0ubuntu0.16.04.16+esm4
ubuntu advisories UBUNTU-CVE-2022-31626
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- rh-php73-php RHEL 3 SOFTWARE_COLLECTIONS 7.3.33-1.el7
- rh-php73-php-gd RHEL 3 SOFTWARE_COLLECTIONS 7.3.33-1.el7
- rh-php73-php-cli RHEL 3 SOFTWARE_COLLECTIONS 7.3.33-1.el7
- rh-php73-php-dba RHEL 3 SOFTWARE_COLLECTIONS 7.3.33-1.el7
- rh-php73-php-dbg RHEL 3 SOFTWARE_COLLECTIONS 7.3.33-1.el7
- rh-php73-php-fpm RHEL 3 SOFTWARE_COLLECTIONS 7.3.33-1.el7
- rh-php73-php-gmp RHEL 3 SOFTWARE_COLLECTIONS 7.3.33-1.el7
- rh-php73-php-pdo RHEL 3 SOFTWARE_COLLECTIONS 7.3.33-1.el7
red hat advisories RHSA-2022:5491RHSA-2022:5904RHSA-2022:5468RHSA-2022:5467RHSA-2022:5471
- php7 SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLES 15 SP2-BCL +10 more 7.4.33-150200.3.46.2
- php7-test openSUSE Leap 15.3 7.4.33-150200.3.46.2
- php74 SLE Software Development Kit 12 SP5, SLE Module for Web and Scripting 12 7.4.33-1.47.2
- php7 SLES for SAP 15 SP1, SLES for SAP 15, SLES 15-LTSS +8 more 7.2.34-150000.4.103.1
- php7 SLE Module for Legacy 15 SP4, openSUSE Leap 15.4 7.4.33-150400.4.13.1
- php7-fpm SLE Module for Legacy 15 SP4, openSUSE Leap 15.4 7.4.33-150400.4.13.1
- php7-test openSUSE Leap 15.4 7.4.33-150400.4.13.2
- php7-embed SLE Module for Package Hub 15 SP4, openSUSE Leap 15.4 7.4.33-150400.4.13.1
suse advisories SUSE-SU-2022:4069-1SUSE-SU-2022:4068-1SUSE-SU-2022:4067-1SUSE-SU-2022:3997-1SUSE-SU-2022:2303-1SUSE-SU-2022:2292-1
- php8 openSUSE Tumbleweed 8.2.10-3.1
opensuse advisories openSUSE-SU-2024:13267-1
- php AlmaLinux 9 8.0.13-2.el9_0
- php-gd AlmaLinux 9 8.0.13-2.el9_0
- php-cli AlmaLinux 9 8.0.13-2.el9_0
- php-dba AlmaLinux 9 8.0.13-2.el9_0
- php-dbg AlmaLinux 9 8.0.13-2.el9_0
- php-ffi AlmaLinux 9 8.0.13-2.el9_0
- php-fpm AlmaLinux 9 8.0.13-2.el9_0
- php-gmp AlmaLinux 9 8.0.13-2.el9_0
almalinux advisories ALSA-2022:5904ALSA-2022:5468
- php Rocky Linux 9 8.0.13-2.el9_0
- php Rocky Linux 8 8.0.13-3.module+el8.6.0+989+3fbff15c
- libzip Rocky Linux 8 1.7.3-1.module+el8.6.0+790+fc63e43f
- php-pear Rocky Linux 8 1:1.10.13-1.module+el8.7.0+1067+0a7071cc
- php-pear Rocky Linux 8 1:1.10.13-1.module+el8.6.0+1006+0d5a469f
- php-pecl-rrd Rocky Linux 8 2.0.3-1.module+el8.6.0+790+fc63e43f
- php-pecl-zip Rocky Linux 8 1.19.2-1.module+el8.6.0+790+fc63e43f
- php-pecl-apcu Rocky Linux 8 5.1.20-1.module+el8.6.0+790+fc63e43f
rocky linux advisories RLSA-2022:5904RLSA-2022:5468RLSA-2022:5467
- php7 Alpine 3.15, Alpine 3.14 7.4.32-r0
- php8 Alpine 3.16, Alpine 3.14 8.0.24-r0
- php8 Alpine 3.15 8.0.25-r0
- php81 Alpine 3.16 8.1.7-r0
- php81 Alpine 3.19, Alpine 3.18, Alpine 3.17 8.1.6-r2
alpine advisories ALPINE-CVE-2022-31626
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- php Arch Linux 8.1.7-1
arch linux advisories AVG-2768
- bugs.php.net/bug.php?id=81719 advisory
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-31626 updated cvss 8.8
php: password of excessive length triggers buffer overflow leading to RCE
-
Red Hat Enterprise Linux AppStream (v. 8) php 7.4.19-3.module+el8.6.0+15726+994cde98, php 8.0.13-3.module+el8.6.0+15725+0c79e7c4, libzip 1.6.1-1.module+el8.3.0+6678+b09f589e, libzip 1.7.3-1.module+el8.6.0+13671+84712317, php-gd 7.4.19-3.module+el8.6.0+15726+994cde98, php-gd 8.0.13-3.module+el8.6.0+15725+0c79e7c4, +60 morefixed: vendor fix RHSA-2022:5467
-
Red Hat Enterprise Linux AppStream (v. 9) php 8.0.13-2.el9_0, php-gd 8.0.13-2.el9_0, php-cli 8.0.13-2.el9_0, php-dba 8.0.13-2.el9_0, php-dbg 8.0.13-2.el9_0, php-ffi 8.0.13-2.el9_0, +18 morefixed: vendor fix RHSA-2022:5904
-
Red Hat Enterprise Linux AppStream EUS (v.8.4) php 7.4.6-5.module+el8.4.0+15727+276bb227, libzip 1.6.1-1.module+el8.3.0+6678+b09f589e, php-gd 7.4.6-5.module+el8.4.0+15727+276bb227, php-cli 7.4.6-5.module+el8.4.0+15727+276bb227, php-dba 7.4.6-5.module+el8.4.0+15727+276bb227, php-dbg 7.4.6-5.module+el8.4.0+15727+276bb227, +28 morefixed: vendor fix RHSA-2022:5471
-
Red Hat Software Collections for RHEL Workstation(v. 7) rh-php73-php 7.3.33-1.el7, rh-php73-php-gd 7.3.33-1.el7, rh-php73-php-cli 7.3.33-1.el7, rh-php73-php-dba 7.3.33-1.el7, rh-php73-php-dbg 7.3.33-1.el7, rh-php73-php-fpm 7.3.33-1.el7, +22 more Red Hat Software Collections for RHEL(v. 7) rh-php73-php 7.3.33-1.el7, rh-php73-php-gd 7.3.33-1.el7, rh-php73-php-cli 7.3.33-1.el7, rh-php73-php-dba 7.3.33-1.el7, rh-php73-php-dbg 7.3.33-1.el7, rh-php73-php-fpm 7.3.33-1.el7, +22 morefixed: vendor fix RHSA-2022:5491
-
Red Hat Enterprise Linux 6 php, php-gd, php-cli, php-dba, php-fpm, php-pdo, +20 more Red Hat Enterprise Linux 7 php, php-gd, php-cli, php-dba, php-fpm, php-pdo, +18 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
cisa ICSA-26-027-02 updated cvss 8.8
Festo Didactic SE MES PC
-
Festo Didactic SE MES PC shipped_with_Windows_10affected: vendor fix
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
Exploit prediction
58.12% chance of exploitation in the next 30 days, higher than 99% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- bugs.php.net https://bugs.php.net/bug.php?id=81719 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 6.0 | AV:N/AC:M/Au:S/C:P/I:P/A:P |
| OSV | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | libphp | >=7.4.0, <7.4.30 >=8.0.0, <8.0.20 >=8.1.0, <8.1.7 |
7.4.30 8.0.20 8.1.7 |
| bitnami | php | >=7.4.0, <7.4.30 >=8.0.0, <8.0.20 >=8.1.0, <8.1.7 |
7.4.30 8.0.20 8.1.7 |
| bitnami | php-min | >=7.4.0, <7.4.30 >=8.0.0, <8.0.20 >=8.1.0, <8.1.7 |
7.4.30 8.0.20 8.1.7 |
Affected products
- PHP Group PHP
Classification
- Weakness
-
- CWE-120 Buffer Copy without Checking Size of Input
- Technology feeds
References
-
bugs.php.net
/bug.php?id=81719
exploit, issue-tracking, mailing-list, patch, vendor-advisory, advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/ZZTZQKRGEYJT5UB4FGG3MOE72SQUHSL4/
vendor-advisory, web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/3T4MMEEZYYAEHPQMZDFN44PHORJWJFZQ/
vendor-advisory, web
-
debian.org
/security/2022/dsa-5179
vendor-advisory, third-party-advisory, advisory
-
security.gentoo.org
/glsa/202209-20
vendor-advisory, third-party-advisory, advisory
-
security.netapp.com
/advisory/ntap-20220722-0005/
third-party-advisory, advisory
-
lists.debian.org
/debian-lts-announce/2022/12/msg00030.html
mailing-list, third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-31626
web
Sources
- CVE List CVE-2022-31626
- NVD CVE-2022-31626
- OSV BIT-libphp-2022-31626
- OSV BIT-php-2022-31626
- OSV BIT-php-min-2022-31626
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.