CWE-192
AllowedInteger Coercion Error
Abstraction: Variant · Status: Incomplete
Integer coercion refers to a set of flaws pertaining to the type casting, extension, or truncation of primitive data types.
12 vulnerabilities reference this CWE, most recent first.
GHSA-R2Q6-6V35-773J
Vulnerability from github – Published: 2026-09-05 06:32 – Updated: 2026-09-05 06:32In xmlIO in libxml2 before 2.15.4, an inconsistency in xmlOutputWriteCallback and xmlBufUse causes negative lengths to reach write callbacks, aka a lack of a check for integer overflow before calling writecallback. This has security relevance for many types of uses of that length value within a callback.
{
"affected": [],
"aliases": [
"CVE-2026-86143"
],
"database_specific": {
"cwe_ids": [
"CWE-192"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-05T05:17:13Z",
"severity": "MODERATE"
},
"details": "In xmlIO in libxml2 before 2.15.4, an inconsistency in xmlOutputWriteCallback and xmlBufUse causes negative lengths to reach write callbacks, aka a lack of a check for integer overflow before calling writecallback. This has security relevance for many types of uses of that length value within a callback.",
"id": "GHSA-r2q6-6v35-773j",
"modified": "2026-09-05T06:32:37Z",
"published": "2026-09-05T06:32:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-86143"
},
{
"type": "WEB",
"url": "https://github.com/GNOME/libxml2/commit/90f293ba74d28b1d570920382e707586f68ebf35"
},
{
"type": "WEB",
"url": "https://github.com/GNOME/libxml2/compare/v2.15.3...v2.15.4"
},
{
"type": "WEB",
"url": "https://gitlab.gnome.org/GNOME/libxml2/-/work_items/1111"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-W6WH-QR7X-H932
Vulnerability from github – Published: 2022-09-02 00:01 – Updated: 2022-09-08 00:00An integer coercion error was found in the openvswitch kernel module. Given a sufficiently large number of actions, while copying and reserving memory for a new action of a new flow, the reserve_sfa_size() function does not return -EMSGSIZE as expected, potentially leading to an out-of-bounds write access. This flaw allows a local user to crash or potentially escalate their privileges on the system.
{
"affected": [],
"aliases": [
"CVE-2022-2639"
],
"database_specific": {
"cwe_ids": [
"CWE-192",
"CWE-681",
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-09-01T21:15:00Z",
"severity": "HIGH"
},
"details": "An integer coercion error was found in the openvswitch kernel module. Given a sufficiently large number of actions, while copying and reserving memory for a new action of a new flow, the reserve_sfa_size() function does not return -EMSGSIZE as expected, potentially leading to an out-of-bounds write access. This flaw allows a local user to crash or potentially escalate their privileges on the system.",
"id": "GHSA-w6wh-qr7x-h932",
"modified": "2022-09-08T00:00:29Z",
"published": "2022-09-02T00:01:02Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-2639"
},
{
"type": "WEB",
"url": "https://github.com/torvalds/linux/commit/cefa91b2332d7009bc0be5d951d6cbbf349f90f8"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2084479"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation
A language which throws exceptions on ambiguous data casts might be chosen.
Mitigation
Design objects and program flow such that multiple or complex casts are unnecessary
Mitigation
Ensure that any data type casting that you must used is entirely understood in order to reduce the plausibility of error in use.
No CAPEC attack patterns related to this CWE.