Weakness · High
CWE-266: Incorrect Privilege Assignment
What it is
A product incorrectly assigns a privilege to a particular actor, creating an unintended sphere of control for that actor.
- Severity (our rating)
- High
- Likelihood of exploit
- Not rated by MITRE
- Introduced during
- Implementation
- Exploited in the wild
- 1 known exploited CVE
What an attacker can do
- Gain Privileges or Assume Identity (Access Control)
How to prevent it
Architecture and Design
- Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.
- Run your code using the lowest privileges that are required to accomplish the necessary tasks. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
Exploited in the wild: 1 CVE
Vulnerabilities caused by CWE-266 that attackers have used, from CISA's Known Exploited Vulnerabilities catalog, newest first.
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.