CWE-682: Incorrect Calculation
The product performs a calculation that generates incorrect or unintended results that are later used in security-critical decisions or resource management.
Browse cwe weaknesses with official CWE context and Glexia analysis.
Search And Filters
Showing 50 of 969 CWE records · Page 13 of 20.
The product performs a calculation that generates incorrect or unintended results that are later used in security-critical decisions or resource management.
The product calls a function, procedure, or routine, but the caller specifies the arguments in an incorrect order, leading to resultant weaknesses.
The code does not function according to its published specifications, potentially leading to incorrect usage.
The product calls a function, procedure, or routine, but the caller specifies too many arguments, or too few arguments, which may lead to undefined behavior and resultant weaknesses.
The product calls a function, procedure, or routine, but the caller specifies an argument that is the wrong data type, which may lead to resultant weaknesses.
The product calls a function, procedure, or routine, but the caller specifies an argument that contains the wrong value, which may lead to resultant weaknesses.
The product calls a function, procedure, or routine, but the caller specifies the wrong variable or reference as one of the arguments, which may lead to undefined behavior and resultant weaknesses.
The product, while copying or cloning a resource, does not set the resource's permissions or access control until the copy is complete, leaving the resource exposed to other spheres while the copy is taking place.
The product does not check for an error after calling a function that can return with a NULL pointer if the function fails, which leads to a resultant NULL pointer dereference.
The code does not sufficiently manage its control flow during execution, creating conditions in which the control flow can be modified in unexpected ways.
The product uses a denylist-based protection mechanism to defend against XSS attacks, but the denylist is incomplete, allowing XSS variants to succeed.
The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product.
The product uses multiple resources that can have the same identifier, in a context in which unique identifiers are required.
The product uses low-level functionality that is explicitly prohibited by the framework or specification under which the product is supposed to operate.
The product performs multiple related behaviors, but the behaviors are performed in the wrong order in ways that may produce resultant weaknesses.
The product compares two entities in a security-relevant context, but the comparison is incorrect.
The web application sends a redirect to another location, but instead of exiting, it executes additional code.
The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.
The product does not correctly convert an object, resource, or structure from one type to a different type.
The product does not properly return control flow to the proper location after it has completed a task or detected an unusual condition.
The product uses a name or reference to access a resource, but the name/reference resolves to a resource that is outside of the intended control sphere.
The product does not ensure or incorrectly ensures that structured messages or data are well-formed and that certain security properties are met before being read from an upstream component or sent to a downstream component.
The product assigns an owner to a resource, but the owner is outside of the intended control sphere.
The product does not follow certain coding rules for development, which can lead to resultant weaknesses or increase the severity of the associated vulnerabilities.
The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.
The developer builds a security-critical protection mechanism into the software, but the compiler optimizes the program such that the mechanism is removed or modified.
The product provides an Applications Programming Interface (API) or similar interface for interaction with external actors, but the interface includes a dangerous method or function that is not properly restricted.
The product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product.
The product does not handle or incorrectly handles an exceptional condition.
The product does not return custom error pages to the user, possibly exposing sensitive information.
A protocol or its implementation supports interaction between multiple actors and allows those actors to negotiate which algorithm should be used as a protection mechanism such as encryption or authentication, but it does not select the strongest algorithm that is available to both parties.
The 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.
The product uses a one-way cryptographic hash against an input that should not be reversible, such as a password, but the product does not also use a salt as part of the input.
The product uses a one-way cryptographic hash against an input that should not be reversible, such as a password, but the product uses a predictable salt as part of the input.
The product calls free() on a pointer to a memory resource that was allocated on the heap, but the pointer is not at the start of the buffer.
The product attempts to return a memory resource to the system, but it calls a release function that is not compatible with the function that was originally used to allocate that resource.
The product attempts to return a memory resource to the system, but it calls the wrong release function or calls the appropriate release function incorrectly.
The product locks a critical resource more times than intended, leading to an unexpected state in the system.
The product unlocks a critical resource more times than intended, leading to an unexpected state in the system.
The product declares a critical variable, field, or member to be public when intended security policy requires it to be private.
The product defines a public method that reads or modifies a private variable.
The product contains a conditional statement with multiple logical expressions in which one of the non-leading expressions may produce side effects. This may lead to an unexpected state in the program after the execution of the conditional, because short-circuiting logic may prevent the side effects from occurring.
This entry has been deprecated because it was a duplicate of CWE-774. All content has been transferred to CWE-774.
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.
The product does not properly maintain a reference to a resource that has been allocated, which prevents the resource from being reclaimed.
The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.
The product does not properly maintain references to a file descriptor or handle, which prevents that file descriptor/handle from being reclaimed.
The product allocates file descriptors or handles on behalf of an actor without imposing any restrictions on how many descriptors can be allocated, in violation of the intended security policy for that actor.
The product does not release a file descriptor or handle after its effective lifetime has ended, i.e., after the file descriptor/handle is no longer needed.
The product uses XML documents and allows their structure to be defined with a Document Type Definition (DTD), but it does not properly control the number of recursive definitions of entities.