CWE-197
AllowedNumeric Truncation Error
Abstraction: Base · Status: Incomplete
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion.
185 vulnerabilities reference this CWE, most recent first.
GHSA-JR95-X3FR-RCG4
Vulnerability from github – Published: 2026-08-27 18:32 – Updated: 2026-08-27 18:32An issue was discovered in the resolv gem before 0.7.2 for Ruby. Resolv::DNS::MessageEncoder wrote a DNS label's length into a single octet without checking its range. A label longer than 255 octets had its length stored modulo 256 but the label data was written unchanged, and thus the bytes on the wire described a different name than the one the application asked to encode. RFC 1035 section 2.3.4 limits a label to 63 octets, and the two high bits of the length octet are reserved for compression pointers. put_string packed the length with put_pack("C", d.length) and put_label used it for labels, and thus any value from 0 to 255 could end up as a label length octet, including the reserved 0x40-0xBF range and the 0xC0-0xFF pointer range. Resolv::DNS::Name.create did not check per-label or total name length either, and thus an attacker-controlled hostname reached the encoder unchanged. An application that resolves an attacker-controlled hostname sends a query whose wire bytes name a domain the attacker chose. A hostname suffix that the application validates against an allowlist becomes padding that never appears on the wire, and thus allowlist and egress checks can be bypassed. The recursive resolver caches the response under the attacker's name, and DNS logs record that name rather than the one the application asked for. A label length whose low octet lands in the 0xC0-0xFF range produces a length octet that conforming parsers read as the start of a compression pointer, with the following attacker-controlled byte as the offset.
{
"affected": [],
"aliases": [
"CVE-2026-80213"
],
"database_specific": {
"cwe_ids": [
"CWE-197"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-08-27T17:20:51Z",
"severity": "MODERATE"
},
"details": "An issue was discovered in the resolv gem before 0.7.2 for Ruby. Resolv::DNS::MessageEncoder wrote a DNS label\u0027s length into a single octet without checking its range. A label longer than 255 octets had its length stored modulo 256 but the label data was written unchanged, and thus the bytes on the wire described a different name than the one the application asked to encode. RFC 1035 section 2.3.4 limits a label to 63 octets, and the two high bits of the length octet are reserved for compression pointers. put_string packed the length with put_pack(\"C\", d.length) and put_label used it for labels, and thus any value from 0 to 255 could end up as a label length octet, including the reserved 0x40-0xBF range and the 0xC0-0xFF pointer range. Resolv::DNS::Name.create did not check per-label or total name length either, and thus an attacker-controlled hostname reached the encoder unchanged. An application that resolves an attacker-controlled hostname sends a query whose wire bytes name a domain the attacker chose. A hostname suffix that the application validates against an allowlist becomes padding that never appears on the wire, and thus allowlist and egress checks can be bypassed. The recursive resolver caches the response under the attacker\u0027s name, and DNS logs record that name rather than the one the application asked for. A label length whose low octet lands in the 0xC0-0xFF range produces a length octet that conforming parsers read as the start of a compression pointer, with the following attacker-controlled byte as the offset.",
"id": "GHSA-jr95-x3fr-rcg4",
"modified": "2026-08-27T18:32:25Z",
"published": "2026-08-27T18:32:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-80213"
},
{
"type": "WEB",
"url": "https://github.com/ruby/resolv"
},
{
"type": "WEB",
"url": "https://www.ruby-lang.org/en/news/2026/08/27/multiple-vulnerabilities-in-resolv"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-M65G-RCVQ-QJJ5
Vulnerability from github – Published: 2024-09-10 18:30 – Updated: 2024-09-10 18:30Microsoft SQL Server Native Scoring Information Disclosure Vulnerability
{
"affected": [],
"aliases": [
"CVE-2024-37337"
],
"database_specific": {
"cwe_ids": [
"CWE-197"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-09-10T17:15:17Z",
"severity": "HIGH"
},
"details": "Microsoft SQL Server Native Scoring Information Disclosure Vulnerability",
"id": "GHSA-m65g-rcvq-qjj5",
"modified": "2024-09-10T18:30:44Z",
"published": "2024-09-10T18:30:44Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-37337"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-37337"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-M9XV-GF7Q-4VJG
Vulnerability from github – Published: 2026-09-16 15:31 – Updated: 2026-09-16 15:31If an attacker-controlled authoritative server can produce a negative answer that is exactly 65536 bytes, then a flaw in named results in a negative cache entry of 0 bytes. When this entry is subsequently read, named aborts.
This issue affects BIND 9 versions 9.11.0 through 9.18.50, 9.20.0 through 9.20.27, 9.21.0 through 9.21.25, 9.11.3-S1 through 9.18.50-S1, and 9.20.9-S1 through 9.20.27-S1.
{
"affected": [],
"aliases": [
"CVE-2026-19667"
],
"database_specific": {
"cwe_ids": [
"CWE-197"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-16T14:17:05Z",
"severity": "HIGH"
},
"details": "If an attacker-controlled authoritative server can produce a negative answer that is exactly 65536 bytes, then a flaw in `named` results in a negative cache entry of 0 bytes. When this entry is subsequently read, `named` aborts.\nThis issue affects BIND 9 versions 9.11.0 through 9.18.50, 9.20.0 through 9.20.27, 9.21.0 through 9.21.25, 9.11.3-S1 through 9.18.50-S1, and 9.20.9-S1 through 9.20.27-S1.",
"id": "GHSA-m9xv-gf7q-4vjg",
"modified": "2026-09-16T15:31:10Z",
"published": "2026-09-16T15:31:10Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-19667"
},
{
"type": "WEB",
"url": "https://downloads.isc.org/isc/bind9/9.20.29"
},
{
"type": "WEB",
"url": "https://downloads.isc.org/isc/bind9/9.21.26"
},
{
"type": "WEB",
"url": "https://kb.isc.org/docs/cve-2026-19667"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-MQMG-RCJR-35HF
Vulnerability from github – Published: 2024-05-14 18:31 – Updated: 2024-05-14 18:31Windows Routing and Remote Access Service (RRAS) Remote Code Execution Vulnerability
{
"affected": [],
"aliases": [
"CVE-2024-30024"
],
"database_specific": {
"cwe_ids": [
"CWE-197"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-05-14T17:16:57Z",
"severity": "HIGH"
},
"details": "Windows Routing and Remote Access Service (RRAS) Remote Code Execution Vulnerability",
"id": "GHSA-mqmg-rcjr-35hf",
"modified": "2024-05-14T18:31:04Z",
"published": "2024-05-14T18:31:04Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-30024"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-30024"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-P392-RQWR-573J
Vulnerability from github – Published: 2026-08-11 18:31 – Updated: 2026-08-11 18:31Numeric truncation error in Microsoft Office Word allows an unauthorized attacker to execute code locally.
{
"affected": [],
"aliases": [
"CVE-2026-63525"
],
"database_specific": {
"cwe_ids": [
"CWE-197"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-08-11T17:18:49Z",
"severity": "HIGH"
},
"details": "Numeric truncation error in Microsoft Office Word allows an unauthorized attacker to execute code locally.",
"id": "GHSA-p392-rqwr-573j",
"modified": "2026-08-11T18:31:32Z",
"published": "2026-08-11T18:31:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-63525"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-63525"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-P3VQ-4CXH-GFP9
Vulnerability from github – Published: 2023-01-02 09:31 – Updated: 2025-10-22 00:32A heap-based buffer overflow vulnerability [CWE-122] in FortiOS SSL-VPN 7.2.0 through 7.2.2, 7.0.0 through 7.0.8, 6.4.0 through 6.4.10, 6.2.0 through 6.2.11, 6.0.15 and earlier and FortiProxy SSL-VPN 7.2.0 through 7.2.1, 7.0.7 and earlier may allow a remote unauthenticated attacker to execute arbitrary code or commands via specifically crafted requests.
{
"affected": [],
"aliases": [
"CVE-2022-42475"
],
"database_specific": {
"cwe_ids": [
"CWE-197",
"CWE-787"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-01-02T09:15:00Z",
"severity": "CRITICAL"
},
"details": "A heap-based buffer overflow vulnerability [CWE-122] in FortiOS SSL-VPN 7.2.0 through 7.2.2, 7.0.0 through 7.0.8, 6.4.0 through 6.4.10, 6.2.0 through 6.2.11, 6.0.15 and earlier and FortiProxy SSL-VPN 7.2.0 through 7.2.1, 7.0.7 and earlier may allow a remote unauthenticated attacker to execute arbitrary code or commands via specifically crafted requests.",
"id": "GHSA-p3vq-4cxh-gfp9",
"modified": "2025-10-22T00:32:37Z",
"published": "2023-01-02T09:31:57Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-42475"
},
{
"type": "WEB",
"url": "https://fortiguard.com/psirt/FG-IR-22-398"
},
{
"type": "WEB",
"url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-42475"
}
],
"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:H",
"type": "CVSS_V3"
}
]
}
GHSA-PX55-QVVR-J3R4
Vulnerability from github – Published: 2026-11-09 21:31 – Updated: 2026-11-09 21:31FFmpeg through 9.0.2 contains a heap buffer overflow vulnerability in the PSD decoder in libavcodec/psd.c that allows attackers to corrupt heap memory on 32-bit builds by supplying a crafted PSD image. Attackers can choose dimensions and channel counts whose product exceeds 4 GB, truncating the av_malloc allocation size so decode_rle() writes attacker-controlled data past the buffer, causing crashes or possible code execution.
{
"affected": [],
"aliases": [
"CVE-2026-125213"
],
"database_specific": {
"cwe_ids": [
"CWE-197"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-09T19:16:58Z",
"severity": "HIGH"
},
"details": "FFmpeg through 9.0.2 contains a heap buffer overflow vulnerability in the PSD decoder in libavcodec/psd.c that allows attackers to corrupt heap memory on 32-bit builds by supplying a crafted PSD image. Attackers can choose dimensions and channel counts whose product exceeds 4 GB, truncating the av_malloc allocation size so decode_rle() writes attacker-controlled data past the buffer, causing crashes or possible code execution.",
"id": "GHSA-px55-qvvr-j3r4",
"modified": "2026-11-09T21:31:58Z",
"published": "2026-11-09T21:31:57Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125213"
},
{
"type": "WEB",
"url": "https://github.com/FFmpeg/FFmpeg/commit/aa4b80b54ee8645b5a77fe835ab2bbae1c9c465c"
},
{
"type": "WEB",
"url": "https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25702"
},
{
"type": "WEB",
"url": "https://github.com/FFmpeg/FFmpeg"
},
{
"type": "WEB",
"url": "https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/psd.c#L450"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-heap-buffer-overflow-via-psd-decoder-rle-path"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-PXX2-JXR9-C92G
Vulnerability from github – Published: 2024-11-12 18:30 – Updated: 2024-11-12 18:30SQL Server Native Client Remote Code Execution Vulnerability
{
"affected": [],
"aliases": [
"CVE-2024-49018"
],
"database_specific": {
"cwe_ids": [
"CWE-197"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-11-12T18:15:41Z",
"severity": "HIGH"
},
"details": "SQL Server Native Client Remote Code Execution Vulnerability",
"id": "GHSA-pxx2-jxr9-c92g",
"modified": "2024-11-12T18:30:59Z",
"published": "2024-11-12T18:30:59Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-49018"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-49018"
}
],
"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-Q929-XHMP-HF8W
Vulnerability from github – Published: 2026-11-04 15:32 – Updated: 2026-11-04 15:32An integer truncation vulnerability in the QTextCodec conversion functions of the Qt 5 Core Compatibility APIs module impacts the Qt Framework. An application using the affected functionality could crash.
{
"affected": [],
"aliases": [
"CVE-2026-107479"
],
"database_specific": {
"cwe_ids": [
"CWE-197"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-04T13:17:21Z",
"severity": "LOW"
},
"details": "An integer truncation vulnerability in the QTextCodec conversion functions of the Qt 5 Core Compatibility APIs module impacts the Qt Framework. An application using the affected functionality could crash.",
"id": "GHSA-q929-xhmp-hf8w",
"modified": "2026-11-04T15:32:29Z",
"published": "2026-11-04T15:32:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-107479"
},
{
"type": "WEB",
"url": "https://codereview.qt-project.org/c/qt/qt5compat/+/763226"
},
{
"type": "WEB",
"url": "https://wiki.qt.io/List_of_known_vulnerabilities_in_Qt_products#CVE-2026-107479:"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:L/U:Green",
"type": "CVSS_V4"
}
]
}
GHSA-QC29-C5FH-CMCF
Vulnerability from github – Published: 2024-05-14 18:31 – Updated: 2024-05-14 18:31Windows Routing and Remote Access Service (RRAS) Remote Code Execution Vulnerability
{
"affected": [],
"aliases": [
"CVE-2024-30029"
],
"database_specific": {
"cwe_ids": [
"CWE-197"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-05-14T17:17:01Z",
"severity": "HIGH"
},
"details": "Windows Routing and Remote Access Service (RRAS) Remote Code Execution Vulnerability",
"id": "GHSA-qc29-c5fh-cmcf",
"modified": "2024-05-14T18:31:04Z",
"published": "2024-05-14T18:31:04Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-30029"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-30029"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation
Ensure that no casts, implicit or explicit, take place that move from a larger size primitive or a smaller size primitive.
No CAPEC attack patterns related to this CWE.