OWASP / ASVS

Application Security Verification Standard
Creative Commons Attribution Share Alike 4.0 International
2.77k stars 672 forks source link

V50.2.1 (v4.0.3-3.4.1) - cookie secure attribute #2419

Open elarlang opened 4 days ago

elarlang commented 4 days ago
Current requirement, moved from V3.4.1 to V50.2.1 via #2410: # Description L1 L2 L3 CWE
50.2.1 [MOVED FROM 3.4.1] Verify that cookie-based session tokens have the 'Secure' attribute set. 614

As the requirement is now a general cookie security requirement, the wording must be non-session-cookie specific.

Proposal:

Verify that cookies have the 'Secure' attribute set.

Level: keep level 1

elarlang commented 3 days ago

Proposal update based on https://github.com/OWASP/ASVS/issues/2422#issuecomment-2507489508 + https://github.com/OWASP/ASVS/issues/2422#issuecomment-2507546095

Verify that cookie-based session tokens have the 'Secure' attribute set, and if the 'Host-' prefix is not used for the cookie name, the 'Secure-' prefix must be used for the cookie name.

The reasons: