1204
if (session.getAttribute(ATTR_USR) == null) {
session.setAttribute(ATTR_USR, usrname);
}
Example Language: C# (Bad)
usrname = request.Item("usrname");
if (session.Item(ATTR_USR) == null) {
session.Add(ATTR_USR, usrname);
}
Without well-established and maintained trust boundaries, programmers will inevitably lose track of
which pieces of data have been validated and which have not. This confusion will eventually allow
some data to be used without first being validated.
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 485 7PK - Encapsulation 700 2328
MemberOf 963 SFP Secondary Cluster: Exposed Data 888 2400
MemberOf 1348 OWASP Top Ten 2021 Category A04:2021 - Insecure
Design
1344 2491
MemberOf 1364 ICS Communications: Zone Boundary Failures 1358 2501
MemberOf 1416 Comprehensive Categorization: Resource Lifecycle
Management
1400 2545
Taxonomy Mappings
Mapped Taxonomy Name Node ID Fit Mapped Node Name
7 Pernicious Kingdoms Trust Boundary Violation
Software Fault Patterns SFP23 Exposed Data
References
[REF-6]Katrina Tsipenyuk, Brian Chess and Gary McGraw. "Seven Pernicious Kingdoms: A
Taxonomy of Software Security Errors". NIST Workshop on Software Security Assurance Tools
Techniques and Metrics. 2005 November 7. NIST. < https://samate.nist.gov/SSATTM_Content/
papers/Seven%20Pernicious%20Kingdoms%20-%20Taxonomy%20of%20Sw%20Security
%20Errors%20-%20Tsipenyuk%20-%20Chess%20-%20McGraw.pdf >.
CWE-502: Deserialization of Untrusted Data
Weakness ID : 502
Structure : Simple
Abstraction : Base
Description
The product deserializes untrusted data without sufficiently verifying that the resulting data will be
valid.
Extended Description
It is often convenient to serialize objects for communication or to save them for later use. However,
deserialized data or code can often be modified without using the provided accessor functions if it
does not use cryptography to protect itself. Furthermore, any cryptography would still be client-side
security -- which is a dangerous security assumption.
CWE Version 4.14
CWE-502: Deserialization of Untrusted Data
CWE-502: Deserialization of Untrusted Data