CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')
low-riskThe product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type.
Abstraction: Base
Common Consequences
Availability
→
Read Memory
Detection Methods
Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Real-World Examples (10)
| CVE | CVSS | EPSS | KEV |
|---|---|---|---|
| CVE-2011-0611 | 8.8 | 93.7% | Y |
| CVE-2011-0611 | 8.8 | 93.7% | Y |
| CVE-2012-0507 | 9.8 | 93.6% | Y |
| CVE-2017-8291 | 7.8 | 92.9% | Y |
| CVE-2017-8291 | 7.8 | 92.9% | Y |
| CVE-2019-0752 | 7.5 | 92.0% | Y |
| CVE-2019-0752 | 7.5 | 92.0% | Y |
| CVE-2017-0037 | 8.1 | 90.5% | Y |
| CVE-2017-0037 | 8.1 | 90.5% | Y |
| CVE-2016-7201 | 8.8 | 90.1% | Y |
23
/ 100
low-risk
Active Threat
14/50 · Low
Exploit Availability
9/50 · Minimal