Class · High

CWE-282: Improper Ownership Management

The product assigns the wrong ownership, or does not properly verify the ownership, of an object or resource.

CWE-282 · Class Level ·1 CVEs ·1 Mitigations

Description

The product assigns the wrong ownership, or does not properly verify the ownership, of an object or resource.

Potential Impact

Access Control

Gain Privileges or Assume Identity

Demonstrative Examples

This function is part of a privileged program that takes input from users with potentially lower privileges.
Bad
def killProcess(processID):os.kill(processID, signal.SIGKILL)
This code does not confirm that the process to be killed is owned by the requesting user, thus allowing an attacker to kill arbitrary processes.
This function remedies the problem by checking the owner of the process before killing it:
Good
def killProcess(processID):
                        user = getCurrentUser()
                           
                           #Check process owner against requesting user
                           if getProcessOwner(processID) == user:os.kill(processID, signal.SIGKILL)return
                           else:print("You cannot kill a process you don't own")return

Mitigations & Prevention

Architecture and DesignOperation

Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.

Detection Methods

  • Automated Static Analysis High — Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then sea

Real-World CVE Examples

CVE IDDescription
CVE-1999-1125Program runs setuid root but relies on a configuration file owned by a non-root user.

Taxonomy Mappings

  • PLOVER: — Ownership errors

Frequently Asked Questions

What is CWE-282?

CWE-282 (Improper Ownership Management) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Class-level weakness. The product assigns the wrong ownership, or does not properly verify the ownership, of an object or resource.

How can CWE-282 be exploited?

Attackers can exploit CWE-282 (Improper Ownership Management) to gain privileges or assume identity. This weakness is typically introduced during the Architecture and Design phase of software development.

How do I prevent CWE-282?

Key mitigations include: Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.

What is the severity of CWE-282?

CWE-282 is classified as a Class-level weakness (High abstraction). It has been observed in 1 real-world CVEs.