{"vuln_id":"CVE-2022-31629","aliases":[],"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_at":"2022-09-28T23:15:10.540000Z","modified_at":"2026-06-17T04:45:50.507000Z","first_seen_at":"2026-11-21T19:15:06.076908Z","severity":"medium","severity_source":"nvd","cvss_score":6.5,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","cwe":["CWE-20","CWE-1284"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.49569,"epss_percentile":0.98912,"nvd_status":"Modified","enriched_at":"2026-11-24T17:20:46.064752Z","links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-31629"},"matched_alias":null,"items":[{"id":494,"source":{"id":"debian-php","name":"Debian 12 php8.2 (package vulnerabilities)"},"title":"php8.2 (Debian:12): DEBIAN-CVE-2024-2756 / CVE-2024-2756 - Due to an incomplete fix to CVE-2022-31629 https://github.com/advisories/GHSA-c43m-486j-j32p , network and same-site attackers can set a standard insecure cook…","summary":"Due to an incomplete fix to  CVE-2022-31629 https://github.com/advisories/GHSA-c43m-486j-j32p , network and same-site attackers can set a standard insecure cookie in the victim's browser which is treated as a __Host- or __Secure- cookie by PHP applications.\n\nAffected: Debian:12:php8.2\n\nFixed in: 8.2.18-1~deb12u1\n\nReferences:\nhttps://security-tracker.debian.org/tracker/CVE-2024-2756","url":"https://osv.dev/vulnerability/DEBIAN-CVE-2024-2756","published_at":"2024-04-29T04:15:07.890000Z","updated_at":"2026-11-02T12:01:29.899826Z","fetched_at":"2026-11-21T19:15:05.963746Z","severity":"medium","cvss_score":6.5,"epss":0.49569,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"php8.2","vuln_id":"CVE-2024-2756","vuln_ids":["CVE-2022-31629","CVE-2023-3823","CVE-2023-3824","CVE-2024-2756","CVE-2024-3096","DEBIAN-CVE-2024-2756","GHSA-C43M-486J-J32P","GHSA-WPJ3-HF5J-X4V4"],"tags":["package-watch","pkg:php8.2","fix-available"],"cluster_id":381,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/494","html":"https://vulnwatch.ve1ve2.com/item/494"}},{"id":12678,"source":{"id":"gh-php-src","name":"PHP releases (GitHub php/php-src tags)"},"title":"GHSA-wpj3-hf5j-x4v4 / CVE-2024-2756: __Host-/__Secure- cookie bypass due to partial CVE-2022-31629 fix","summary":"__Host-/__Secure- cookie bypass due to partial CVE-2022-31629 fix ### Summary Due to an incomplete fix to CVE-2022-31629, network and same-site attackers can set a standard insecure cookie in the victim's browser which is treated as a `__Host-` or `__Secure-` cookie by PHP applications. ### Details The vulnerability is identical to one previously described in https://bugs.php.net/bug.php?id=81727. Unfortunatly, since CVE-2022-31629 got only partially fixed in PHP >8.1.11, cookies starting with `_[Host-` are parsed by PHP applications as `__Host-`. Notice that I reported this vulnerability multiple times via email after the fix for CVE-2022-31629 landed (I am the original reporter of that CVE), but I guess that the message got lost. ### PoC ```sh $ echo '' > x $ docker run -p 8080:8080 --rm -v $(pwd):$(pwd) php:latest php -S 0.0.0.0:8080 $(pwd)/x $ curl -b '_[Host-x=y' localhost:8080/x {\"__Host-x\":\"y\"} ``` Patched: 8.1.28, 8.2.18, 8.3.6","url":"https://github.com/php/php-src/security/advisories/GHSA-wpj3-hf5j-x4v4","published_at":"2024-04-11T17:12:53Z","updated_at":"2024-04-11T17:12:53Z","fetched_at":"2026-11-22T14:05:37.431203Z","severity":"medium","cvss_score":6.5,"epss":0.49569,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"php-src","vuln_id":"CVE-2024-2756","vuln_ids":["CVE-2022-31629","CVE-2023-3823","CVE-2023-3824","CVE-2024-2756","CVE-2024-3096","GHSA-C43M-486J-J32P","GHSA-WPJ3-HF5J-X4V4"],"tags":["repo-advisory","CWE-20","security","repo:php/php-src","stack"],"cluster_id":11791,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/12678","html":"https://vulnwatch.ve1ve2.com/item/12678"}}]}