mysqlnd/pdo password buffer overflow
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-120 and the CVSS impact.
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| PHP Group | PHP | 7.4.X to before 7.4.30; 8.0.X to before 8.0.20; 8.1.X to before 8.1.7 | 7.4.30, 8.0.20, 8.1.7 | Patch available | CNA |
- PHP VendorPHP Group Affected 7.4.X to before 7.4.30; 8.0.X to before 8.0.20; 8.1.X to before 8.1.7 Fixed in 7.4.30, 8.0.20, 8.1.7 Patch available CNA
Remediation
- Fix · CNA PHP (PHP Group) Fixed in 7.4.30, 8.0.20, 8.1.7
Red Hat 5 advisories
- RHSA-2022:5904 Released 2022-08-04 · Red Hat rating Importantphp security update
- Red Hat Enterprise Linux AppStream (v. 9) php-8.0.13-2.el9_0, php-bcmath-8.0.13-2.el9_0, php-cli-8.0.13-2.el9_0 +22
- RHSA-2022:5491 Released 2022-07-04 · Red Hat rating Importantrh-php73-php security and bug fix update
- Red Hat Software Collections for RHEL Workstation(v. 7) rh-php73-php-7.3.33-1.el7, rh-php73-php-bcmath-7.3.33-1.el7, rh-php73-php-cli-7.3.33-1.el7 +26
- Red Hat Software Collections for RHEL(v. 7) rh-php73-php-7.3.33-1.el7, rh-php73-php-bcmath-7.3.33-1.el7, rh-php73-php-cli-7.3.33-1.el7 +26
- RHSA-2022:5468 Released 2022-06-30 · Red Hat rating Importantphp:8.0 security update
- Red Hat Enterprise Linux AppStream (v. 8) apcu-panel-5.1.20-1.module+el8.6.0+13671+84712317.noarch::php:8.0, libzip-1.7.3-1.module+el8.6.0+13671+84712317.aarch64::php:8.0, libzip-1.7.3-1.module+el8.6.0+13671+84712317.ppc64le::php:8.0 +47
Show 2 more Red Hat advisories
- RHSA-2022:5467 Released 2022-06-30 · Red Hat rating Importantphp:7.4 security update
- Red Hat Enterprise Linux AppStream (v. 8) apcu-panel-5.1.18-1.module+el8.3.0+6678+b09f589e.noarch::php:7.4, libzip-1.6.1-1.module+el8.3.0+6678+b09f589e.aarch64::php:7.4, libzip-1.6.1-1.module+el8.3.0+6678+b09f589e.ppc64le::php:7.4 +47
- RHSA-2022:5471 Released 2022-06-30 · Red Hat rating Importantphp:7.4 security update
- Red Hat Enterprise Linux AppStream EUS (v.8.4) apcu-panel-5.1.18-1.module+el8.3.0+6678+b09f589e.noarch::php:7.4, libzip-1.6.1-1.module+el8.3.0+6678+b09f589e.aarch64::php:7.4, libzip-1.6.1-1.module+el8.3.0+6678+b09f589e.ppc64le::php:7.4 +47
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Advisory ·
PHP — FEDORA-2022-f3fc52428e
2 records Highest priority Priority HIGH 1 HIGH, 1 MEDIUM
Other records, highest priority first
- TI-2022-13549 Freeing unallocated memory in php_pgsql_free_params()Priority MEDIUM 42
- Advisory ·
PHP — FEDORA-2022-0a96e5b9b1
2 records Highest priority Priority HIGH 1 HIGH, 1 MEDIUM
Other records, highest priority first
- TI-2022-13549 Freeing unallocated memory in php_pgsql_free_params()Priority MEDIUM 42
Show 1 more group
- Advisory ·
PHP — DSA-5179
2 records Highest priority Priority HIGH 1 HIGH, 1 MEDIUM
Other records, highest priority first
- TI-2022-13549 Freeing unallocated memory in php_pgsql_free_params()Priority MEDIUM 42
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2022:5467, RHSA-2022:5468 |
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2022:5904 |
| Red Hat Enterprise Linux AppStream EUS (v.8.4) | Fixed | RHSA-2022:5471 |
| Red Hat Software Collections for RHEL Workstation(v. 7) | Fixed | RHSA-2022:5491 |
| Red Hat Software Collections for RHEL(v. 7) | Fixed | RHSA-2022:5491 |
Not affected: 2 products
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
Timeline
- 2026-10-02 Threatist record created from CVE-2022-31626
- 2026-10-03 Alias added: GHSA-jfc6-9gw3-fhfg
References
More PHP Group vulnerabilities
- TI-2024-04260 Argument Injection in PHP-CGI KEVCVSS 3.1CRITICAL 9.8
- TI-2026-78794 PHP remote code execution via stale global state KEVCVSS 4.0CRITICAL 9.2
- TI-2026-78793 Out-of-memory handling flaw in PHP allows remote code execution KEVCVSS 4.0CRITICAL 9.2
- TI-2024-01743 Command injection via array-ish $command parameter of proc_open() CVSS 3.1CRITICAL 9.4
- TI-2022-13555 PDO::quote() may return unquoted string CVSS 3.1CRITICAL 9.1
- TI-2024-10408 Reference counting in php_request_shutdown causes Use-After-Free CVSS 4.0CRITICAL 9.2
Sources
- CVE-2022-31626 · CVE Program
- CVE-2022-31626 · NVD
- FIRST EPSS
- GHSA-jfc6-9gw3-fhfg · GitHub Advisory Database · CC BY 4.0
- CVE-2022-31626 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences