How to fix: __Secure- Prefix Cookie Missing Secure Attribute
__Secure- prefixed cookies MUST carry the Secure attribute. A __Secure- cookie without Secure will be rejected by compliant browsers.
Why it matters
The browser will reject a __Secure- cookie without Secure, silently breaking any functionality that depends on the cookie being set. If used for session management, users will be logged out.
The __Secure- prefix guarantees that the cookie was set over a secure connection and will only be transmitted over HTTPS. Without the Secure attribute, the prefix requirement is violated and the cookie is rejected.
How to fix it
- 1Add the Secure attribute to the __Secure- cookie.
- 2Ensure the page is served over HTTPS before setting the cookie.
Code examples
Correct __Secure- cookie
Set-Cookie: __Secure-token=abc123; HttpOnly; Secure; SameSite=Strict; Path=/accountReferences
Detected automatically by VulnRadar. The check id is cookie-secure-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 Missing Secure Attribute
- High__Host- Prefix Cookie with Non-Root Path
- LowCookie Expires/Max-Age Exceeds 1 Year
- InfoCookie Name Leaks Framework or Language
- MediumCookie Path Crosses Application Boundary
Questions
- How severe is __Secure- 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-secure-prefix-not-secure, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does __Secure- 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.