{"vuln_id":"GHSA-wpj3-hf5j-x4v4","aliases":["CVE-2024-2756","CVE-2022-31629"],"description":"__Host-/__Secure- cookie bypass due to partial CVE-2022-31629 fix","published_at":"2024-04-11T17:12:53Z","modified_at":"2024-04-11T17:12:53Z","first_seen_at":"2026-11-22T14:05:37.633536Z","severity":"medium","severity_source":"ghsa","cvss_score":null,"cvss_vector":null,"cwe":["CWE-20"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-wpj3-hf5j-x4v4"},"matched_alias":null,"items":[{"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"}}]}