CWE-565: Reliance on Cookies without Validation and Integrity Checking
The product relies on the existence or values of cookies when performing security-critical operations, but it does not properly ensure that the setting is valid for the associated user.
Last updated
Overview
CWE-565 (Reliance on Cookies without Validation and Integrity Checking) is a base-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
Real-world CVEs
66 recorded CVEs are caused by CWE-565 (Reliance on Cookies without Validation and Integrity Checking), including 1 in CISA's KEV (Known Exploited Vulnerabilities) catalog. KEVs are shown first. 17 new CWE-565 CVEs have been recorded so far in 2026 (7 in 2025).
- CVE-2026-0257CISA KEV
PAN-OS: GlobalProtect Authentication Bypass Vulnerabilities
High · CVSS 7.8 · EPSS 100th2026-05-13 - CVE-2023-41084
Socomec MOD3GP-SY-120K Reliance on Cookies without Validation and Integrity Checking
Critical · CVSS 10.0 · EPSS 54th2023-09-18 - CVE-2014-125112
Plack::Middleware::Session::Cookie versions through 0.21 for Perl allows remote code execution
Critical · CVSS 9.8 · EPSS 58th2026-03-26 - CVE-2025-65212Critical · CVSS 9.8 · EPSS 93th2026-01-06
- CVE-2025-14440
JAY Login & Register <= 2.4.01 - Authentication Bypass via Cookie
Critical · CVSS 9.8 · EPSS 55th2025-12-13 - CVE-2025-2395
e-Excellence U-Office Force - Improper Authentication
Critical · CVSS 9.8 · EPSS 48th2025-03-17 - CVE-2024-0947
Cookies Manipulation in Talya Informatics' Elektraweb
Critical · CVSS 9.8 · EPSS 41th2024-06-27 - CVE-2024-28288Critical · CVSS 9.8 · EPSS 54th2024-03-30
- CVE-2023-35885Critical · CVSS 9.8 · EPSS 99th2023-06-20
- CVE-2022-38297Critical · CVSS 9.8 · EPSS 71th2022-09-12
- CVE-2019-7266Critical · CVSS 9.8 · EPSS 92th2019-07-02
- CVE-2018-20512Critical · CVSS 9.8 · EPSS 78th2019-01-03
Showing 12 of 66 recorded CWE-565 CVEs. Get an alert for each new one, with AI-written analysis and fixes.
Monitor these CVEsCommon consequences
What can happen when CWE-565 is exploited.
Modify Application Data, Execute Unauthorized Code or Commands
Affects: Confidentiality, Integrity, Availability
Attackers can easily modify cookies, within the browser or by implementing the client-side code outside of the browser. Reliance on cookies without detailed validation and integrity checking can allow attackers to bypass authentication, conduct injection attacks such as SQL injection and cross-site scripting, or otherwise modify inputs in unexpected ways.
Gain Privileges or Assume Identity
Affects: Access Control
It is dangerous to use cookies to set a user's privileges. The cookie can be manipulated to escalate an attacker's privileges to an administrative level.
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
How to prevent it
Practical mitigations for CWE-565, grouped by where in the lifecycle they apply.
Avoid using cookie data for a security-related decision.
Perform thorough input validation (i.e.: server side validation) on the cookie data if you're going to use it for a security related decision.
Add integrity checks to detect tampering.
Protect critical cookies from replay attacks, since cross-site scripting or other attacks may allow attackers to steal a strongly-encrypted cookie that also passes integrity checks. This mitigation applies to cookies that should only be valid during a single transaction or session. By enforcing timeouts, you may limit the scope of an attack. As part of your integrity check, use an unpredictable, server-side value that is not exposed to the client.
How to detect it
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
Code examples
MITRE examples of the weakness in code.
The following code excerpt reads a value from a browser cookie to determine the role of the user.
Vulnerable example
Cookie[] cookies = request.getCookies();
Cookie c = cookies[i];
userRole = c.getValue();It is easy for an attacker to modify the "role" value found in the locally stored cookie, allowing privilege escalation.
Illustrative examples
Real CVEs that MITRE cites as examples of this weakness.
- CVE-2008-5784 — e-dating application allows admin privileges by setting the admin cookie to 1.
Terminology & mappings
Mapped taxonomies
- Software Fault Patterns: Faulty endpoint authentication (SFP29)
Attack patterns
CAPEC attack patterns that exploit this weakness.
Frequently asked questions
Common questions about CWE-565.
- What is CWE-565?
- The product relies on the existence or values of cookies when performing security-critical operations, but it does not properly ensure that the setting is valid for the associated user.
- What CVEs are caused by CWE-565?
- 66 recorded CVEs are attributed to CWE-565, including CVE-2026-0257, CVE-2023-41084 and CVE-2014-125112. 1 is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.
- How do you prevent CWE-565?
- Avoid using cookie data for a security-related decision.
- How is CWE-565 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-565?
- Exploiting CWE-565 can lead to: Modify Application Data, Execute Unauthorized Code or Commands, Gain Privileges or Assume Identity.
- Is CWE-565 actively exploited?
- Yes. 1 CWE-565 vulnerability is in CISA's KEV catalog of actively exploited flaws, out of 66 recorded CVEs.
References
- MITRE CWE definition (CWE-565) (opens in a new tab)
- CWE-565 vulnerabilities on NVD (opens in a new tab)
- Learn: What is a CWE?
Weakness data is sourced from the MITRE CWE catalog (v4.20). CVE associations are aggregated and kept current by RadicalNotion.AI.
Track CWE-565 CVEs
Get an alert when a new CWE-565 CVE affects your products, with AI-written analysis and remediation steps.