Cyber Resilience

CWE · MITRE source

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

Abstraction: Base · CVEs in our corpus: 873

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: 21 August 2026 20:21 UTC

Control responseHuman-reviewed

Answering this weakness across the control lifecycle, from our framework cross-walks.

Prevent
Stop it (NIST 800-53 / CSF Protect)
  • PR.PS-06
  • SA-11 Developer Testing and Evaluation
  • SI-16 Memory Protection
  • SA-8 Security and Privacy Engineering Principles
Detect
Catch it (CSF Detect / Respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.5.2
  • V3.2.3
  • V15.3.5

NIST 800-53 r5 controls that address this weakness (0)AI-assisted

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.99.80.98112012-06-07
CVE-2025-10585 KEV 9.99.80.05432025-09-24
CVE-2024-4947 KEV 9.49.60.15242024-05-15
CVE-2024-5274 KEV 9.49.60.07472024-05-28
CVE-2024-7971 KEV 9.49.60.20712024-08-21
CVE-2011-0611 KEV 9.28.80.94202011-04-13
CVE-2016-7201 KEV 9.28.80.79692016-11-10
CVE-2017-11292 KEV 9.28.80.11882017-10-22
CVE-2017-5070 KEV 9.28.80.31212017-10-27
CVE-2019-11707 KEV 9.28.80.37702019-07-23
CVE-2019-8506 KEV 9.28.80.18112019-12-18
CVE-2020-6418 KEV 9.28.80.78812020-02-27
CVE-2019-17026 KEV 9.28.80.46852020-03-02
CVE-2020-16009 KEV 9.28.80.48572020-11-03
CVE-2021-1789 KEV 9.28.80.13222021-04-02
CVE-2021-21224 KEV 9.28.80.56242021-04-26
CVE-2021-30551 KEV 9.28.80.64702021-06-15
CVE-2021-30563 KEV 9.28.80.08932021-08-03
CVE-2022-1096 KEV 9.28.80.23632022-07-23
CVE-2022-1364 KEV 9.28.80.13722022-07-26
CVE-2022-3723 KEV 9.28.80.07862022-11-01
CVE-2022-4262 KEV 9.28.80.15472022-12-02
CVE-2022-42856 KEV 9.28.80.08522022-12-15
CVE-2023-23529 KEV 9.28.80.09502023-02-27
CVE-2023-2033 KEV 9.28.80.40802023-04-14