Category: SFP Secondary Cluster: Use of an Improper API

Incomplete
Summary

This category identifies Software Fault Patterns (SFPs) within the Use of an Improper API cluster (SFP3).

Membership
IDNameDescription
CWE-111Direct Use of Unsafe JNIThis weakness occurs when a Java application directly calls native code through the Java Native Interface (JNI), exposing the entire application to security risks present in that external code, even if Java itself is safe from those specific flaws.
CWE-242Use of Inherently Dangerous FunctionThis vulnerability occurs when code uses functions that are inherently unsafe and cannot be reliably secured, posing a direct risk to application stability and security.
CWE-245J2EE Bad Practices: Direct Management of ConnectionsThis vulnerability occurs when a J2EE application handles database connections directly instead of using the container's built-in connection management system.
CWE-246J2EE Bad Practices: Direct Use of SocketsThis vulnerability occurs when a J2EE application creates network sockets directly, bypassing the container-managed communication framework provided by the platform.
CWE-382J2EE Bad Practices: Use of System.exit()This vulnerability occurs when a J2EE application directly calls System.exit(), which forcibly terminates the entire application server process, not just the application itself.
CWE-383J2EE Bad Practices: Direct Use of ThreadsCreating or managing threads directly within a J2EE application is a risky practice that violates the platform's standards and often leads to unstable applications.
CWE-432Dangerous Signal Handler not Disabled During Sensitive OperationsThis vulnerability occurs when a program's signal handler, which shares resources like global variables with other handlers, can be interrupted and re-entered before it finishes its work. The program fails to block other signals during this sensitive operation, leaving shared state vulnerable to corruption.
CWE-439Behavioral Change in New Version or EnvironmentThis vulnerability occurs when a component's behavior unexpectedly changes after an update or when deployed to a different environment, and the systems or users depending on it are unaware of and cannot manage this change.
CWE-440Expected Behavior ViolationThis weakness occurs when a software component, such as a function, API, or feature, fails to act as documented or intended. The system's actual behavior deviates from its promised specification, leading to unpredictable results.
CWE-474Use of Function with Inconsistent ImplementationsThis vulnerability occurs when code relies on a function whose behavior changes across different operating systems or versions, leading to unpredictable security risks when the software runs in an unexpected environment.
CWE-477Use of Obsolete FunctionThis vulnerability occurs when code relies on deprecated or obsolete functions, indicating outdated practices and insufficient maintenance that can introduce security gaps.
CWE-479Signal Handler Use of a Non-reentrant FunctionThis vulnerability occurs when a signal handler in your code calls a function that is not safe to re-enter. If that function is interrupted and called again before it finishes, it can corrupt memory and crash your program or create security weaknesses.
CWE-558Use of getlogin() in Multithreaded ApplicationUsing the getlogin() function in a multithreaded application can lead to unreliable or incorrect username results, creating security and logic flaws.
CWE-572Call to Thread run() instead of start()This vulnerability occurs when a program incorrectly calls a thread's `run()` method directly, instead of using the `start()` method. This mistake causes the thread's code to execute within the caller's current thread, bypassing the creation of a new, concurrent thread of execution.
CWE-573Improper Following of Specification by CallerThis weakness occurs when software fails to properly follow the documented rules, protocols, or requirements of an external component it uses, such as a library, API, framework, or platform.
CWE-574EJB Bad Practices: Use of Synchronization PrimitivesThis vulnerability occurs when an Enterprise JavaBeans (EJB) component improperly uses thread synchronization primitives, violating the EJB specification's design principles.
CWE-575EJB Bad Practices: Use of AWT SwingThis vulnerability occurs when an Enterprise JavaBeans (EJB) component incorrectly uses AWT or Swing UI toolkits, violating the EJB specification's design principles.
CWE-576EJB Bad Practices: Use of Java I/OThis vulnerability occurs when an Enterprise JavaBeans (EJB) component incorrectly uses Java I/O (java.io) operations to access the file system, violating the EJB specification's design principles.
CWE-577EJB Bad Practices: Use of SocketsThis vulnerability occurs when an Enterprise JavaBeans (EJB) component breaks the EJB specification by directly creating or using network sockets.
CWE-578EJB Bad Practices: Use of Class LoaderThis vulnerability occurs when an Enterprise JavaBeans (EJB) component directly manipulates the Java class loader, violating the EJB specification's security and portability rules.
CWE-586Explicit Call to Finalize()This vulnerability occurs when code directly calls an object's finalize() method from outside its designated finalizer context.
CWE-589Call to Non-ubiquitous APIThis vulnerability occurs when software relies on an operating system function that isn't available on all versions of the target platform. This can cause crashes, unexpected behavior, or security failures when the software runs in an environment where the API is missing.
CWE-617Reachable AssertionA reachable assertion occurs when an attacker can trigger an assert() statement or similar debugging check, causing the application to crash or behave in a more disruptive way than intended. This turns a helpful development tool into a denial-of-service vulnerability.
CWE-676Use of Potentially Dangerous FunctionThis vulnerability occurs when code calls a function that can be dangerous if misused, but can also be used safely with proper precautions. The risk lies not in the function itself, but in how it's implemented.
CWE-684Incorrect Provision of Specified FunctionalityThis weakness occurs when software behaves differently than its documented specifications, which can mislead users and create security risks.
CWE-695Use of Low-Level FunctionalityThis vulnerability occurs when code bypasses high-level framework controls by directly using low-level system functions, violating the intended security model.
CWE-758Reliance on Undefined, Unspecified, or Implementation-Defined BehaviorThis weakness occurs when software depends on specific behaviors of an API, data structure, or system component that are not formally guaranteed by its specification. The code assumes these behaviors will always work a certain way, but they might change or fail under different conditions.
CWE-888Software Fault Pattern (SFP) ClustersCWE identifiers in this view are associated with clusters of Software Fault Patterns (SFPs).
CWE-2277PK - API AbuseThis category represents one of the phyla in the Seven Pernicious Kingdoms vulnerability classification. It includes weaknesses that involve the software using an API in a manner contrary to its intended use. According to the authors of the Seven Pernicious Kingdoms, "An API is a contract between a caller and a callee. The most common forms of API misuse occurs when the caller does not honor its end of this contract. For example, if a program does not call chdir() after calling chroot(), it violates the contract that specifies how to change the active root directory in a secure fashion. Another good example of library abuse is expecting the callee to return trustworthy DNS information to the caller. In this case, the caller misuses the callee API by making certain assumptions about its behavior (that the return value can be used for authentication purposes). One can also violate the caller-callee contract from the other side. For example, if a coder subclasses SecureRandom and returns a non-random value, the contract is violated."
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.