CWE Top 25 Most Dangerous Software Weaknesses
The CWE Top 25 - the list many still call the SANS Top 25 or CWE/SANS Top 25 - ranks the 25 most dangerous software weaknesses by real-world prevalence and impact. MITRE compiles it each year from the CVE records and CISA Known Exploited Vulnerabilities catalog published over the prior two years, so it reflects the weaknesses attackers actually exploit, not a theoretical ranking. This is the 2024 edition. Every entry below links to our own explainer for that weakness and shows how TurboPentest tests for it.
Several of the highest-ranked weaknesses (out-of-bounds reads and writes, use-after-free, integer overflow) are memory-safety bugs specific to native C and C++ code. We show those honestly as best confirmed in a manual IntegSec engagement rather than claiming an automated detection our black-box and web-focused tooling does not perform.
The 2024 list, in rank order
- 1CWE-79AutomatedCross-site Scripting
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.
- 2CWE-787ManualOut-of-bounds Write
The product writes data past the end, or before the beginning, of the intended buffer.
- 3CWE-89AutomatedSQL Injection
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 neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.
- 4CWE-352AutomatedCross-Site Request Forgery (CSRF)
The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor.
- 5CWE-22AutomatedPath Traversal
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 does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
- 6CWE-125ManualOut-of-bounds Read
The product reads data past the end, or before the beginning, of the intended buffer.
- 7CWE-78AutomatedOS Command Injection
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 special elements that could modify the intended OS command when it is sent to a downstream component.
- 8CWE-416ManualUse After Free
The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.
- 9CWE-862AutomatedMissing Authorization
The product does not perform an authorization check when an actor attempts to access a resource or perform an action.
- 10CWE-434AutomatedUnrestricted Upload of File with Dangerous Type
The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.
- 11CWE-94White-boxCode Injection
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 neutralizes special elements that could modify the syntax or behavior of the intended code segment.
- 12CWE-20ManualImproper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
- 13CWE-77White-boxCommand Injection
The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
- 14CWE-287AutomatedImproper Authentication
When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.
- 15CWE-269AutomatedImproper Privilege Management
The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.
- 16CWE-502White-boxDeserialization of Untrusted Data
The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
- 17CWE-200AutomatedExposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
- 18CWE-863AutomatedIncorrect Authorization
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.
- 19CWE-918AutomatedServer-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
- 20CWE-119ManualImproper Restriction of Operations within the Bounds of a Memory Buffer
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
- 21CWE-476ManualNULL Pointer Dereference
The product dereferences a pointer that it expects to be valid but is NULL.
- 22CWE-798White-boxUse of Hard-coded Credentials
The product contains hard-coded credentials, such as a password or cryptographic key.
- 23CWE-190ManualInteger Overflow or Wraparound
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 original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.
- 24CWE-400White-boxUncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource.
- 25CWE-306AutomatedMissing Authentication for Critical Function
The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.
SANS / CWE Top 25 vs the OWASP Top 10
The two lists are complementary, not competing. The CWE Top 25 ranks specific weakness types (CWEs) across all software - web, native, embedded - by how often they turn into real, exploited vulnerabilities. The OWASP Top 10 groups broader risk categories specific to web applications. A single OWASP category usually maps to several CWEs; TurboPentest tags findings against both so you can read a result in whichever framework your team, auditor, or compliance program uses.
Source: MITRE 2024 CWE Top 25 Most Dangerous Software Weaknesses. Last reviewed 2026-08-13.
See which of these weaknesses your target has
TurboPentest runs an agentic AI pentest against your target, tests for these exact weakness classes, and reports findings with proof, from $99 per target.
Start a $99 pentest