Skip to main content
Public proof of conceptFix available

CVE-2022-31626

A public proof of concept exists; no exploitation attested.

  • Published2022-06-16
  • Fixed in8.1.7 · 8.0.20 · 7.4.30
  • WeaknessCWE-120

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2022-06-1606:15CVE publishedNVD

Observed activity

isMalicious corpus · updated 2026-11-03 15:37 UTC
Indicators tagged with this CVE, per day0 indicators over 7 days
Block these indicators
  • Firewall list (EDL, text): https://api.ismalicious.com/edl/cve/CVE-2022-31626?format=txt
  • CSV export: https://api.ismalicious.com/edl/cve/CVE-2022-31626?format=csv
  • TAXII collection of exploited CVEs
  • The EDL and CSV take an API key on the Pro plan.

Versions per branch

NVD · OSV
PHP
BranchAffectedFixed in
8.1≥ 8.1.0, < 8.1.78.1.7
8.0≥ 8.0.0, < 8.0.208.0.20
7.4≥ 7.4.0, < 7.4.307.4.30
Debian debian linux
BranchAffectedFixed in
10.0= 10.0no fix published
11.0= 11.0no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • libzipRocky Linux:8all versions · fixed in 0:1.6.1-1.module+el8.4.0+415+e936cba3
  • libzipRocky Linux:8all versions · fixed in 0:1.6.1-1.module+el8.6.0+789+2130c178
  • libzipRocky Linux:8all versions · fixed in 0:1.7.3-1.module+el8.6.0+790+fc63e43f
  • libzipRed Hat:rhel_eus:8.4::appstreamall versions · fixed in 0:1.6.1-1.module+el8.3.0+6678+b09f589eand 5 other packages
  • libzipRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:1.6.1-1.module+el8.3.0+6678+b09f589eand 5 other packages
  • libzipRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:1.7.3-1.module+el8.6.0+13671+84712317and 5 other packages
  • libzipAlmaLinux:8all versions · fixed in 1.7.3-1.module_el8.6.0+2739+efabdb8fand 2 other packages
  • phpTuxCare:CentOS:8.5all versions · fixed in 7.4.19-1.module_el8.5.0+2068+cc873159.tuxcare.els4and 26 other packages

133 more package ranges on OSV.dev

Vendor advisories

  • CVE-2022-31626 Red Hat Product Security1,210 products fixed

    php: password of excessive length triggers buffer overflow leading to RCE

  • ICSA-26-027-02 CISA1 known affected

    Festo Didactic SE MES PC

    Festo Didactic SE MES PC shipped with Windows 10

  • RHSA-2022:5904 Red Hat Product Security201 products fixed

    Red Hat Security Advisory: php security update

  • RHSA-2022:5491 Red Hat Product Security122 products fixed

    Red Hat Security Advisory: rh-php73-php security and bug fix update

  • RHSA-2022:5468 Red Hat Product Security285 products fixed

    Red Hat Security Advisory: php:8.0 security update

  • RHSA-2022:5467 Red Hat Product Security301 products fixed

    Red Hat Security Advisory: php:7.4 security update

1 more advisory

Full record on NVD

Fix

  1. Update PHP to 8.1.7 · 8.0.20 · 7.4.30
  2. Vendor fix CISA ICSA-26-027-02 · 1 productFesto Didactic has released Factory Control Panel as a replacement for XAMPP on its MES PCs. Contact technical support at services.didactic@festo.com to obtain the current version of Factory Control Panel which includes fixes for these vulnerabilities.
  3. Vendor fix Red Hat Product Security RHSA-2022:5904 · 201 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 After installing the updated packages, the httpd daemon must be restarted for the update to take effect.

Advisories and patches

Detection

read 2026-11-02 22:42 UTC
Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof-of-concept repositories
2 repositories, unverifiedamitlttwo/CVE-2022-31626HORKimhab/CVE-2022-31626-CVE-2024-2961-CVE-2019-6977
PoC-in-GitHub
Metasploit modules
none listed
Metasploit Framework

Sources

  • CNACVSS 3.17.5known since 2026-10-23
  • NVDCVSS 3.18.8read 2026-10-23
  • NVDCVSS 2.06read 2026-10-23
  • CNAweakness (CWE)CWE-120known since 2026-10-23
  • NVDweakness (CWE)CWE-120read 2026-10-23
  • FIRST EPSSEPSS score58.1 %read 2026-11-02
  • PoC-in-GitHubproof of concept2read 2026-11-02
  • OSVaffected packages—
  • GitHub Advisoriesadvisory—

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Published
2022-06-16
Last Modified
2026-06-17
NVD status
Modified
GitHub Advisory
GHSA-jfc6-9gw3-fhfg

Frequently asked questions

What is 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 password for the connection, password of excessive length can trigger a buffer overflow in PHP, which can lead to a remote code execution vulnerability.

Is CVE-2022-31626 actively exploited?

Active exploitation of CVE-2022-31626 has not been confirmed. Its EPSS score was 58.1% on 2026-11-03, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2022-31626?

CVE-2022-31626 has a CVSS v3 base score of 8.8 (HIGH severity), with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.

Running PHP? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record