The product performs an operation at a privilege level that is higher than the minimum level required, which creates new weaknesses or amplifies the consequences of other weaknesses.

Impact: Gain Privileges or Assume IdentityExecute Unauthorized Code or CommandsRead Application DataDoS: Crash, Exit, or Restart
An attacker will be able to gain access to any resources that are allowed by the extra privileges. Common results include executing code, disabling services, and reading restricted data. New weaknesses can be exposed because running with extra privileges, such as root or Administrator, can disable the normal security checks being performed by the operating system or surrounding environment. Other pre-existing weaknesses can turn into security vulnerabilities if they occur while operating at raised privileges.
Strategy: Environment Hardening
Strategy: Separation of Privilege
Strategy: Attack Surface Reduction
Strategy: Environment Hardening
python
#avoid CWE-22 and CWE-78* print('Usernames cannot contain invalid characters') return False try: ``` raisePrivileges() os.mkdir('/home/' + username) lowerPrivileges() except OSError: print('Unable to create new user directory for user:' + username) return False return True
cjavaxmljavaMedium