Skip to main content
HighCookiesOWASP A05:2021CWE-614

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

  1. 1Add the Secure attribute to the __Secure- cookie.
  2. 2Ensure the page is served over HTTPS before setting the cookie.

Code examples

Correct __Secure- cookie

HTTP
Set-Cookie: __Secure-token=abc123; HttpOnly; Secure; SameSite=Strict; Path=/account

References

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.

See every cookies check

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.

Propose a checkHow a check is built

Scan your own site for __secure- 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

__Secure- Prefix Cookie Missing Secure Attribute | VulnRadar