How to fix: Sensitive Cookie Without __Secure- or __Host- Prefix
A session or authentication cookie is set without using the __Host- or __Secure- cookie prefix. These prefixes provide browser-enforced security guarantees beyond what the Secure flag alone offers.
Why it matters
Without a security prefix, attributes like Secure, Path=/, and no Domain= are self-declared but not enforced by the browser. A subdomain that sets the same cookie name without Secure can override the parent domain's cookie.
Cookie prefixes are a defense-in-depth mechanism. __Host- guarantees (at the browser level) that the cookie: was set over HTTPS, is only sent to the exact host, has Path=/, and was not set with a Domain= attribute. These properties cannot be overridden by a subdomain or HTTP response.
How to fix it
- 1Rename session and auth cookies with the __Host- prefix.
- 2Remove Domain= attribute; __Host- is always host-only.
- 3Verify the site is HTTPS-only before deploying __Host- cookies.
Code examples
__Host- prefixed session cookie
Set-Cookie: __Host-session=abc123; HttpOnly; Secure; SameSite=Lax; Path=/References
Detected automatically by VulnRadar. The check id is cookie-no-secure-prefix, stable across every scan so you can filter or diff on it.
More cookies checks
- LowCookie Domain Attribute Is Too Broad
- LowCookie Missing Secure Attribute
- InfoThird-Party Cookie Missing Partitioned Attribute
- High__Host- Prefix Cookie Missing Secure Attribute
- High__Host- Prefix Cookie with Non-Root Path
- High__Secure- Prefix Cookie Missing Secure Attribute
- LowCookie Expires/Max-Age Exceeds 1 Year
- InfoCookie Name Leaks Framework or Language
Questions
- How severe is Sensitive Cookie Without __Secure- or __Host- Prefix?
- VulnRadar rates this info severity in the cookies category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id cookie-no-secure-prefix, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does Sensitive Cookie Without __Secure- or __Host- Prefix map to?
- It maps to CWE-614. In the OWASP Top 10 it falls under A05:2021.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.