Insecure Session Management (Missing SameSite Attribute)
- CWE 1275
- CWE 352
- OWASP 2025-A01
- OWASP 2025-A07
A session cookie is set without a valid SameSite attribute. The attribute tells the browser not to send the cookie along with requests that were started by another site, which is the main browser side defense against cross-site request forgery (CSRF).
Modern browsers treat a missing attribute as Lax, but older browsers, some embedded browsers and a number of clients do not, and they attach the cookie to every cross-site request. Relying on the default also makes the protection invisible in the application's own configuration.
Remediation
Set
SameSite=Laxon session cookies, orSameSite=Strictwhen the application does not need to be entered by following links from other sites.Keep anti-CSRF tokens for state changing requests.
SameSiteis an additional layer, not a replacement.Set the attribute in the framework's session configuration rather than in individual responses, so that it applies to every cookie.
References
Search Vulnerability
You may also see
- Insecure Session Management (Missing SameSite Attribute)
- Insecure Session Management (SameSite None Without Secure)
- Insecure Session Management (Weak Session Identifier)
- Insecure Session Management (Predictable Session Identifier)
- Insecure Session Management (Session Identifier in URL)
- Insecure Session Management (Excessive Cookie Lifetime)
- Insecure JSON Web Token
- Insecure Session Management