CVE-2022-31629
Published: 28 September 2022
Summary
CVE-2022-31629 is a medium-severity Improper Input Validation (CWE-20) vulnerability in Php Php. Its CVSS base score is 6.5 (Medium).
Operationally, ranked in the top 5.2% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.
Deeper analysis
The vulnerability affects PHP versions prior to 7.4.31, 8.0.24, and 8.1.11. It stems from improper handling of cookie prefixes, allowing a standard insecure cookie set by an attacker to be treated by PHP applications as if it carried the __Host- or __Secure- attributes that are normally restricted to HTTPS origins and exact host matches.
Network and same-site attackers can exploit the flaw by supplying a crafted cookie that PHP then accepts under the protected prefix. With user interaction required, successful exploitation permits the attacker to overwrite session or authentication cookies, resulting in high-integrity impact without affecting confidentiality or availability.
Public advisories published by Debian LTS and Fedora list maintainers direct administrators to apply the corresponding PHP updates that enforce correct prefix validation. Additional references on the PHP bug tracker and oss-security mailing list document the same remediation path.
EPSS values for the CVE reached a peak of 0.1732, indicating moderate and sustained external interest after disclosure.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2022-53081
Vulnerability details
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.
- CWE(s)
Related Threats
No named actor attribution yet. ATT&CK technique mapping in progress for this CVE.
Affected Assets
Mitigating Controls
Likely Mitigating Controls AI
Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.
Security testing and developer training directly verify and enforce proper input validation, reducing exploitability of injection and malformed-data weaknesses.
Security testing and evaluation at multiple SDLC stages directly detects missing or flawed input validation, with the required remediation process ensuring fixes are applied.
Directly implements checks on information inputs to reject invalid data before processing.
Spam protection mechanisms perform filtering and detection on inbound/outbound messages, directly compensating for missing or weak input validation of unsolicited content.