CWE-266: Incorrect Privilege Assignment

Export to Word

Description

A product incorrectly assigns a privilege to a particular actor, creating an unintended sphere of control for that actor.

Extended Description

N/A


ThreatScore

Threat Mapped score: 0.0

Industry: Finiancial

Threat priority: Unclassified


Observed Examples (CVEs)

Related Attack Patterns (CAPEC)

N/A


Attack TTPs

N/A

Modes of Introduction

Phase Note
Implementation REALIZATION: This weakness is caused during implementation of an architectural security tactic.

Common Consequences

Potential Mitigations

Applicable Platforms


Demonstrative Examples

Intro: The following example demonstrates the weakness.

seteuid(0); /* do some stuff */ seteuid(getuid());

Intro: The following example demonstrates the weakness.

AccessController.doPrivileged(new PrivilegedAction() { public Object run() { // privileged code goes here, for example: System.loadLibrary("awt"); return null; // nothing to return }

Intro: This application sends a special intent with a flag that allows the receiving application to read a data file for backup purposes.

Body: Any malicious application can register to receive this intent. Because of the FLAG_GRANT_READ_URI_PERMISSION included with the intent, the malicious receiver code can read the user's data.

Intent intent = new Intent(); intent.setAction("com.example.BackupUserData"); intent.setData(file_uri); intent.addFlags(FLAG_GRANT_READ_URI_PERMISSION); sendBroadcast(intent);

Notes

← Back to CWE list