CWE-440: Expected Behavior Violation
A feature, API, or function does not perform according to its specification.
Browse cwe for c with official CWE context and Glexia analysis.
Search And Filters
Showing 50 of 857 CWE records · Page 8 of 18.
A feature, API, or function does not perform according to its specification.
The product receives a request, message, or directive from an upstream component, but the product does not sufficiently preserve the original source of the request before forwarding the request to an external actor that is outside of the product's control sphere. This causes the product to appear to be the source of the request, leading it to act as a proxy or other intermediary between the upstream component and the external actor.
The product acts as an intermediary HTTP agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed HTTP requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination.
The user interface does not correctly enable or configure a security feature, but the interface provides feedback that causes the user to believe that the feature is in a secure state.
A UI function for a security feature appears to be supported and gives feedback to the user that suggests that it is supported, but the underlying functionality is not implemented.
A UI function is obsolete and the product does not warn the user.
The UI performs the wrong action with respect to the user's request.
The UI has multiple interpretations of user input but does not prompt the user when it selects the less secure interpretation.
The user interface (UI) does not properly represent critical information to the user, allowing the information - or its source - to be obscured or spoofed. This is often a component in phishing attacks.
The product, by default, initializes an internal variable with an insecure or less secure value than is possible.
The product initializes critical internal variables or data stores using inputs that can be modified by untrusted actors.
The product does not exit or otherwise modify its operation when security-relevant errors occur during initialization, such as when a configuration file has a format error or a hardware security module (HSM) cannot be activated, which can cause the product to execute in a less secure fashion than intended by the administrator.
The product does not initialize critical variables, which causes the execution environment to use unexpected values.
The code uses a variable that has not been initialized, leading to unpredictable or unintended results.
The product does not properly "clean up" and remove temporary or supporting resources after they have been used.
The product does not clean up its state or incorrectly cleans up its state when an exception is thrown, leading to unexpected state or control flow.
Duplicate keys in associative lists can lead to non-unique keys being mistaken for an error.
The accidental deletion of a data-structure sentinel can cause serious programming logic problems.
The accidental addition of a data-structure sentinel can cause serious programming logic problems.
A function can return a pointer to memory that is outside of the buffer that the pointer is expected to reference.
The code calls sizeof() on a pointer type, which can be an incorrect calculation if the programmer intended to determine the size of the data that is being pointed to.
In C and C++, one may often accidentally refer to the wrong memory due to the semantics of when math operations are implicitly scaled.
The product subtracts one pointer from another in order to determine size, but this calculation can be incorrect if the pointers do not exist in the same memory chunk.
The product does not properly protect an assumed-immutable element from being modified by an attacker.
The web application does not sufficiently verify inputs that are assumed to be immutable but are actually externally controllable, such as hidden form fields.
The code uses a function that has inconsistent implementations across operating systems and versions.
The behavior of this function is undefined unless its control parameter is set to a specific value.
The product dereferences a pointer that it expects to be valid but is NULL.
The code uses deprecated or obsolete functions, which suggests that the code has not been actively reviewed or maintained.
The code does not have a default case in an expression with multiple conditions, such as a switch statement.
The product defines a signal handler that calls a non-reentrant function.
The product accidentally uses the wrong operator, which changes the logic in security-relevant ways.
The code uses an operator for assignment when the intention was to perform a comparison.
The code uses an operator for comparison when the intention was to perform an assignment.
The code does not explicitly delimit a block that is intended to contain 2 or more statements, creating a logic error.
The product omits a break statement within a switch or similar construct, causing code associated with multiple conditions to execute. This can cause problems when the programmer only intended to execute code associated with one condition.
The product does not sufficiently enforce boundaries between the states of different sessions, causing data to be provided to, or used by, the wrong session.
The product is released with debugging code still enabled or active.
The product has a critical public variable that is not final, which allows the variable to be modified to contain unexpected values.
The product downloads source code or an executable from a remote location and executes the code without sufficiently verifying the origin and integrity of the code.
The product has a method that is declared public, but returns a reference to a private data structure, which could then be modified in unexpected ways.
Assigning public data to a private array is equivalent to giving public access to the array.
The product does not properly prevent sensitive system-level information from being accessed by unauthorized actors who do not have the same level of access to the underlying system as the product does.
The code contains a class with sensitive data, but the class is cloneable. The data can then be accessed by cloning the class.
An object contains a public static field that is not marked final, which might allow it to be modified in unexpected ways.
The product mixes trusted and untrusted data in the same data structure or structured message.
The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
The product contains code that appears to be malicious in nature.
The product appears to contain benign or useful functionality, but it also contains code that is hidden from normal operation that violates the intended security policy of the user or the system administrator.
Non-replicating malicious code only resides on the target system or product that is attacked; it does not attempt to spread to other systems.