Skip to main content
HighCookiesOWASP A05:2021CWE-614

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

  1. 1Add Secure; Path=/ to the __Host- cookie.
  2. 2Remove any Domain= attribute; __Host- cookies are always host-only.

Code examples

Correct __Host- cookie

HTTP
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.

See every cookies check

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.

Propose a checkHow a check is built

Scan your own site for __host- prefix cookie missing secure attribute

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

__Host- Prefix Cookie Missing Secure Attribute | VulnRadar