Rule Definition
Developers may assume that inputs such as cookies, environment variables, and hidden form fields cannot be modified.
However, an attacker could change these inputs using customized clients or other attacks. This change might not be detected.
When security decisions such as authentication and authorization are made based on the values of these inputs, attackers can bypass the security of the software.
Without sufficient encryption, integrity checking, or other mechanism, any input that originates from an outsider cannot be trusted.
Remediation
Do NOT USE getRequestedSessionId.
Violation Code Sample
if(isActiveSession(request.getRequestedSessionId()) ){
...
}
Fixed Code Sample
Do NOT USE getRequestedSessionId.
Reference
http://cwe.mitre.org/data/definitions/807
OWASP 2017 Category A2 - Broken Authentication
Related Technologies
Technical Criterion
CWE-807 - Reliance on Untrusted Inputs in a Security Decision
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.