CWE-843
Weakness AllowedAccess of Resource Using Incompatible Type
Abstraction: Base · Status: Incomplete
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.
Mapping guidance
This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.
Relationships and members
Modes of introduction
This weakness is not unique to C and C++. While it 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. 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.
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.)
Effectiveness: High
Notes
Applicable Platform
This weakness is possible in any type-unsafe programming language.
Research Gap
Type confusion weaknesses have received some attention by applied researchers and major software vendors for C and C++ code. Some publicly-reported vulnerabilities probably have type confusion as a root-cause weakness, but these may be described as "memory corruption" instead.
For other languages, there are very few public reports of type confusion weaknesses. These are probably under-studied. Since many programs rely directly or indirectly on loose typing, a potential "type confusion" behavior might be intentional, possibly requiring more manual analysis.
Content history
updated References
updated Applicable_Platforms, Taxonomy_Mappings
updated Relationships
updated Relationships
updated Relationships
updated Common_Consequences, Relationships
updated Research_Gaps
updated Description
updated References, Relationships
updated Mapping_Notes
updated Demonstrative_Examples
updated Detection_Factors, Observed_Examples, Weakness_Ordinalities
updated Alternate_Terms, Applicable_Platforms, Common_Consequences, Demonstrative_Examples, Description, Modes_of_Introduction, Name, References, Relationships, Taxonomy_Mappings
1469 vulnerabilities reference this CWE, most recent first.
GHSA-W34M-J345-GR8W
Vulnerability from github – Published: 2026-11-16 03:31 – Updated: 2026-11-16 03:31Access of resource using incompatible type ('type confusion') vulnerability in Samsung Open Source Starfish allows Input Data Manipulation.
{
"affected": [],
"aliases": [
"CVE-2026-129543"
],
"database_specific": {
"cwe_ids": [
"CWE-843"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-16T02:17:12Z",
"severity": "MODERATE"
},
"details": "Access of resource using incompatible type (\u0027type confusion\u0027) vulnerability in Samsung Open Source Starfish allows Input Data Manipulation.",
"id": "GHSA-w34m-j345-gr8w",
"modified": "2026-11-16T03:31:10Z",
"published": "2026-11-16T03:31:10Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-129543"
},
{
"type": "WEB",
"url": "https://github.com/Samsung/starfish"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-W476-P2H3-79G9
Vulnerability from github – Published: 2025-10-21 18:53 – Updated: 2025-10-21 18:53Impact
In versions 0.9.4 and earlier of uv, tar archives containing PAX headers with file size overrides were not handled properly. As a result, an attacker could contrive a source distribution (as a tar archive) that would extract differently when installed via uv versus other Python package installers.
The underlying parsing differential here originates with astral-tokio-tar, which disclosed this vulnerability as CVE-2025-62518.
In practice, the impact of this vulnerability is low: only source distributions can be formatted as tar archives, and source distributions execute arbitrary code at build/installation time by definition. Consequently, a parser differential in tar extraction is strictly less powerful than the capabilities already exposed to an attacker who has the ability to control source distributions.
However, this particular source of malleability in source distributions is unintentional and not operating by design, and therefore we consider it a vulnerability despite its overlap in capabilities with intended behavior.
Patches
Versions 0.9.5 and newer of uv address the vulnerability above. Users should upgrade to 0.9.5 or newer.
Workarounds
Users are advised to upgrade to version 0.9.5 or newer to address this advisory.
Users should experience no breaking changes as a result of the patch above.
References
- See CVE-2025-62518 for the corresponding advisory against astral-tokio-tar
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 0.9.4"
},
"package": {
"ecosystem": "PyPI",
"name": "uv"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.9.5"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-843"
],
"github_reviewed": true,
"github_reviewed_at": "2025-10-21T18:53:27Z",
"nvd_published_at": null,
"severity": "LOW"
},
"details": "### Impact\n\nIn versions 0.9.4 and earlier of uv, tar archives containing PAX headers with file size overrides were not handled properly. As a result, an attacker could contrive a source distribution (as a tar archive) that would extract differently when installed via uv versus other Python package installers.\n\nThe underlying parsing differential here originates with astral-tokio-tar, which disclosed this vulnerability as CVE-2025-62518.\n\nIn practice, the impact of this vulnerability is **low**: only source distributions can be formatted as tar archives, and source distributions execute arbitrary code at build/installation time by definition. Consequently, a parser differential in tar extraction is strictly less powerful than the capabilities already exposed to an attacker who has the ability to control source distributions. \n\nHowever, this particular source of malleability in source distributions is unintentional and not operating by design, and therefore we consider it a vulnerability despite its overlap in capabilities with intended behavior.\n\n### Patches\n\nVersions 0.9.5 and newer of uv address the vulnerability above. Users should upgrade to 0.9.5 or newer.\n\n### Workarounds\n\nUsers are advised to upgrade to version 0.9.5 or newer to address this advisory.\n\nUsers should experience no breaking changes as a result of the patch above.\n\n### References\n\n* See CVE-2025-62518 for the corresponding advisory against astral-tokio-tar",
"id": "GHSA-w476-p2h3-79g9",
"modified": "2025-10-21T18:53:28Z",
"published": "2025-10-21T18:53:27Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/astral-sh/uv/security/advisories/GHSA-w476-p2h3-79g9"
},
{
"type": "WEB",
"url": "https://github.com/astral-sh/uv/pull/16387"
},
{
"type": "WEB",
"url": "https://github.com/astral-sh/uv/commit/ae450662d1546e9853f67a8c61a506d3a892d963"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-j5gw-2vrg-8fgx"
},
{
"type": "PACKAGE",
"url": "https://github.com/astral-sh/uv"
},
{
"type": "WEB",
"url": "https://github.com/astral-sh/uv/releases/tag/0.9.5"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "uv has differential in tar extraction with PAX headers"
}
GHSA-W4GX-392P-5M58
Vulnerability from github – Published: 2025-07-10 15:31 – Updated: 2026-04-27 21:30A flaw was found in the libxslt library. The same memory field, psvi, is used for both stylesheet and input data, which can lead to type confusion during XML transformations. This vulnerability allows an attacker to crash the application or corrupt memory. In some cases, it may lead to denial of service or unexpected behavior.
{
"affected": [],
"aliases": [
"CVE-2025-7424"
],
"database_specific": {
"cwe_ids": [
"CWE-843"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-07-10T14:15:27Z",
"severity": "HIGH"
},
"details": "A flaw was found in the libxslt library. The same memory field, psvi, is used for both stylesheet and input data, which can lead to type confusion during XML transformations. This vulnerability allows an attacker to crash the application or corrupt memory. In some cases, it may lead to denial of service or unexpected behavior.",
"id": "GHSA-w4gx-392p-5m58",
"modified": "2026-04-27T21:30:26Z",
"published": "2025-07-10T15:31:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-7424"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHBA-2025:12345"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:11015"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2025-7424"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2379228"
},
{
"type": "WEB",
"url": "https://gitlab.gnome.org/GNOME/libxslt/-/issues/139"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2025/09/msg00024.html"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2025/Aug/0"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2025/Jul/30"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2025/Jul/32"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2025/Jul/33"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2025/Jul/35"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2025/Jul/37"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2025/07/11/2"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-W4R6-2P3V-R8W8
Vulnerability from github – Published: 2024-02-05 06:30 – Updated: 2024-02-09 03:33In keyInstall, there is a possible escalation of privilege due to type confusion. This could lead to local escalation of privilege with System execution privileges needed. User interaction is not needed for exploitation. Patch ID: ALPS08358566; Issue ID: ALPS08358566.
{
"affected": [],
"aliases": [
"CVE-2024-20012"
],
"database_specific": {
"cwe_ids": [
"CWE-843"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-02-05T06:15:47Z",
"severity": "MODERATE"
},
"details": "In keyInstall, there is a possible escalation of privilege due to type confusion. This could lead to local escalation of privilege with System execution privileges needed. User interaction is not needed for exploitation. Patch ID: ALPS08358566; Issue ID: ALPS08358566.",
"id": "GHSA-w4r6-2p3v-r8w8",
"modified": "2024-02-09T03:33:00Z",
"published": "2024-02-05T06:30:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-20012"
},
{
"type": "WEB",
"url": "https://corp.mediatek.com/product-security-bulletin/February-2024"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-W4W8-866M-JM68
Vulnerability from github – Published: 2022-05-24 17:23 – Updated: 2022-05-24 17:23In FastKeyAccumulator::GetKeysSlow of keys.cc, there is a possible out of bounds write due to type confusion. This could lead to remote code execution when processing a proxy configuration with no additional execution privileges needed. User interaction is not needed for exploitation.Product: AndroidVersions: Android-8.0 Android-8.1 Android-9 Android-10Android ID: A-147664838
{
"affected": [],
"aliases": [
"CVE-2020-0224"
],
"database_specific": {
"cwe_ids": [
"CWE-843"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-07-17T21:15:00Z",
"severity": "HIGH"
},
"details": "In FastKeyAccumulator::GetKeysSlow of keys.cc, there is a possible out of bounds write due to type confusion. This could lead to remote code execution when processing a proxy configuration with no additional execution privileges needed. User interaction is not needed for exploitation.Product: AndroidVersions: Android-8.0 Android-8.1 Android-9 Android-10Android ID: A-147664838",
"id": "GHSA-w4w8-866m-jm68",
"modified": "2022-05-24T17:23:49Z",
"published": "2022-05-24T17:23:49Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-0224"
},
{
"type": "WEB",
"url": "https://source.android.com/security/bulletin/2020-07-01"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-W579-WXJ6-V6HQ
Vulnerability from github – Published: 2022-05-24 17:09 – Updated: 2022-05-24 17:09Type confusion in V8 in Google Chrome prior to 80.0.3987.116 allowed a remote attacker to potentially exploit heap corruption via a crafted HTML page.
{
"affected": [],
"aliases": [
"CVE-2020-6383"
],
"database_specific": {
"cwe_ids": [
"CWE-843"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-02-27T23:15:00Z",
"severity": "MODERATE"
},
"details": "Type confusion in V8 in Google Chrome prior to 80.0.3987.116 allowed a remote attacker to potentially exploit heap corruption via a crafted HTML page.",
"id": "GHSA-w579-wxj6-v6hq",
"modified": "2022-05-24T17:09:54Z",
"published": "2022-05-24T17:09:54Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-6383"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2020:0738"
},
{
"type": "WEB",
"url": "https://chromereleases.googleblog.com/2020/02/stable-channel-update-for-desktop_18.html"
},
{
"type": "WEB",
"url": "https://crbug.com/1051017"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6IOHSO6BUKC6I66J5PZOMAGFVJ66ZS57"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/X3B5RWJQD5LA45MYLLR55KZJOJ5NVZGP"
},
{
"type": "WEB",
"url": "https://www.debian.org/security/2020/dsa-4638"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-W58Q-63HQ-XFF3
Vulnerability from github – Published: 2026-01-27 18:32 – Updated: 2026-01-27 18:32Access of Resource Using Incompatible Type ('Type Confusion') vulnerability in themrdemonized xray-monolith.This issue affects xray-monolith: before 2025.12.30.
{
"affected": [],
"aliases": [
"CVE-2026-24874"
],
"database_specific": {
"cwe_ids": [
"CWE-843"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-01-27T16:16:36Z",
"severity": "CRITICAL"
},
"details": "Access of Resource Using Incompatible Type (\u0027Type Confusion\u0027) vulnerability in themrdemonized xray-monolith.This issue affects xray-monolith: before 2025.12.30.",
"id": "GHSA-w58q-63hq-xff3",
"modified": "2026-01-27T18:32:17Z",
"published": "2026-01-27T18:32:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-24874"
},
{
"type": "WEB",
"url": "https://github.com/themrdemonized/xray-monolith/pull/399"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-W5FC-G575-V9QJ
Vulnerability from github – Published: 2025-11-18 00:30 – Updated: 2025-11-18 03:31Type Confusion in V8 in Google Chrome prior to 142.0.7444.175 allowed a remote attacker to potentially exploit heap corruption via a crafted HTML page. (Chromium security severity: High)
{
"affected": [],
"aliases": [
"CVE-2025-13224"
],
"database_specific": {
"cwe_ids": [
"CWE-843"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-11-17T23:15:47Z",
"severity": "HIGH"
},
"details": "Type Confusion in V8 in Google Chrome prior to 142.0.7444.175 allowed a remote attacker to potentially exploit heap corruption via a crafted HTML page. (Chromium security severity: High)",
"id": "GHSA-w5fc-g575-v9qj",
"modified": "2025-11-18T03:31:14Z",
"published": "2025-11-18T00:30:18Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-13224"
},
{
"type": "WEB",
"url": "https://chromereleases.googleblog.com/2025/11/stable-channel-update-for-desktop_17.html"
},
{
"type": "WEB",
"url": "https://issues.chromium.org/issues/450328966"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-W5JP-2R7J-QRP2
Vulnerability from github – Published: 2026-11-12 00:33 – Updated: 2026-11-12 18:31Type confusion in V8 in Google Chrome prior to 157.0.8103.78 allowed a remote attacker to execute arbitrary code inside the sandbox via a crafted HTML page. (Chromium security severity: High)
{
"affected": [],
"aliases": [
"CVE-2026-126847"
],
"database_specific": {
"cwe_ids": [
"CWE-843"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-11T23:17:12Z",
"severity": "HIGH"
},
"details": "Type confusion in V8 in Google Chrome prior to 157.0.8103.78 allowed a remote attacker to execute arbitrary code inside the sandbox via a crafted HTML page. (Chromium security severity: High)",
"id": "GHSA-w5jp-2r7j-qrp2",
"modified": "2026-11-12T18:31:39Z",
"published": "2026-11-12T00:33:03Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126847"
},
{
"type": "WEB",
"url": "https://chromereleases.googleblog.com/2026/11/stable-channel-update-for-desktop_01744469280.html"
},
{
"type": "WEB",
"url": "https://issues.chromium.org/issues/572988453"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-W5R2-92M6-CG9M
Vulnerability from github – Published: 2022-05-13 01:04 – Updated: 2022-05-13 01:04Unspecified vulnerability in Adobe Flash Player 21.0.0.242 and earlier, as used in the Adobe Flash libraries in Microsoft Internet Explorer 10 and 11 and Microsoft Edge, has unknown impact and attack vectors, a different vulnerability than other CVEs listed in MS16-083.
{
"affected": [],
"aliases": [
"CVE-2016-4149"
],
"database_specific": {
"cwe_ids": [
"CWE-843"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2016-06-16T14:59:00Z",
"severity": "HIGH"
},
"details": "Unspecified vulnerability in Adobe Flash Player 21.0.0.242 and earlier, as used in the Adobe Flash libraries in Microsoft Internet Explorer 10 and 11 and Microsoft Edge, has unknown impact and attack vectors, a different vulnerability than other CVEs listed in MS16-083.",
"id": "GHSA-w5r2-92m6-cg9m",
"modified": "2022-05-13T01:04:51Z",
"published": "2022-05-13T01:04:51Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2016-4149"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2016:1238"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2016/ms16-083"
},
{
"type": "WEB",
"url": "https://helpx.adobe.com/security/products/flash-player/apsb16-18.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00031.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00035.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2016-06/msg00038.html"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1036117"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
No mitigation information available for this CWE.
No CAPEC attack patterns related to this CWE.