CVE-2022-31626

NameCVE-2022-31626
DescriptionIn 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-3243-1, DSA-5179-1, ELA-775-1, ELA-777-1
Debian Bugs1014533

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
php5 (PTS)jessie, jessie (lts)5.6.40+dfsg-0+deb8u21fixed
php7.0 (PTS)stretch (security)7.0.33-0+deb9u12vulnerable
stretch (lts), stretch7.0.33-0+deb9u19fixed
php7.3 (PTS)buster, buster (lts)7.3.31-1~deb10u8fixed
buster (security)7.3.31-1~deb10u7fixed
php7.4 (PTS)bullseye7.4.33-1+deb11u5fixed
bullseye (security)7.4.33-1+deb11u6fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
php5sourcejessie5.6.40+dfsg-0+deb8u16ELA-777-1
php5source(unstable)(unfixed)
php7.0sourcestretch7.0.33-0+deb9u13ELA-775-1
php7.0source(unstable)(unfixed)
php7.3sourcebuster7.3.31-1~deb10u2DLA-3243-1
php7.3source(unstable)(unfixed)
php7.4sourcebullseye7.4.30-1+deb11u1DSA-5179-1
php7.4source(unstable)(unfixed)
php8.1source(unstable)8.1.7-11014533

Notes

[stretch] - php7.0 <postponed> (Minor issue; can be fixed in next update)
Fixed in 7.4.30, 8.0.20, 8.1.7
PHP Bug: https://bugs.php.net/bug.php?id=81719
https://github.com/php/php-src/commit/58006537fc5f133ae8549efe5118cde418b3ace9 (php-7.4.30)

Search for package or bug name: Reporting problems