CVE-2022-31629

published 28 Sep 2022 · updated 4 Nov 2025

$_COOKIE names string replacement (. -> _): cookie integrity vulnerabilities

7.0HighCVSS 6.5EPSS 50%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 50%. Fixed in PHP 7.4.31, PHP 8.0.24 and PHP 8.1.11.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
PHP GroupPHP>=7.4.X <7.4.31, >=8.0.X <8.0.24, >=8.1.X <8.1.117.4.31, 8.0.24, 8.1.11

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in PHP, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2022-31629 severity on Zeptric[![CVE-2022-31629](https://zeptric.io/badge/cve/CVE-2022-31629.svg)](https://zeptric.io/cve/CVE-2022-31629)