Category: The CERT Oracle Secure Coding Standard for Java (2011) Chapter 6 - Object Orientation (OBJ)

Obsolete
Summary

Weaknesses in this category are related to rules in the Object Orientation (OBJ) chapter of The CERT Oracle Secure Coding Standard for Java (2011).

Membership
IDNameDescription
CWE-374Passing Mutable Objects to an Untrusted MethodThis vulnerability occurs when a function receives a direct reference to mutable data, such as an object or array, instead of a safe copy of that data.
CWE-375Returning a Mutable Object to an Untrusted CallerThis vulnerability occurs when a method directly returns a reference to its internal mutable data, allowing untrusted calling code to modify that data unexpectedly.
CWE-486Comparison of Classes by NameThis vulnerability occurs when an application determines an object's trustworthiness or behavior solely by checking its class name. Since multiple classes can share identical names across different packages or classloaders, this comparison can lead to using the wrong, potentially malicious, class.
CWE-491Public cloneable() Method Without Final ('Object Hijack')This vulnerability occurs when a class implements a public clone() method without declaring it final. This allows attackers to create copies of objects without invoking their constructors, potentially leaving the cloned object in an inconsistent or insecure state.
CWE-492Use of Inner Class Containing Sensitive DataUsing inner classes to handle sensitive data can unintentionally expose that data because of how Java compiles them. The compiler transforms inner classes into separate, package-visible classes, which can bypass the intended private access restrictions.
CWE-493Critical Public Variable Without Final ModifierThis vulnerability occurs when a security-sensitive variable is declared as public but not marked as final, allowing untrusted code to unexpectedly change its value after initialization.
CWE-498Cloneable Class Containing Sensitive InformationThis vulnerability occurs when a class containing sensitive information, such as credentials or personal data, is made cloneable. Attackers can bypass normal initialization and access the sensitive data by creating a copy of the object.
CWE-500Public Static Field Not Marked FinalThis vulnerability occurs when a class exposes a public static field without declaring it as final, allowing unintended modification from anywhere in the application.
CWE-582Array Declared Public, Final, and StaticThis vulnerability occurs when an array is declared as public, final, and static, which does not protect the data inside the array from being altered.
CWE-766Critical Data Element Declared PublicThis vulnerability occurs when a critical piece of data—like a variable, field, or class member—is mistakenly declared as public when it should be kept private according to the application's security design.
CWE-844Weaknesses Addressed by The CERT Oracle Secure Coding Standard for Java (2011)CWE entries in this view (graph) are fully or partially eliminated by following the guidance presented in the book "The CERT Oracle Secure Coding Standard for Java" published in 2011. This view is considered obsolete as a newer version of the coding standard is available.
Vulnerability Mapping Notes
Usage: Prohibited
Reasons: Category
Rationale:
This entry is a Category. Using categories for mapping has been discouraged since 2019. Categories are informal organizational groupings of weaknesses that can help CWE users with data aggregation, navigation, and browsing. However, they are not weaknesses in themselves.
Comment:
See member weaknesses of this category.