← Vulnerability feed

Vulnerability record · CVE-2022-31629 · published 28 September 2022

CVE-2022-31629: PHP cookie prefix validation flaw allows insecure cookie spoofing

Php · Php

PHP before 7.4.31, 8.0.24 and 8.1.11 fails to properly validate cookie names, letting network and same-site attackers set an ordinary insecure cookie that PHP applications then treat as a `__Host-` or `__Secure-` cookie. This undermines the browser-enforced guarantees those prefixes are meant to provide, so applications relying on them for session or security decisions can be misled.

6.5 CVSS 3.1 Medium EPSS 49% · top 1.1% CWE-20 · Improper input validation
6.5CVSS 3.1 base score
49%EPSS exploitation probability, 30 days
NoNot in CISA KEV
3Affected product versions listed by NVD
26References, 2 tagged exploit
17 Jun 2026Last modified by NVD

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.

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 20 September 2026. Confidence: medium.

medium priorityCVSS 6.5 Medium with high EPSS and public exploit detail, but exploitation needs user interaction and impact is limited to cookie integrity.

What it is

PHP before 7.4.31, 8.0.24 and 8.1.11 fails to properly validate cookie names, letting network and same-site attackers set an ordinary insecure cookie that PHP applications then treat as a `__Host-` or `__Secure-` cookie. This undermines the browser-enforced guarantees those prefixes are meant to provide, so applications relying on them for session or security decisions can be misled.

Impact

An attacker can plant a cookie that the application accepts as a protected `__Host-`/`__Secure-` cookie, enabling session fixation or cookie-based logic bypass. Integrity impact is rated High; confidentiality and availability impacts are None.

Attack surface

Reachable over the network with no authentication (AV:N/PR:N), but exploitation requires user interaction (UI:R) because the victim's browser must be induced to accept the attacker-set cookie. The description notes both network and same-site attackers.

Exploitation

Not listed in CISA KEV, but EPSS is high (0.49336, 98.8th percentile) and the PHP bug report is tagged Exploit, indicating public exploit detail exists. No ransomware usage is documented.

What to do

  • Upgrade PHP to 7.4.31, 8.0.24, 8.1.11 or later; apply the corresponding Debian, Fedora and Gentoo package updates.
  • Do not rely solely on `__Host-`/`__Secure-` cookie prefixes for security decisions; enforce server-side session validation.
  • Regenerate session identifiers on authentication and reject cookies whose names or attributes do not match expected values.
  • Audit application code for trust in cookie prefix semantics and add explicit checks on cookie origin and attributes.

Detection

  • Monitor web logs for requests carrying `__Host-` or `__Secure-` cookie names that do not match legitimate application-set values.
  • Alert on session identifier changes or fixation patterns around authentication events.
  • Review application logs for cookie-based authorization decisions made without server-side session checks.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

3 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

LinkTags
http://www.openwall.com/lists/oss-security/2024/04/12/11
https://bugs.php.net/bug.php?id=81727 ExploitPermissions RequiredVendor Advisory
https://lists.debian.org/debian-lts-announce/2022/12/msg00030.html Mailing ListThird Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2L5SUVYGAKSWODUQPZFBUB3
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KJZK3X6B7FBE32FETDSMRLJ
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LSJVPJTX7T3J5V7XHR4MFNH
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VI3E6A3ZTH2RP7OMLJHSVFI
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XNIEABBH5XCXLFWWZYIDE45
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZGWIK3HMBACERGB4TSBB2JU
https://security.gentoo.org/glsa/202211-03 Third Party Advisory
https://security.netapp.com/advisory/ntap-20221209-0001/ Third Party Advisory
https://www.debian.org/security/2022/dsa-5277 Third Party Advisory
http://www.openwall.com/lists/oss-security/2024/04/12/11
https://bugs.php.net/bug.php?id=81727 ExploitPermissions RequiredVendor Advisory
https://lists.debian.org/debian-lts-announce/2022/12/msg00030.html Mailing ListThird Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2L5SUVYGAKSWODUQPZFBUB3
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KJZK3X6B7FBE32FETDSMRLJ
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LSJVPJTX7T3J5V7XHR4MFNH
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VI3E6A3ZTH2RP7OMLJHSVFI
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XNIEABBH5XCXLFWWZYIDE45
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZGWIK3HMBACERGB4TSBB2JU
https://lists.fedoraproject.org/archives/list/[email protected]/message/KJZK3X6B7FBE32FETDSMRLJXT
https://lists.fedoraproject.org/archives/list/[email protected]/message/ZGWIK3HMBACERGB4TSBB2JUOM
https://security.gentoo.org/glsa/202211-03 Third Party Advisory
https://security.netapp.com/advisory/ntap-20221209-0001/ Third Party Advisory
https://www.debian.org/security/2022/dsa-5277 Third Party Advisory

Track CVE-2022-31629 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

10.0CVE-2025-32433Erlang/OTP SSH server missing authentication allows remote code executionErlang/OTP SSH servers before OTP-27.3.3, OTP-26.2.5.11 and OTP-25.3.2.20 mishandle SSH protocol messages, letting an unauthenticated attacker execut…KEVEPSS 99%analysed10.0CVE-2025-24201Apple WebKit out-of-bounds write allows sandbox escapeCVE-2025-24201 is an out-of-bounds write in Apple's WebKit that was addressed with improved checks. Maliciously crafted web content may break out of …KEVEPSS 3.8%analysed10.0CVE-2021-44228Apache Log4j2 JNDI lookup remote code executionApache Log4j2 versions 2.0-beta9 through 2.15.0 (excluding 2.12.2, 2.12.3, and 2.3.1) do not protect against attacker-controlled LDAP and other JNDI …KEVEPSS 100%analysed9.8CVE-2026-24061GNU Inetutils telnetd argument injection allows remote auth bypasstelnetd in GNU Inetutils through 2.7 fails to sanitize the USER environment variable, so a value such as "-f root" is passed as an argument to login …KEVEPSS 99%analysed9.8CVE-2025-39682Linux kernel TLS zero-length record handling flaw on rx_listThe Linux kernel TLS receive path mishandles zero-length records that arrive from the rx_list, breaking the assumption that a record type change cann…KEVEPSS 2.9%analysed9.8CVE-2025-24813Apache Tomcat Default Servlet path equivalence enables RCE and file disclosureApache Tomcat mishandles path equivalence for names containing an internal dot, letting a remote unauthenticated attacker write files through the Def…KEVEPSS 100%analysed9.8CVE-2024-9680Mozilla Firefox and Thunderbird use-after-free in Animation timelinesA use-after-free flaw in Animation timelines allows an attacker to execute code in the content process of Firefox and Thunderbird. Mozilla reports ex…KEVEPSS 23%analysed9.8CVE-2024-4577PHP-CGI on Windows argument injection leads to remote code executionPHP-CGI on Windows can misinterpret characters in the command line passed to Win32 API functions when certain code pages are configured, due to Windo…KEVEPSS 100%analysed

Source: NIST National Vulnerability Database (record CVE-2022-31629), CISA KEV, FIRST EPSS (scores of 2026-09-26). This page is refreshed as NVD updates the record.