{"id":"CVE-2022-31629","published":"2022-09-28T22:25:10Z","modified":"2025-11-04T17:12:24Z","title":"$_COOKIE names string replacement (. -> _): cookie integrity vulnerabilities","vendor":"PHP","product":"PHP","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.10689,"percentile":0.96536,"provenance":"source"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"},{"id":"CWE-1284","name":"Improper Validation of Specified Quantity in Input"}],"references":[{"url":"https://bugs.php.net/bug.php?id=81727","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XNIEABBH5XCXLFWWZYIDE457SPEDZTXV/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VI3E6A3ZTH2RP7OMLJHSVFIEQBIFM6RF/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2L5SUVYGAKSWODUQPZFBUB3AL6E6CSEV/","tags":["vendor-advisory"]},{"url":"https://www.debian.org/security/2022/dsa-5277","tags":["vendor-advisory"]},{"url":"https://security.gentoo.org/glsa/202211-03","tags":["vendor-advisory"]},{"url":"https://security.netapp.com/advisory/ntap-20221209-0001/","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2022/12/msg00030.html","tags":["mailing-list"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZGWIK3HMBACERGB4TSBB2JUOMPYY2VKY/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LSJVPJTX7T3J5V7XHR4MFNHZGP44R5XE/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KJZK3X6B7FBE32FETDSMRLJXTFTHKWSY/","tags":["vendor-advisory"]},{"url":"http://www.openwall.com/lists/oss-security/2024/04/12/11","tags":["mailing-list"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZGWIK3HMBACERGB4TSBB2JUOMPYY2VKY/","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KJZK3X6B7FBE32FETDSMRLJXTFTHKWSY/","tags":[]}],"priority":{"score":28.9,"factors":[{"name":"EPSS percentile","points":19.31},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":4.55}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2022-10-07","earliestUrl":"https://github.com/silnex/CVE-2022-31629-poc","repos":[{"name":"silnex/CVE-2022-31629-poc","url":"https://github.com/silnex/CVE-2022-31629-poc","stars":3,"created":"2022-10-07"}]},"first":{"date":"2022-10-07","source":"PoC-in-GitHub","url":"https://github.com/silnex/CVE-2022-31629-poc"},"provenance":"source"},"vendorSlug":"php","affectedVersions":[{"vendor":"PHP Group","product":"PHP","versions":[">= 7.4.X, < 7.4.31",">= 8.0.X, < 8.0.24",">= 8.1.X, < 8.1.11"]}],"solutions":{"items":["Upgrade to PHP 7.4.31, 8.0.24, or 8.1.11."],"from":"CVE.org CNA","provenance":"source"},"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-07-16T18:53:33.259759Z","from":"CISA ADP","provenance":"source"},"summary":{"text":"The flaw is in PHP's handling of cookie names: when PHP populates the $_COOKIE superglobal, it replaces dots in cookie names with underscores, so a cookie set by the browser under a name containing dots can be read by the application as a different name. An attacker with network or same-site access can have a standard, insecure cookie set in the victim's browser, which PHP applications then treat as a __Host- or __Secure- cookie, requiring the victim to interact with the page (user interaction) and no authentication from the attacker.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:37:59Z"},"euvd":{"id":"EUVD-2022-53081","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-php-cve-2022-31629","children":[{"from":"CVE-2022-31629","to":"CVE-2024-2756","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"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…","from":"CVE.org","in":"CVE-2024-2756"},{"kind":"similar","provenance":"machine","score":0.56,"basis":"same product + CWE + description similarity"}]}]}}