How to fix: __Host- Prefix Cookie with Non-Root Path
__Host- prefixed cookies MUST have Path=/. A __Host- cookie with a non-root path violates the cookie prefix requirements and will be rejected by compliant browsers.
Why it matters
The browser will reject a __Host- cookie with a non-root path. If the application depends on this cookie for session management, users will be unexpectedly logged out.
The __Host- prefix requires Path=/ to prevent the cookie from being scoped to a specific path. This ensures the cookie is usable by every route on the host, which is the security intent of __Host-.
How to fix it
- 1Change the Path attribute to Path=/ on any __Host- cookie.
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-wrong-path, 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__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 with Non-Root Path?
- 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-wrong-path, which stays the same between runs so you can filter, diff, or gate CI on it.
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.