Kingdom: Security Features
Software security is not security software. Here we're concerned with topics like authentication, access control, confidentiality, cryptography, and privilege management.
Cookie Security: Misconfigured Prefix
Abstract
A cookie was created with
__Host-
or __Secure-
prefix must have the Secure attribute set, must not set Domain attribute, and must restrict Path attribute value to /
.Explanation
Cookies with names that start with the
__Host-
and __Secure-
prefix must be set with the secure attribute. They must be set from a secure page (HTTPS). Additionally, a __Host-
prefixed cookie must not have a domain attribute specified (so that it is not sent to subdomains) and the path attribute must be set to /
. Violation of these rules can cause a browser to reject the cookie. Restricting a cookie's access to a secure channel protects it from being sent or being overwritten by a forged site over an unencrypted HTTP channel. Restrictions provided by the __Host
prefix prevent a cookie from being accessed by a subdomain where the subdomain might be owned by different entities such as a shared blog platform.References
[1] Standards Mapping - OWASP API 2023 API8 Security Misconfiguration
[2] Standards Mapping - OWASP Application Security Verification Standard 4.0 3.4.4 Cookie-based Session Management (L1 L2 L3)
[3] Standards Mapping - OWASP Mobile 2024 M8 Security Misconfiguration
[4] Standards Mapping - OWASP Top 10 2004 A10 Insecure Configuration Management
[5] Standards Mapping - OWASP Top 10 2010 A6 Security Misconfiguration
[6] Standards Mapping - OWASP Top 10 2021 A05 Security Misconfiguration
desc.dynamic.xtended_preview.Cookie_Security_Misconfigured_Prefix