CWE · MITRE source
CWE-843Access of Resource Using Incompatible Type ('Type Confusion')
The 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.
When the product accesses the resource using an incompatible type, this could trigger logical errors because the resource does not have expected properties. In languages without memory safety, such as C and C++, type confusion can lead to out-of-bounds memory access. While this weakness is frequently associated with unions when parsing data with many different embedded object types in C, it can be present in any application that can interpret the same variable or memory location in multiple ways. This weakness is not unique to C and C++. For example, errors in PHP applications can be triggered by providing array parameters when scalars are expected, or vice versa. Languages such as Perl, which perform automatic conversion of a variable of one type when it is accessed as if it were another type, can also contain these issues.
Last updated: 09 May 2026 03:25 UTC
NIST 800-53 r5 controls that address this weakness (0)AI
| Control | Title | Family | Why it addresses this CWE |
|---|---|---|---|
| No NIST controls proposed yet. | |||
Top CVEs of this weakness type, ranked by Risk Priority
| CVE | Risk | CVSS | EPSS | Published |
|---|---|---|---|---|
CVE-2012-0507 KEV | 9.6 | 9.8 | 0.9357 | 2012-06-07 |
CVE-2011-0611 KEV | 9.4 | 8.8 | 0.9353 | 2011-04-13 |
CVE-2016-7201 KEV | 9.1 | 8.8 | 0.8975 | 2016-11-10 |
CVE-2017-8291 KEV | 9.1 | 7.8 | 0.9287 | 2017-04-27 |
CVE-2017-0037 KEV | 9.0 | 8.1 | 0.8910 | 2017-02-26 |
CVE-2019-0752 KEV | 9.0 | 7.5 | 0.9176 | 2019-04-09 |
CVE-2018-8298 KEV | 8.9 | 7.5 | 0.8937 | 2018-07-11 |
CVE-2020-6418 KEV | 8.9 | 8.8 | 0.8567 | 2020-02-27 |
CVE-2019-11707 KEV | 8.8 | 8.8 | 0.8429 | 2019-07-23 |
CVE-2020-16009 KEV | 8.8 | 8.8 | 0.8438 | 2020-11-03 |
CVE-2021-30551 KEV | 8.5 | 8.8 | 0.7836 | 2021-06-15 |
CVE-2017-5070 KEV | 8.2 | 8.8 | 0.7438 | 2017-10-27 |
CVE-2019-17026 KEV | 7.3 | 8.8 | 0.5907 | 2020-03-02 |
CVE-2023-4762 KEV | 7.1 | 8.8 | 0.5580 | 2023-09-05 |
CVE-2023-0286 | 6.8 | 7.4 | 0.8845 | 2023-02-08 |
CVE-2021-21224 KEV | 6.6 | 8.8 | 0.4692 | 2021-04-26 |
CVE-2022-1096 KEV | 6.6 | 8.8 | 0.4794 | 2022-07-23 |
CVE-2018-8384 | 6.4 | 7.5 | 0.8127 | 2018-08-15 |
CVE-2018-8229 | 6.3 | 7.5 | 0.7992 | 2018-06-14 |
CVE-2018-8279 | 6.3 | 7.5 | 0.7992 | 2018-07-11 |
CVE-2018-8291 | 6.1 | 7.5 | 0.7628 | 2018-07-11 |
CVE-2010-0258 | 5.8 | 7.8 | 0.7144 | 2010-03-10 |
CVE-2017-11292 KEV | 5.8 | 8.8 | 0.3362 | 2017-10-22 |
CVE-2016-0985 | 5.3 | 8.8 | 0.5864 | 2016-02-10 |
CVE-2024-38178 KEV | 5.3 | 7.5 | 0.3023 | 2024-08-13 |