---
title: "CVE-2022-31629"
canonical: "https://kb.cynergy.app/space/MD/922648581/CVE-2022-31629"
format: markdown
---
**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.

**Published On**

09/28/2022

**Updated On**

10/07/2022

**Trending**

FALSE

**CWE**

<u>[CWE-20](http://cwe.mitre.org/data/definitions/20.html)</u>


**Mitigation:**

![image](media://93519818-ca72-48f5-8b75-9819e2a97e8e)

Cynergy has an automated mitigation capability that requires integration with your WAF provider.

Once integrated, you can request “Protect with WAF”

This will move the exposed asset behind WAF protection

<span style="color: #97a0af">**Note: **</span><span style="color: #97a0af">Policies configuration should be defined separately</span>


**Remediation**

`Cookies should be parsed according to the standard [rfc6265bis](https[:]//datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis-10) without being affected by additional string transformations.`


**Reference**

[https://bugs.php.net/bug.php?id=81727](https://bugs.php.net/bug.php?id=81727)