Skip to main content

CWE-784: Reliance on Cookies without Validation and Integrity Checking in a Security Decision

VariantDraftExploit Likelihood: High

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.

View on MITRE
Back to CWE Lookup

Extended Description

Attackers can easily modify cookies, within the browser or by implementing the client-side code outside of the browser. Attackers can bypass protection mechanisms such as authorization and authentication by modifying the cookie to contain an expected value.

Technical Details

Structure
Simple

Applicable To

Languages
Not Language-Specific
Platforms

Frequently Asked Questions

What is CWE-784: Reliance on Cookies without Validation and Integrity Checking in a Security Decision?+

CWE-784: Reliance on Cookies without Validation and Integrity Checking in a Security Decision is a Common Weakness Enumeration (CWE) entry maintained by MITRE. 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. Attackers can easily modify cookies, within the browser or by implementing the client-side code outside of the browser. Attackers can bypass protection mechanisms such as authorization and authentication by modifying the cookie to contain an expected value.

What are the security consequences of Reliance on Cookies without Validation and Integrity Checking in a Security Decision?+

If exploited, CWE-784 (Reliance on Cookies without Validation and Integrity Checking in a Security Decision) it can compromise Access Control, leading to outcomes such as Bypass Protection Mechanism and Gain Privileges or Assume Identity.

How do you prevent or mitigate Reliance on Cookies without Validation and Integrity Checking in a Security Decision?+

Recommended mitigations for CWE-784 include: 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.

Which programming languages are affected by Reliance on Cookies without Validation and Integrity Checking in a Security Decision?+

CWE-784 commonly affects Not Language-Specific. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.

What are real-world examples of Reliance on Cookies without Validation and Integrity Checking in a Security Decision?+

MITRE documents real CVEs mapped to CWE-784, including CVE-2009-1549, CVE-2009-1619, CVE-2009-0864, CVE-2008-5784 and CVE-2008-6291. You can look up the full details of each CVE, including CVSS scores and remediation guidance, on our CVE Lookup tool.

What is the difference between a CWE and a CVE?+

A CWE (Common Weakness Enumeration) like CWE-784 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.

Learn More