CVE-2022-31626: 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...
High CVSS 8.8
- CVE id
- CVE-2022-31626
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| PHP Runtimes and servers |
>= 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 |
How to fix it
Upgrade PHP to the fixed release of the line you run: 7.4.30, 8.0.20, 8.1.7.
php --version
- Install the patched PHP release of your minor line (the php image tag or your OS packages) and restart PHP-FPM.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
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.
References
- CVE-2022-31626 on the NVD
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2022-31626
- Web: https://bugs.php.net/bug.php?id=81719
- Web: https://lists.debian.org/debian-lts-announce/2022/12/msg00030.html
- Web: https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3T4MMEEZYYAEHPQMZDFN44PHORJWJFZQ/
- Web: https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZZTZQKRGEYJT5UB4FGG3MOE72SQUHSL4/
- Web: https://security.gentoo.org/glsa/202209-20
- Web: https://security.netapp.com/advisory/ntap-20220722-0005/
- Web: https://www.debian.org/security/2022/dsa-5179
- Web: https://bugs.php.net/bug.php?id=81719
- Web: https://lists.debian.org/debian-lts-announce/2022/12/msg00030.html
- Web: https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3T4MMEEZYYAEHPQMZDFN44PHORJWJFZQ/
- Web: https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZZTZQKRGEYJT5UB4FGG3MOE72SQUHSL4/
- Web: https://security.gentoo.org/glsa/202209-20
- Web: https://security.netapp.com/advisory/ntap-20220722-0005/
- Web: https://www.debian.org/security/2022/dsa-5179
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.