Weakness · High
CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')
What it is
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.
- Severity (our rating)
- High
- Likelihood of exploit
- Not rated by MITRE
- Introduced during
- Implementation
- Exploited in the wild
- 38 known exploited CVEs
In more detail
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.
What an attacker can do
- Read Memory (Availability, Integrity, Confidentiality)
- Modify Memory (Availability, Integrity, Confidentiality)
- Execute Unauthorized Code or Commands (Availability, Integrity, Confidentiality)
- DoS: Crash, Exit, or Restart (Availability, Integrity, Confidentiality)
How to prevent it
MITRE lists no specific mitigation for this weakness. Treat it like its parent weaknesses below: validate input, keep the design simple and review the code where it could appear.
How to find it
- 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.)
Exploited in the wild: 38 CVEs
Vulnerabilities caused by CWE-843 that attackers have used, from CISA's Known Exploited Vulnerabilities catalog, newest first.
- CVE-2026-85046Google Chromium V8 Type Confusion Vulnerability · added September 4, 2026
- CVE-2026-21519Microsoft Windows Type Confusion Vulnerability · added February 10, 2026
- CVE-2025-13223Google Chromium V8 Type Confusion Vulnerability · added November 19, 2025
- CVE-2025-10585Google Chromium V8 Type Confusion Vulnerability · added September 23, 2025
- CVE-2025-6554Google Chromium V8 Type Confusion Vulnerability · added July 2, 2025
- CVE-2025-30397Microsoft Windows Scripting Engine Type Confusion Vulnerability · added May 13, 2025
- CVE-2024-7971Google Chromium V8 Type Confusion Vulnerability · added August 26, 2024
- CVE-2024-38178Microsoft Windows Scripting Engine Memory Corruption Vulnerability · added August 13, 2024
- CVE-2024-5274Google Chromium V8 Type Confusion Vulnerability · added May 28, 2024
- CVE-2024-4947Google Chromium V8 Type Confusion Vulnerability · added May 20, 2024
- CVE-2023-4762Google Chromium V8 Type Confusion Vulnerability · added February 6, 2024
- CVE-2024-23222Apple Multiple Products WebKit Type Confusion Vulnerability · added January 23, 2024
- CVE-2023-32439Apple Multiple Products WebKit Type Confusion Vulnerability · added June 23, 2023
- CVE-2023-3079Google Chromium V8 Type Confusion Vulnerability · added June 7, 2023
- CVE-2023-2033Google Chromium V8 Type Confusion Vulnerability · added April 17, 2023
- CVE-2023-23529Apple Multiple Products WebKit Type Confusion Vulnerability · added February 14, 2023
- CVE-2022-42856Apple iOS Type Confusion Vulnerability · added December 14, 2022
- CVE-2022-4262Google Chromium V8 Type Confusion Vulnerability · added December 5, 2022
- CVE-2022-3723Google Chromium V8 Type Confusion Vulnerability · added October 28, 2022
- CVE-2022-41033Microsoft Windows COM+ Event System Service Privilege Escalation Vulnerability · added October 11, 2022
- CVE-2017-5070Google Chromium V8 Type Confusion Vulnerability · added June 8, 2022
- CVE-2019-11707Mozilla Firefox and Thunderbird Type Confusion Vulnerability · added May 23, 2022
- CVE-2021-1789Apple Multiple Products Type Confusion Vulnerability · added May 4, 2022
- CVE-2019-8506Apple Multiple Products Type Confusion Vulnerability · added May 4, 2022
- CVE-2022-1364Google Chromium V8 Type Confusion Vulnerability · added April 15, 2022
- CVE-2022-1096Google Chromium V8 Type Confusion Vulnerability · added March 28, 2022
- CVE-2018-8298ChakraCore Scripting Engine Type Confusion Vulnerability · added March 3, 2022
- CVE-2017-11292Adobe Flash Player Type Confusion Vulnerability · added March 3, 2022
- CVE-2011-0611Adobe Flash Player Remote Code Execution Vulnerability · added March 3, 2022
- CVE-2019-0752 ransomwareMicrosoft Internet Explorer Type Confusion Vulnerability · added February 15, 2022
- CVE-2021-30869Apple iOS, iPadOS, and macOS Type Confusion Vulnerability · added November 3, 2021
- CVE-2021-30563Google Chromium V8 Type Confusion Vulnerability · added November 3, 2021
- CVE-2021-30551Google Chromium V8 Type Confusion Vulnerability · added November 3, 2021
- CVE-2021-21224Google Chromium V8 Type Confusion Vulnerability · added November 3, 2021
- CVE-2020-27932Apple Multiple Products Type Confusion Vulnerability · added November 3, 2021
- CVE-2020-16009Google Chromium V8 Type Confusion Vulnerability · added November 3, 2021
- CVE-2020-6418Google Chromium V8 Type Confusion Vulnerability · added November 3, 2021
- CVE-2019-17026Mozilla Firefox And Thunderbird Type Confusion Vulnerability · added November 3, 2021
H2 Security
Found it in your code?
We review where it appears, fix it with your team, and check it was not already used against you.
Talk to our teamT Academy
Stop writing it in the first place
Learn to build software and systems without weaknesses like this one, with practice on real hosts in your browser, every objective checked on the machine.
Start freeSource: MITRE Common Weakness Enumeration, CWE version 4.19.1. CWE is a trademark of The MITRE Corporation.