CWE-302: Authentication Bypass by Assumed-Immutable Data | Glexia
CWE-302 (Authentication Bypass by Assumed-Immutable Data) weakness overview with consequences, detection methods, mitigations, related CVEs and MITRE ATT&CK context.
Glexia's Take · Automated analysis
CWE-302: Authentication Bypass by Assumed-Immutable Data
Authentication Bypass by Assumed-Immutable Data represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Executive Impact
- Access Control: Bypass Protection Mechanism
Developer Pattern
CWE-302 is the kind of defect developers can usually prevent with explicit validation, safer framework defaults, and tests that exercise hostile input or unsafe state transitions.
Automation confidence
high confidence from CWE-302, 4.20.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Official CWE Definition
CWE-302: Authentication Bypass by Assumed-Immutable Data
The authentication scheme or implementation uses key data elements that are assumed to be immutable, but can be controlled or modified by the attacker.
Developer And Remediation Guidance
How teams prevent and detect this weakness
Causes
- In the following example, an "authenticated" cookie is used to determine whether or not a user should be granted access to a system. Modifying the value of a cookie on the client-side is trivial, but many developers assume that cookies are essentially immutable.
Remediation
- Architecture and Design,Operation,Implementation: Implement proper protection for immutable data (e.g. environment variable, hidden form fields, etc.)
Detection
- Code review
- SAST
- DAST
- Focused regression tests
Mappings
Related CVEs, CWEs, and ATT&CK context
Related CWEs
ATT&CK Relevance
ATT&CK relevance is shown only when reviewed or responsibly inferred.
