CVE-2024-2756
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedDue 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceAn incomplete fix to CVE-2022-31629 allows network and same-site attackers to set standard insecure cookies that PHP applications mistakenly treat as secure prefix cookies (__Host- or __Secure-). This bypasses the intended security protections of these prefixes, potentially enabling session fixation or authentication bypass attacks.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- High
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify PHP versionRun `php --version` or `phpinfo()` to obtain the exact PHP version installedAffected if The version is within a range that received an incomplete fix for CVE-2022-31629 (e.g., versions after the initial fix but before the complete fix for CVE-2024-2756) - compare against vendor advisory version tables
-
Verify HTTPS is enforcedCheck the server configuration (httpd.conf, nginx.conf, or PHP settings) for strict HTTPS enforcement - look for `force_ssl` or similar directives, and verify the site is only accessible via HTTPSAffected if HTTP connections are permitted or the site responds over HTTP, allowing attackers to set cookies over insecure connections that PHP may then incorrectly treat as secure prefix cookies
-
Identify __Host- and __Secure- cookie usageSearch application source code for `setcookie()`, `setrawcookie()`, or `session_set_cookie_params()` calls using `__Host-` or `__Secure-` prefixes in cookie namesAffected if The application relies on __Host- or __Secure- prefixed cookies for security-critical functions such as session management or authentication, and these cookies can be set by external sources
-
Inspect incoming cookie headersExamine HTTP request headers (via `$_COOKIE` or server logs) to see if cookies are being received from untrusted origins or if unexpected cookies with secure prefixes are presentAffected if Cookies with __Host- or __Secure- prefixes are arriving from non-HTTPS connections or from cross-site origins, indicating potential prefix bypass
-
Review cookie origin validationCheck application code for explicit validation that cookies were received over secure channels before accepting __Host-/__Secure- prefixed cookies (e.g., checking `$_SERVER['HTTPS']` or `$_SERVER['REQUEST_SCHEME']`)Affected if The application does not validate that cookies with secure prefixes were actually set over HTTPS before trusting them for security decisions
A user is affected if their PHP version has an incomplete fix for the secure cookie prefix bypass AND their application accepts cookies with __Host- or __Secure- prefixes over non-HTTPS connections or from untrusted origins.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
From vendor dataUpdate to patched PHP versions when available, or implement application-level validation to verify cookie origins and enforce that __Host-/__Secure- prefix cookies were actually set over secure connections.
- Consultation2.0 h
- Implementation8.0 h
- Testing4.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,480.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2024-2756 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2024-2756 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data