Weakness · High
CWE-638: Not Using Complete Mediation
What it is
The product does not perform access checks on a resource every time the resource is accessed by an entity, which can create resultant weaknesses if that entity's rights or privileges change over time.
- Severity (our rating)
- High
- Likelihood of exploit
- Not rated by MITRE
- Introduced during
- Implementation, Operation
- Exploited in the wild
- No CVE in CISA's catalog
What an attacker can do
- Gain Privileges or Assume Identity (Integrity, Confidentiality, Availability, Access Control, Other)
- Execute Unauthorized Code or Commands (Integrity, Confidentiality, Availability, Access Control, Other)
- Bypass Protection Mechanism (Integrity, Confidentiality, Availability, Access Control, Other)
- Read Application Data (Integrity, Confidentiality, Availability, Access Control, Other)
- Other (Integrity, Confidentiality, Availability, Access Control, Other)
How to prevent it
Architecture and Design
- Invalidate cached privileges, file handles or descriptors, or other access credentials whenever identities, processes, policies, roles, capabilities or permissions change. Perform complete authentication checks before accepting, caching and reusing data, dynamic content and code (scripts). Avoid caching access control decisions as much as possible.
- Identify all possible code paths that might access sensitive resources. If possible, create and use a single interface that performs the access checks, and develop code standards that require use of this interface.
H2 Security
Found it in your code?
We review where it appears, fix it with your team, and check it was not already used against you.
Talk to our teamT Academy
Stop writing it in the first place
Learn to build software and systems without weaknesses like this one, with practice on real hosts in your browser, every objective checked on the machine.
Start freeSource: MITRE Common Weakness Enumeration, CWE version 4.19.1. CWE is a trademark of The MITRE Corporation.