Cyber Posture

CWE · MITRE source

CWE-843Access of Resource Using Incompatible Type ('Type Confusion')

Abstraction: Base · CVEs in our corpus: 751

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 KEV9.69.80.93572012-06-07
CVE-2011-0611 KEV9.48.80.93532011-04-13
CVE-2016-7201 KEV9.18.80.89752016-11-10
CVE-2017-8291 KEV9.17.80.92872017-04-27
CVE-2017-0037 KEV9.08.10.89102017-02-26
CVE-2019-0752 KEV9.07.50.91762019-04-09
CVE-2018-8298 KEV8.97.50.89372018-07-11
CVE-2020-6418 KEV8.98.80.85672020-02-27
CVE-2019-11707 KEV8.88.80.84292019-07-23
CVE-2020-16009 KEV8.88.80.84382020-11-03
CVE-2021-30551 KEV8.58.80.78362021-06-15
CVE-2017-5070 KEV8.28.80.74382017-10-27
CVE-2019-17026 KEV7.38.80.59072020-03-02
CVE-2023-4762 KEV7.18.80.55802023-09-05
CVE-2023-02866.87.40.88452023-02-08
CVE-2021-21224 KEV6.68.80.46922021-04-26
CVE-2022-1096 KEV6.68.80.47942022-07-23
CVE-2018-83846.47.50.81272018-08-15
CVE-2018-82296.37.50.79922018-06-14
CVE-2018-82796.37.50.79922018-07-11
CVE-2018-82916.17.50.76282018-07-11
CVE-2010-02585.87.80.71442010-03-10
CVE-2017-11292 KEV5.88.80.33622017-10-22
CVE-2016-09855.38.80.58642016-02-10
CVE-2024-38178 KEV5.37.50.30232024-08-13