CWEweakness
CWE-784 Reliance on Cookies without Validation and Integrity Checking in a Security Decision
High
Official page ↗
- Abstraction
- Variant
- Structure
- Simple
- Status
- Draft
- Likelihood of exploit
- High
- Languages
- Not Language-Specific
- CWE version
- 5.0
Description
The product uses a protection mechanism that relies on the existence or values of a cookie, but it does not properly ensure that the cookie is valid for the associated user.
Common consequences
• Access Control: Bypass Protection Mechanism, Gain Privileges or Assume Identity — It is dangerous to use cookies to set a user's privileges or perform other security-critical actions. Attackers can easily modify cookies, within the browser or by implementing the client-side code outside of the browser. The cookie can be manipulated to claim a high level of authorization, or to claim that successful authentication has occurred.
Potential mitigations
• [Architecture and Design] Avoid using cookie data for a security-related decision.
• [Implementation] 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.
• [Architecture and Design] Add integrity checks to detect tampering.
• [Architecture and Design] 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.
Observed examples
• CVE-2009-1549: Attacker can bypass authentication by setting a cookie to a specific value.
• CVE-2009-1619: Attacker can bypass authentication and gain admin privileges by setting an "admin" cookie to 1.
• CVE-2009-0864: Content management system allows admin privileges by setting a "login" cookie to "OK."
• CVE-2008-5784: e-dating application allows admin privileges by setting the admin cookie to 1.
• CVE-2008-6291: Web-based email list manager allows attackers to gain admin privileges by setting a login cookie to "admin."
Related
Observed example · CVE (5)
- CVE-2009-1619 Teraway FileStream 1.0 allows remote attackers to bypass authentication and gain administrative access by setting the twFSadmin cookie to 1. vulnerability
- CVE-2009-1549 AGTC MyShop 3.2b allows remote attackers to bypass authentication and obtain administrative access setting the log_accept cookie to… vulnerability
- CVE-2009-0864 S-Cms 1.1 Stable allows remote attackers to bypass authentication and obtain administrative access via an OK value for the login cookie. vulnerability
- CVE-2008-6291 Acc PHP eMail 1.1 allows remote attackers to bypass authentication and gain administrative access by setting the NEWSLETTERLOGIN cookie to… vulnerability
- CVE-2008-5784 V3 Chat - Profiles/Dating Script 3.0.2 allows remote attackers to bypass authentication and gain administrative access by setting the admin… vulnerability
Child of · CWE (2)
Referenced by CVE · weakness (6)
- CVE-2026-60134 Weintek cMT3092X HMI allows a non-privileged user to modify cookies to gain elevated privileges. vulnerability
- CVE-2026-45055 CubeCart is an ecommerce software solution. vulnerability
- CVE-2024-9820 The WP 2FA with Telegram plugin for WordPress is vulnerable to Two-Factor Authentication Bypass in versions up to, and including, 3.0. vulnerability
- CVE-2023-3050 Reliance on Cookies without Validation and Integrity Checking in a Security Decision vulnerability in TMT Lockcell allows Privilege Abuse,… vulnerability
- CVE-2022-3083 All versions of Landis+Gyr E850 (ZMQ200) are vulnerable to CWE-784: Reliance on Cookies Without Validation and Integrity. vulnerability
- CVE-2020-8184 A reliance on cookies without validation/integrity check security vulnerability exists in rack < 2.2.3, rack < 2.1.4 that makes it is… vulnerability