How to fix: __Host- Prefix Cookie Missing Secure Attribute
__Host- prefixed cookies MUST carry the Secure attribute. Browsers reject __Host- cookies without Secure, and any server that sets one signals a misconfigured security control.
Why it matters
A __Host- cookie missing Secure will be silently rejected by the browser. If the application depends on this cookie for session management, users will be unexpectedly logged out or the security control it enforces will not function.
__Host- is a cookie prefix that enforces three requirements: Secure must be present, no Domain attribute allowed, and Path must be '/'. If any of these are absent, the browser ignores the __Host- semantics and may reject the cookie entirely.
How to fix it
- 1Add Secure; Path=/ to the __Host- cookie.
- 2Remove any Domain= attribute; __Host- cookies are always host-only.
Code examples
Correct __Host- cookie
Set-Cookie: __Host-session=abc123; HttpOnly; Secure; SameSite=Lax; Path=/References
Detected automatically by VulnRadar. The check id is cookie-host-prefix-not-secure, 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 with Non-Root Path
- High__Secure- Prefix Cookie Missing Secure Attribute
- LowCookie Expires/Max-Age Exceeds 1 Year
- InfoCookie Name Leaks Framework or Language
- MediumCookie Path Crosses Application Boundary
Questions
- How severe is __Host- Prefix Cookie Missing Secure Attribute?
- VulnRadar rates this high 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-host-prefix-not-secure, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does __Host- Prefix Cookie Missing Secure Attribute 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.