---
title: "CWE-1275: Sensitive Cookie with Improper SameSite Attribute"
url: https://radicalnotion.ai/cwe/cwe-1275
type: cwe
description: "The SameSite attribute for sensitive cookies is not set, or an insecure value is used."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-1275: Sensitive Cookie with Improper SameSite Attribute

- **Abstraction:** Variant
- **Structure:** Simple
- **Status:** Incomplete
- **Likelihood of exploit:** Medium
- **CVEs with this as primary weakness:** 13
- **Of those, in CISA KEV:** 0
- **New in 2026:** 4
- **CWE catalog version:** 4.21

## Description

The SameSite attribute for sensitive cookies is not set, or an insecure value is used.

## Background

The SameSite attribute controls how cookies are sent for cross-domain requests. This attribute may have three values: 'Lax', 'Strict', or 'None'.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | This weakness occurs during implementation when the coder does not properly set the SameSite attribute. |

## Applicable platforms

**Technologies:** Web Based (Undetermined), Web Server (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality, Integrity, Non-Repudiation, Access Control | Modify Application Data | - |

## Potential mitigations

### Implementation

Set the SameSite attribute of a sensitive cookie to "Lax" or "Strict". This instructs the browser to apply this cookie only to same-domain requests, which provides a good Defense in Depth against CSRF attacks. When the "Lax" value is in use, cookies are also sent for top-level cross-domain navigation via HTTP GET, HEAD, OPTIONS, and TRACE methods, but not for other HTTP methods that are more likely to cause side-effects of state mutation.

Effectiveness: High. While this mitigation is effective for protecting cookies from a browser's own scripting engine, third-party components or plugins may have their own engines that allow access to cookies. Attackers might also be able to use XmlHttpResponse to read the headers directly and obtain the cookie.

## Detection methods

### Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Effectiveness: High

## Demonstrative examples

### Example 1

In this example, a cookie is used to store a session ID for a client's interaction with a website. The snippet of code below establishes a new cookie to hold the sessionID.

Bad code:

```javascript
let sessionId = generateSessionId()
let cookieOptions = { domain: 'example.com' }
response.cookie('sessionid', sessionId, cookieOptions)
```

Attack code:

```html
<html>
    <form id=evil action="http://local:3002/setEmail" method="POST">
        <input type="hidden" name="newEmail" value="abc@example.com" />
    </form>
<script>evil.submit()</script>
</html>
```

Good code:

```javascript
let sessionId = generateSessionId()
let cookieOptions = { domain: 'example.com', sameSite: 'Strict' }
response.cookie('sessionid', sessionId, cookieOptions)
```

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2022-24045 | Web application for a room automation system has client-side JavaScript that sets a sensitive cookie without the SameSite security attribute, allowing the cookie to be sniffed |

## Real CVEs with this weakness (sample of 12 of 13)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2024-6611 | Incorrect handling of SameSite cookies | critical | 9.8 | - | No | 2024-07-09 |
| CVE-2025-52628 | HCL AION is susceptible to Missing SameSite vulnerability | high | 8.8 | - | No | 2026-02-03 |
| CVE-2023-53957 | Kimai 1.30.10 SameSite Cookie Vulnerability Session Hijacking | high | 8.5 | - | No | 2025-12-19 |
| CVE-2026-47889 | Spring Framework sameSite Attribute Dropped in JettyCoreServerHttpResponse | high | 7.5 | - | No | 2026-08-27 |
| CVE-2025-36134 | IBM Sterling B2B Integrator and IBM Sterling File Gateway information disclosure | high | 7.5 | - | No | 2025-11-25 |
| CVE-2026-107280 | AsyncHttpClient: Cookie Domain attribute is not checked against the public suffix list, so a cookie can be set for co.uk | medium | 6.9 | - | No | 2026-10-07 |
| CVE-2025-24387 | Missing CSRF protection | medium | 6.5 | - | No | 2025-03-10 |
| CVE-2023-30674 | - | medium | 6.5 | - | No | 2023-07-06 |
| CVE-2022-38386 | IBM Cloud Pak for Security information disclosure | medium | 5.9 | - | No | 2024-05-01 |
| CVE-2024-30155 | HCL SX is susceptible to cookie with Insecure, Improper, or Missing SameSite attribute vulnerability | medium | 5.5 | - | No | 2025-03-26 |
| CVE-2024-42212 | HCL BigFix Compliance is affected by an improper or missing SameSite attribute | medium | 5.4 | - | No | 2025-05-05 |
| CVE-2026-55688 | AsyncHttpClient: Cookie stored for an unrelated domain (cookie tossing) via ThreadSafeCookieStore | medium | 4.0 | - | No | 2026-07-01 |

## Related attack patterns (CAPEC)

- [CAPEC-62](https://radicalnotion.ai/capec/capec-62): Cross Site Request Forgery

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-923](https://radicalnotion.ai/cwe/cwe-923) | Improper Restriction of Communication Channel to Intended Endpoints |
| Can precede | [CWE-352](https://radicalnotion.ai/cwe/cwe-352) | Cross-Site Request Forgery |

## Frequently asked questions

### What is CWE-1275?

The SameSite attribute for sensitive cookies is not set, or an insecure value is used.

### What CVEs are caused by CWE-1275?

13 recorded CVEs are attributed to CWE-1275, including CVE-2024-6611, CVE-2025-52628 and CVE-2023-53957.

### How do you prevent CWE-1275?

Set the SameSite attribute of a sensitive cookie to "Lax" or "Strict". This instructs the browser to apply this cookie only to same-domain requests, which provides a good Defense in Depth against CSRF attacks. When the "Lax" value is in use, cookies are also sent for top-level cross-domain navigation via HTTP GET, HEAD, OPTIONS, and TRACE methods, but not for other HTTP methods that are more likely to cause side-effects of state mutation.

### How is CWE-1275 detected?

Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

### What are the consequences of CWE-1275?

Exploiting CWE-1275 can lead to: Modify Application Data.

### Is CWE-1275 actively exploited?

13 recorded CVEs are caused by CWE-1275; none are currently in CISA's KEV catalog of actively exploited flaws.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/1275.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-1275). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
