CVE-2022-31626

mysqlnd/pdo password buffer overflow

HIGH
8.8
CVSS Score
Published: June 16, 2022 at 05:45 AM UTC
Updated: June 17, 2026 at 04:45 AM UTC
2 products affected across 2 vendorsDebian LinuxPHP

Using PHP by PHP Group?

Get instant alerts when new vulnerabilities affect PHP - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8.8
Exploit prediction
EPSS 58%

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

PHP· PHPdrupal
95%
7.4.0 ≤ v < 7.4.307.4.X ≤ v < 7.4.308.0.0 ≤ v < 8.0.208.0.X ≤ v < 8.0.208.1.0 ≤ v < 8.1.78.1.X ≤ v < 8.1.77.4.X8.0.X8.1.X
Affected range stops below 7.4.30, so it looks safe — our inference, not a vendor statement
Affected range stops below 8.0.20, so it looks safe — our inference, not a vendor statement
Affected range stops below 8.1.7, so it looks safe — our inference, not a vendor statement

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-120

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card