CWE Cross-section
A view in the Common Weakness Enumeration published by The MITRE Corporation.
Objective
Views in the Common Weakness Enumeration (CWE) represent one perspective with which to consider a set of weaknesses.
This view contains a selection of weaknesses that represent the variety of weaknesses that are captured in CWE, at a level of abstraction that is likely to be useful to most audiences. It can be used by researchers to determine how broad their theories, models, or tools are. It will also be used by the CWE content team in 2012 to focus quality improvement efforts for individual CWE entries.
Weaknesses
The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize absolute path sequences such ...
The product, when processing trusted data, accepts any untrusted data that is also included with the trusted data, treating the untrusted data as if it were trusted.
The product reads or writes to a buffer using an index or pointer that references a memory location after the end of the buffer.
The product reads or writes to a buffer using an index or pointer that references a memory location prior to the beginning of the buffer.
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be ...
The product sets a pointer to a specific address other than NULL or 0.
The variable's value is assigned but never used, making it a dead store.
A capture-replay flaw exists when the design of the product makes it possible for a malicious user to sniff network traffic and bypass authentication by replaying it t...
This attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks.
The product uses a sequential operation to read or write a buffer, but it uses an incorrect length value that causes it to access memory that is outside of the bounds ...
The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer, leading to a buf...
The product does not adequately verify the identity of actors at both ends of a communication channel, or does not adequately ensure the integrity of the channel, in a...
The product stores sensitive information in cleartext within a resource that might be accessible to another control sphere.
The product transmits sensitive or security-critical data in cleartext in a communication channel that can be sniffed by unauthorized actors.
The product is composed of a server that relies on the client to implement a mechanism that is intended to protect the server.
The code contains a class with sensitive data, but the class is cloneable. The data can then be accessed by cloning the class.
The product compares classes by name, which can cause it to use the wrong class when multiple classes can have the same name.
The product compares object references instead of the contents of the objects themselves, preventing it from detecting equivalent objects.
Sensitive memory is cleared according to the source code, but compiler optimizations leave the memory untouched when it is not read from again, aka "dead store removal."
The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the...
The product contains dead code, which can never be executed.
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
The product detects a specific error, but takes no actions to handle the error.
The product divides a value by zero.
The product decodes the same input twice, which can limit the effectiveness of any protection mechanism that occurs in between the decoding operations.
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.
In a language where the user can influence the name of a variable at runtime, if the variable names are not controlled, an attacker can read or write to arbitrary vari...
The web application sends a redirect to another location, but instead of exiting, it executes additional code.
The product performs an operation at a privilege level that is higher than the minimum level required, which creates new weaknesses or amplifies the consequences of ot...
The product dereferences a pointer that contains a location for memory that was previously valid, but is no longer valid.
The product stores security-critical state information about its users, or the product itself, in a location that is accessible to unauthorized actors.
The product initializes critical internal variables or data stores using inputs that can be modified by untrusted actors.
The product calls a function, procedure, or routine with arguments that are not correctly specified, leading to always-incorrect behavior and resultant weaknesses.
The product generates an error message that includes sensitive information about its environment, users, or associated data.
The product does not check or incorrectly checks the revocation status of a certificate, which may cause it to use a certificate that has been compromised.
The product attempts to drop privileges but does not check or incorrectly checks to see if the drop succeeded.
Using realloc() to resize buffers that store sensitive information can leave the sensitive information exposed to attack, because it is not removed from memory.
The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralize...
The product receives input from an upstream component, but it does not restrict or incorrectly restricts the input before it is used as an identifier for a resource th...
The product supports a session in which more than one behavior must be performed by an actor, but it does not properly ensure that the actor performs the behaviors in ...
The product does not follow, or incorrectly follows, the chain of trust for a certificate back to a trusted root certificate, resulting in incorrect trust of any resou...
The product does not properly handle when an input uses an alternate encoding that is valid for the control sphere to which the input is being sent.
The product does not handle or incorrectly handles a compressed input with a very high compression ratio that produces a large output.
The product does not properly handle when the same input uses several different (mixed) encodings.
The product does not handle or incorrectly handles input that is not syntactically well-formed with respect to the associated specification.
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but ...
The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an uni...
The product does not properly acquire or release a lock on a resource, leading to unexpected resource state changes and behaviors.
The product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments...
The product receives data from an HTTP agent/component (e.g., web server, proxy, browser, etc.), but it does not neutralize or incorrectly neutralizes CR and LF charac...
The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before using the input in a dynamic evaluation...
The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before inserting the input into an executable ...
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
The product constructs all or part of an LDAP query using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes...
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes...
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralize...
The product does not terminate or incorrectly terminates a string or array with a null character or equivalent terminator.
The product does not neutralize or incorrectly neutralizes output that is written to logs.
The product stores, transfers, or shares a resource that contains sensitive information, but it does not properly remove that information before the product makes the ...
The product is vulnerable to file system contents disclosure through path equivalence. Path equivalence involves the use of special characters in file and directory na...
The product does not implement sufficient measures to prevent multiple failed authentication attempts within a short time frame, making it more susceptible to brute fo...
The product uses untrusted input when calculating or using an array index, but the product does not validate or incorrectly validates the index to ensure the index ref...
The product does not validate or incorrectly validates the integrity check values or "checksums" of a message. This may prevent it from detecting if the data has been ...
The product does not verify, or incorrectly verifies, the cryptographic signature for data.
The product uses or specifies an encoding when generating output to a downstream component, but the specified encoding is not the same as the encoding that is expected...
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
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 i...
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows ...
The product allows an entity to perform a legitimate but expensive operation before authentication or authorization has taken place.
The product validates input before applying protection mechanisms that modify the input, which could allow an attacker to bypass the validation via dangerous inputs th...
The code does not explicitly delimit a block that is intended to contain 2 or more statements, creating a logic error.
The product does not correctly calculate the size to be used when allocating a buffer, which could lead to a buffer overflow.
The product does not correctly calculate the length of strings that can contain wide or multi-byte characters.
The product incorrectly checks a return value from a function, which prevents it from detecting errors or exceptional conditions.
When converting from one data type to another, such as long to integer, data can be omitted or translated in a way that produces unexpected values. If the resulting va...
The product assigns an owner to a resource, but the owner is outside of the intended control sphere.
The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.
In C and C++, one may often accidentally refer to the wrong memory due to the semantics of when math operations are implicitly scaled.
A product incorrectly assigns a privilege to a particular actor, creating an unintended sphere of control for that actor.
The product specifies a regular expression in a way that causes data to be improperly matched or compared.
The product uses a Pseudo-Random Number Generator (PRNG) but does not correctly manage seeds.
The product does not conform to the API requirements for a function call that requires extra privileges. This could allow attackers to gain privileges by causing the f...
An algorithm in a product has an inefficient worst-case computational complexity that may be detrimental to system performance and can be triggered by an attacker, typ...
The product, by default, initializes an internal variable with an insecure or less secure value than is possible.
The product does not sufficiently monitor or control transmitted network traffic volume, so that an actor can cause the product to transmit more traffic than should be...
The product uses an algorithm or scheme that produces insufficient entropy, leaving patterns or clusters of values that are more likely to occur than others.
The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval.
The product performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the o...
The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the co...
The product performs a key exchange with an actor without verifying the identity of that actor.
The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.
The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.
The product does not perform an authorization check when an actor attempts to access a resource or perform an action.
The product implements an authentication technique, but it skips a step that weakens the technique.
The product does not implement a required step in a cryptographic algorithm, resulting in weaker encryption than advertised by the algorithm.
The product does not return custom error pages to the user, possibly exposing sensitive information.
The code does not have a default case in an expression with multiple conditions, such as a switch statement.
The product does not initialize critical variables, which causes the execution environment to use unexpected values.
The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.
The product encounters an error but does not provide a status code or return value to indicate that an error has occurred.
The product uses a transmission protocol that does not include a mechanism for verifying the integrity of the data during transmission, such as a checksum.
When multiple sockets are allowed to bind to the same port, other services on that port may be stolen or spoofed.
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 e...
The product does not have a mechanism in place for managing password aging.
A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit.
The product checks a value to ensure that it is less than or equal to a maximum, but it does not also verify that the value is greater than or equal to the minimum.
The product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor, which exposes security...
A product calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.
The product does not record or display information that would be important for identifying the source or nature of an attack, or determining if an action is safe.
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...
The product uses, accesses, or otherwise operates on a resource after that resource has been expired, released, or revoked.
The product uses an expression in which operator precedence causes incorrect logic to be used.
The product supports password aging, but the expiration period is too long.
A number or object is predictable based on observations that the attacker can make about the state of the system or network, such as time, process ID, etc.
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.
Two distinct privileges, roles, capabilities, or rights can be combined in a way that allows an entity to perform unsafe actions that would not be allowed without that...
The product does not properly manage privileges while it is switching between different contexts that have different privileges or spheres of control.
A particular privilege, role, capability, or right can be used to perform unsafe actions that were not intended, even when it is assigned to the correct entity.
The product does not drop privileges before passing control of a resource to an actor that does not have those privileges.
Assigning public data to a private array is equivalent to giving public access to the array.
The 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 th...
Simple authentication protocols are subject to reflection attacks if a malicious user can use the target machine to impersonate a trusted user.
The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that c...
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 uses a protection mechanism that relies on the existence or values of an input, but the input can be modified by an untrusted actor in a way that bypasses ...
A function or operation returns an incorrect return value or status code that does not indicate an error, but causes the product to modify its behavior based on the in...
Nonces should be used for the present occasion and only once.
The code contains a class with sensitive data, but the class does not explicitly deny serialization. The data can be accessed by serializing the class through another ...
The product uses a signal handler that introduces a race condition.
The number of possible random values is smaller than needed by the product, making it more susceptible to brute force attacks.
The code contains comments that suggest the presence of bugs, incomplete functionality, or weaknesses.
The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the ...
The product truncates the display, recording, or processing of security-relevant information in a way that can obscure the source or nature of an attack.
An exception is thrown from a function, but it is not caught.
The product does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, ev...
The product allows the attacker to upload or transfer files of dangerous types that can be automatically processed within the product's environment.
The product does not properly synchronize shared data, such as static variables across threads, which can lead to undefined behavior and unpredictable data changes.
The product obtains a value from an untrusted source, converts this value to a pointer, and dereferences the resulting pointer.
The product does not properly verify that a critical resource is owned by the proper entity.
A web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a Redirect. This simplifies phishing attacks.
The product uses a broken or risky cryptographic algorithm or protocol.
The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong.
The product uses a function that accepts a format string as an argument, but the format string originates from an external source.
The product uses external input with reflection to select which classes or code to use, but it does not sufficiently prevent the input from selecting improper classes ...
The product contains hard-coded credentials, such as a password or cryptographic key, which it uses for its own inbound authentication, outbound communication to exter...
The product uses hard-coded constants instead of symbolic names for security-critical values, which increases the likelihood of mistakes during code maintenance or sec...
The product accidentally uses the wrong operator, which changes the logic in security-relevant ways.
The product has two different sources of the same data or information, but it uses the source that has less support for verification, is less trusted, or is less resis...
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 invokes a potentially dangerous function that could introduce a vulnerability if it is used incorrectly, but the function can also be used safely.
The use of single-factor authentication can lead to unnecessary risk of compromise when compared with the benefits of a dual-factor authentication scheme.
The code calls sizeof() on a malloced pointer type, which always returns the wordsize/8. This can produce an unexpected result if the programmer intended to determine ...
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 oft...
The product uses external input to determine the names of variables into which information is extracted, without verifying that the names of the specified variables ar...
The product does not require that users should have strong passwords, which makes it easier for attackers to compromise user accounts.
Common Weakness Enumeration content on this website is copyright of The MITRE Corporation unless otherwise specified. Use of the Common Weakness Enumeration and the associated references on this website are subject to the Terms of Use as specified by The MITRE Corporation.