Skip to main content
Public proof of conceptFix available

CVE-2022-31629

A public proof of concept exists; no exploitation attested.

  • Published2022-09-28
  • Fixed in8.1.11 · 8.0.24 · 7.4.31
  • WeaknessCWE-1284 · CWE-20

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 before 7.4.31, 8.0.24 and 8.1.11, the vulnerability enables network and same-site attackers to set a standard insecure cookie in the victim's browser which is treated as a `__Host-` or `__Secure-` cookie by PHP applications.

Timeline

dates in UTC
  1. 2022-09-2823:15CVE publishedNVD

Versions per branch

NVD · OSV
PHP
BranchAffectedFixed in
8.1≥ 8.1.0, < 8.1.118.1.11
8.0≥ 8.0.0, < 8.0.248.0.24
7.4< 7.4.317.4.31
Fedoraproject fedora
BranchAffectedFixed in
35.x= 35no fix published
36.x= 36no fix published
37.x= 37no fix published
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.

Products declared by the CNA1 product

As php, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • PHP Group PHP
    Affected
    • ≥ 7.4.X, < 7.4.31fixed in 7.4.31custom
    • ≥ 8.0.X, < 8.0.24fixed in 8.0.24custom
    • ≥ 8.1.X, < 8.1.11fixed in 8.1.11custom

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2024-05-01

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.10.0+1604+6558efc7
  • libzipRocky Linux:8all versions · fixed in 0:1.6.1-1.module+el8.10.0+1912+72767185
  • libzipRocky Linux:8all versions · fixed in 0:1.7.3-1.module+el8.6.0+790+fc63e43f
  • libzipRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:1.7.3-1.module+el8.6.0+13671+84712317and 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
  • libzipAlmaLinux:8all versions · fixed in 1.6.1-1.module_el8.10.0+3935+28808425and 2 other packages
  • libzipAlmaLinux:8all versions · fixed in 1.6.1-1.module_el8.6.0+2750+78feabcband 2 other packages
  • libzipAlmaLinux:8all versions · fixed in 1.6.1-1.module_el8.6.0+3239+bedf0508and 2 other packages

148 more package ranges on OSV.dev

Vendor advisories

  • CVE-2022-31629 Red Hat Product Security1,045 products fixed · 84 known affected

    php: standard insecure cookie could be treated as a '__Host-' or '__Secure-' cookie by PHP applications

    php as a component of Red Hat Enterprise Linux 6 · php-bcmath as a component of Red Hat Enterprise Linux 6 · php-cli as a component of Red Hat Enterprise Linux 6 · +81 more

  • ICSA-26-027-02 CISA1 known affected

    Festo Didactic SE MES PC

    Festo Didactic SE MES PC shipped with Windows 10

  • RHSA-2023:2903 Red Hat Product Security301 products fixed

    Red Hat Security Advisory: php:7.4 security update

  • RHSA-2023:2417 Red Hat Product Security258 products fixed

    Red Hat Security Advisory: php:8.1 security update

  • RHSA-2023:0965 Red Hat Product Security201 products fixed

    Red Hat Security Advisory: php security update

  • RHSA-2023:0848 Red Hat Product Security285 products fixed

    Red Hat Security Advisory: php:8.0 security update

Full record on NVD

Fix

  1. Update PHP to 8.1.11 · 8.0.24 · 7.4.31
  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-2023:2903 · 301 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.
  4. No fix planned, says the vendor Red Hat Product Security CVE-2022-31629 · 54 productsOut of support scope
  5. No fix planned, says the vendor Red Hat Product Security CVE-2022-31629 · 30 productsWill not fix

Advisories and patches

Detection

read 2026-11-01 01:02 UTC
Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Published
2022-09-28
Last modified
2026-06-17
NVD status
Modified
GitHub advisory
GHSA-c43m-486j-j32p

Frequently asked questions

What is CVE-2022-31629?

In PHP versions before 7.4.31, 8.0.24 and 8.1.11, the vulnerability enables network and same-site attackers to set a standard insecure cookie in the victim's browser which is treated as a `__Host-` or `__Secure-` cookie by PHP applications.

Is CVE-2022-31629 actively exploited?

Active exploitation of CVE-2022-31629 has not been confirmed. Its EPSS score was 49.6% on 2026-12-04, the estimated probability of exploitation in the next 30 days.

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

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

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 checks · 250 API requests/month

Sources for this record