What’s Vulnerable › Vulnerabilities
CVE-2022-31629: $_COOKIE names string replacement (. -> _): cookie integrity vulnerabilities
- Severity: medium (CVSS 6.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 49.6% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2022-09-28 · updated 2026-06-17
- Weakness: CWE-20
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.
Affected products
- Debian Linux: 10.0, 11.0
- Fedoraproject Fedora: 35, 36, 37
- PHP: before 7.4.31; from 8.0.0 before 8.0.24; from 8.1.0 before 8.1.11 — fixed in 7.4.31, 8.0.24, 8.1.11
How to fix
Upgrade to a fixed version: PHP 7.4.31, 8.0.24, 8.1.11. Check the vendor advisory for mitigations.
References
- http://www.openwall.com/lists/oss-security/2024/04/12/11
- https://bugs.php.net/bug.php?id=81727
- https://lists.debian.org/debian-lts-announce/2022/12/msg00030.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2L5SUVYGAKSWODUQPZFBUB3AL6E6CSEV/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KJZK3X6B7FBE32FETDSMRLJXTFTHKWSY/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LSJVPJTX7T3J5V7XHR4MFNHZGP44R5XE/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VI3E6A3ZTH2RP7OMLJHSVFIEQBIFM6RF/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XNIEABBH5XCXLFWWZYIDE457SPEDZTXV/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZGWIK3HMBACERGB4TSBB2JUOMPYY2VKY/
- https://security.gentoo.org/glsa/202211-03
- https://security.netapp.com/advisory/ntap-20221209-0001/
- https://www.debian.org/security/2022/dsa-5277
Get alerted when CVE-2022-31629 or the next vulnerability affects your stack