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 JNIWhen a Java application uses the Java Native Interface (JNI) to call code written in another programming language, it can expose the application to weaknesses in that code, even if those weaknesses cannot occur in Java.
CWE-242Use of Inherently Dangerous FunctionThe product calls a function that can never be guaranteed to work safely.
CWE-245J2EE Bad Practices: Direct Management of ConnectionsThe J2EE application directly manages connections, instead of using the container's connection management facilities.
CWE-246J2EE Bad Practices: Direct Use of SocketsThe J2EE application directly uses sockets instead of using framework method calls.
CWE-382J2EE Bad Practices: Use of System.exit()A J2EE application uses System.exit(), which also shuts down its container.
CWE-383J2EE Bad Practices: Direct Use of ThreadsThread management in a Web application is forbidden in some circumstances and is always highly error prone.
CWE-432Dangerous Signal Handler not Disabled During Sensitive OperationsThe product uses a signal handler that shares state with other signal handlers, but it does not properly mask or prevent those signal handlers from being invoked while the original signal handler is still running.
CWE-439Behavioral Change in New Version or EnvironmentA's behavior or functionality changes with a new version of A, or a new environment, which is not known (or manageable) by B.
CWE-440Expected Behavior ViolationA feature, API, or function does not perform according to its specification.
CWE-474Use of Function with Inconsistent ImplementationsThe code uses a function that has inconsistent implementations across operating systems and versions.
CWE-477Use of Obsolete FunctionThe code uses deprecated or obsolete functions, which suggests that the code has not been actively reviewed or maintained.
CWE-479Signal Handler Use of a Non-reentrant FunctionThe product defines a signal handler that calls a non-reentrant function.
CWE-558Use of getlogin() in Multithreaded ApplicationThe product uses the getlogin() function in a multithreaded context, potentially causing it to return incorrect values.
CWE-572Call to Thread run() instead of start()The product calls a thread's run() method instead of calling start(), which causes the code to run in the thread of the caller instead of the callee.
CWE-573Improper Following of Specification by CallerThe product does not follow or incorrectly follows the specifications as required by the implementation language, environment, framework, protocol, or platform.
CWE-574EJB Bad Practices: Use of Synchronization PrimitivesThe product violates the Enterprise JavaBeans (EJB) specification by using thread synchronization primitives.
CWE-575EJB Bad Practices: Use of AWT SwingThe product violates the Enterprise JavaBeans (EJB) specification by using AWT/Swing.
CWE-576EJB Bad Practices: Use of Java I/OThe product violates the Enterprise JavaBeans (EJB) specification by using the java.io package.
CWE-577EJB Bad Practices: Use of SocketsThe product violates the Enterprise JavaBeans (EJB) specification by using sockets.
CWE-578EJB Bad Practices: Use of Class LoaderThe product violates the Enterprise JavaBeans (EJB) specification by using the class loader.
CWE-586Explicit Call to Finalize()The product makes an explicit call to the finalize() method from outside the finalizer.
CWE-589Call to Non-ubiquitous APIThe product uses an API function that does not exist on all versions of the target platform. This could cause portability problems or inconsistencies that allow denial of service or other consequences.
CWE-617Reachable AssertionThe product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary.
CWE-676Use of Potentially Dangerous FunctionThe product invokes a potentially dangerous function that could introduce a vulnerability if it is used incorrectly, but the function can also be used safely.
CWE-684Incorrect Provision of Specified FunctionalityThe code does not function according to its published specifications, potentially leading to incorrect usage.
CWE-695Use of Low-Level FunctionalityThe product uses low-level functionality that is explicitly prohibited by the framework or specification under which the product is supposed to operate.
CWE-758Reliance on Undefined, Unspecified, or Implementation-Defined BehaviorThe product uses an API function, data structure, or other entity in a way that relies on properties that are not always guaranteed to hold for that entity.
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.