CWE-839
Weakness AllowedNumeric Range Comparison Without Minimum Check
Abstraction: Base · Status: Incomplete
The product checks a value to ensure that it is less than or equal to a maximum, but it does not also verify that the value is greater than or equal to the minimum.
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
Some products use signed integers or floats even when their values are only expected to be positive or 0. An input validation check might assume that the value is positive, and only check for the maximum value.
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.)
Content history
updated Common_Consequences
updated Demonstrative_Examples, References, Relationships
updated Relationships
updated Description
updated Relationships
updated Alternate_Terms, Description
updated Relationships
updated Mapping_Notes
updated Observed_Examples
updated Demonstrative_Examples
updated Detection_Factors, Time_of_Introduction, Weakness_Ordinalities
updated Common_Consequences, Description, Modes_of_Introduction, Relationships
17 vulnerabilities reference this CWE, most recent first.
GHSA-72CW-J4FW-C9XJ
Vulnerability from github – Published: 2026-11-25 21:30 – Updated: 2026-11-25 21:30libvorbis through 1.3.7 contains a stack buffer overflow vulnerability in _ov_getlap() in lib/vorbisfile.c that passes a negative sample count from vorbis_synthesis_lapout() to memcpy(). Attackers can supply a short, valid Ogg Vorbis file with suitable block sizes to overwrite stack frames and crash applications performing two consecutive lapped seeks.
{
"affected": [],
"aliases": [
"CVE-2026-137079"
],
"database_specific": {
"cwe_ids": [
"CWE-839"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-25T20:18:44Z",
"severity": "MODERATE"
},
"details": "libvorbis through 1.3.7 contains a stack buffer overflow vulnerability in _ov_getlap() in lib/vorbisfile.c that passes a negative sample count from vorbis_synthesis_lapout() to memcpy(). Attackers can supply a short, valid Ogg Vorbis file with suitable block sizes to overwrite stack frames and crash applications performing two consecutive lapped seeks.",
"id": "GHSA-72cw-j4fw-c9xj",
"modified": "2026-11-25T21:30:39Z",
"published": "2026-11-25T21:30:39Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-137079"
},
{
"type": "WEB",
"url": "https://github.com/xiph/vorbis/pull/136"
},
{
"type": "WEB",
"url": "https://github.com/xiph/vorbis/pull/139"
},
{
"type": "WEB",
"url": "https://github.com/xiph/vorbis/blob/v1.3.7/lib/block.c#L1034"
},
{
"type": "WEB",
"url": "https://github.com/xiph/vorbis/blob/v1.3.7/lib/vorbisfile.c#L2242"
},
{
"type": "WEB",
"url": "https://gitlab.xiph.org/xiph/vorbis/-/merge_requests/52"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/libvorbis-through-1.3.7-stack-buffer-overflow-via-ov-getlap"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/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-9H57-5H59-G528
Vulnerability from github – Published: 2026-10-28 03:31 – Updated: 2026-10-31 18:30GNU mtools through 4.0.49 has an out-of-bounds write in parse_vses in vfat.c.
{
"affected": [],
"aliases": [
"CVE-2026-118384"
],
"database_specific": {
"cwe_ids": [
"CWE-839"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-10-28T03:17:14Z",
"severity": "MODERATE"
},
"details": "GNU mtools through 4.0.49 has an out-of-bounds write in parse_vses in vfat.c.",
"id": "GHSA-9h57-5h59-g528",
"modified": "2026-10-31T18:30:21Z",
"published": "2026-10-28T03:31:52Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-118384"
},
{
"type": "WEB",
"url": "https://ftp.gnu.org/gnu/mtools/mtools-4.0.49.tar.gz"
},
{
"type": "WEB",
"url": "https://github.com/deepin-community/mtools/blob/16d295331a1cfbcf02ad0b2f03c9b906197cf3ee/vfat.c#L399"
},
{
"type": "WEB",
"url": "https://github.com/deepin-community/mtools/blob/16d295331a1cfbcf02ad0b2f03c9b906197cf3ee/vfat.c#L444-L445"
},
{
"type": "WEB",
"url": "https://lists.gnu.org/archive/html/info-gnu/2025-06/msg00004.html"
},
{
"type": "WEB",
"url": "https://lists.gnu.org/archive/html/info-mtools/2026-10/msg00001.html"
},
{
"type": "WEB",
"url": "https://lists.gnu.org/archive/html/info-mtools/2026-10/msg00002.html"
},
{
"type": "WEB",
"url": "https://lists.gnu.org/archive/html/info-mtools/2026-10/msg00004.html"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2026/10/31/1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-CM56-MVX6-66QM
Vulnerability from github – Published: 2026-06-25 09:31 – Updated: 2026-09-18 15:31In the Linux kernel, the following vulnerability has been resolved:
IB/isert: Reject login PDUs shorter than ISER_HEADERS_LEN
In drivers/infiniband/ulp/isert/ib_isert.c, isert_login_recv_done() computes the login request payload length as wc->byte_len minus ISER_HEADERS_LEN with no lower bound, and login_req_len is a signed int. A remote iSER initiator can post a login Send work request carrying fewer than ISER_HEADERS_LEN (76) bytes, so the subtraction underflows and login_req_len becomes negative.
isert_rx_login_req() then reads that negative length back into a signed int, takes size = min(rx_buflen, MAX_KEY_VALUE_PAIRS), and because the min() is signed it keeps the negative value; the value is then passed as the memcpy() length and sign-extended to a multi-gigabyte size_t. The copy into the 8192-byte login->req_buf runs far out of bounds and faults, crashing the target node. The login phase precedes iSCSI authentication, so no credentials are required to reach this path.
Reject any login PDU shorter than ISER_HEADERS_LEN before the subtraction, mirroring the existing early return on a failed work completion, so login_req_len can never go negative. The upper bound was already safe: a posted login buffer cannot deliver more than ISER_RX_PAYLOAD_SIZE, so the difference stays at or below MAX_KEY_VALUE_PAIRS and the existing min() clamps it; only the missing lower bound needs to be added.
{
"affected": [],
"aliases": [
"CVE-2026-53176"
],
"database_specific": {
"cwe_ids": [
"CWE-191",
"CWE-839"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-06-25T09:16:34Z",
"severity": "CRITICAL"
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nIB/isert: Reject login PDUs shorter than ISER_HEADERS_LEN\n\nIn drivers/infiniband/ulp/isert/ib_isert.c, isert_login_recv_done()\ncomputes the login request payload length as wc-\u003ebyte_len minus\nISER_HEADERS_LEN with no lower bound, and login_req_len is a signed int.\nA remote iSER initiator can post a login Send work request carrying\nfewer than ISER_HEADERS_LEN (76) bytes, so the subtraction underflows\nand login_req_len becomes negative.\n\nisert_rx_login_req() then reads that negative length back into a signed\nint, takes size = min(rx_buflen, MAX_KEY_VALUE_PAIRS), and because the\nmin() is signed it keeps the negative value; the value is then passed as\nthe memcpy() length and sign-extended to a multi-gigabyte size_t. The\ncopy into the 8192-byte login-\u003ereq_buf runs far out of bounds and\nfaults, crashing the target node. The login phase precedes iSCSI\nauthentication, so no credentials are required to reach this path.\n\nReject any login PDU shorter than ISER_HEADERS_LEN before the\nsubtraction, mirroring the existing early return on a failed work\ncompletion, so login_req_len can never go negative. The upper bound was\nalready safe: a posted login buffer cannot deliver more than\nISER_RX_PAYLOAD_SIZE, so the difference stays at or below\nMAX_KEY_VALUE_PAIRS and the existing min() clamps it; only the missing\nlower bound needs to be added.",
"id": "GHSA-cm56-mvx6-66qm",
"modified": "2026-09-18T15:31:41Z",
"published": "2026-06-25T09:31:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-53176"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:68507"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:68531"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:68532"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2026:68570"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2026-53176"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2492741"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/1ca40b243277c9e88be5e00bd3e083f71aefb93e"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/29e7b925ae6df64894e82ab6419994dc25580a8a"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/75ee6e4aa096aa9e7b2dd5c8ff98356e30aceefb"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/bd22740d7f14cb1c0289444cfd2c8d2938667c1d"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/c1234229399f4af12c553b1b0ffd978eeba65548"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/c5584e089b5af7b3bf8bd5e8ca0560cbf32b0a47"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/df422fd273c96c2ee5beb80fc21adc8c70c29260"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/e8a013c0c3ca2f6708341a56612a3f6d6921620a"
},
{
"type": "WEB",
"url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-53176.json"
}
],
"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-Q4WJ-8854-JVXQ
Vulnerability from github – Published: 2022-05-24 17:34 – Updated: 2024-01-23 15:30An unauthenticated client can trigger denial of service by issuing specially crafted wire protocol messages, which cause the message decompressor to incorrectly allocate memory. This issue affects: MongoDB Inc. MongoDB Server v4.2 versions prior to 4.2.1; v4.0 versions prior to 4.0.13; v3.6 versions prior to 3.6.15; v3.4 versions prior to 3.4.24.
{
"affected": [],
"aliases": [
"CVE-2019-20925"
],
"database_specific": {
"cwe_ids": [
"CWE-697",
"CWE-839"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-11-24T11:15:00Z",
"severity": "HIGH"
},
"details": "An unauthenticated client can trigger denial of service by issuing specially crafted wire protocol messages, which cause the message decompressor to incorrectly allocate memory. This issue affects: MongoDB Inc. MongoDB Server v4.2 versions prior to 4.2.1; v4.0 versions prior to 4.0.13; v3.6 versions prior to 3.6.15; v3.4 versions prior to 3.4.24.",
"id": "GHSA-q4wj-8854-jvxq",
"modified": "2024-01-23T15:30:56Z",
"published": "2022-05-24T17:34:51Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-20925"
},
{
"type": "WEB",
"url": "https://jira.mongodb.org/browse/SERVER-43751"
}
],
"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-Q7Q7-XC84-HCQJ
Vulnerability from github – Published: 2023-02-13 18:30 – Updated: 2023-02-23 21:30The ccmweb component of Mitel MiContact Center Business server 9.2.2.0 through 9.4.1.0 could allow an unauthenticated attacker to download arbitrary files, due to insufficient restriction of URL parameters. A successful exploit could allow access to sensitive information.
{
"affected": [],
"aliases": [
"CVE-2023-22854"
],
"database_specific": {
"cwe_ids": [
"CWE-839"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-02-13T18:15:00Z",
"severity": "HIGH"
},
"details": "The ccmweb component of Mitel MiContact Center Business server 9.2.2.0 through 9.4.1.0 could allow an unauthenticated attacker to download arbitrary files, due to insufficient restriction of URL parameters. A successful exploit could allow access to sensitive information.",
"id": "GHSA-q7q7-xc84-hcqj",
"modified": "2023-02-23T21:30:17Z",
"published": "2023-02-13T18:30:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-22854"
},
{
"type": "WEB",
"url": "https://www.mitel.com/support/security-advisories"
},
{
"type": "WEB",
"url": "https://www.mitel.com/support/security-advisories/mitel-product-security-advisory-23-0001"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-WGRP-2W9F-FMVG
Vulnerability from github – Published: 2026-05-30 03:30 – Updated: 2026-06-05 12:31Exim 4.88 before 4.99.4, in some proxy configurations, mishandles certain short payloads, leading to disclosure of uninitialized stack memory values to a client.
{
"affected": [],
"aliases": [
"CVE-2026-48840"
],
"database_specific": {
"cwe_ids": [
"CWE-839"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-05-30T02:16:19Z",
"severity": "MODERATE"
},
"details": "Exim 4.88 before 4.99.4, in some proxy configurations, mishandles certain short payloads, leading to disclosure of uninitialized stack memory values to a client.",
"id": "GHSA-wgrp-2w9f-fmvg",
"modified": "2026-06-05T12:31:45Z",
"published": "2026-05-30T03:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-48840"
},
{
"type": "WEB",
"url": "https://exim.org/static/doc/security/EXIM-Security-2026-05-19.1"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2026/06/msg00004.html"
},
{
"type": "WEB",
"url": "https://www.openwall.com/lists/oss-security/2026/05/29/3"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2026/05/29/3"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-XJWQ-9JW5-JF7W
Vulnerability from github – Published: 2026-06-30 12:31 – Updated: 2026-11-05 17:33Improper Input Validation vulnerability in Apache ActiveMQ, Apache ActiveMQ All, Apache ActiveMQ Stomp.
A remote unauthenticated peer that can reach an exposed STOMP connector can trigger denial-of-service behavior by sending a negative content-length. For the NIO STOMP transport, an attacker can keep streaming body bytes and grow the per-connection command buffer beyond configured limits to cause OOM. For the blocking STOMP protocol, an error will instead force abnormal transport exception handling for the affected connection and closure. This issue affects Apache ActiveMQ: before 5.19.8, from 6.0.0 before 6.2.7; Apache ActiveMQ All: before 5.19.8, from 6.0.0 before 6.2.7; Apache ActiveMQ Stomp: before 5.19.8, from 6.0.0 before 6.2.7.
Users are recommended to upgrade to version 6.2.7 or 5.19.8, which fixes the issue.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.activemq:apache-activemq"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "5.19.8"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.activemq:apache-activemq"
},
"ranges": [
{
"events": [
{
"introduced": "6.0.0"
},
{
"fixed": "6.2.7"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.activemq:activemq-all"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "5.19.8"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.activemq:activemq-all"
},
"ranges": [
{
"events": [
{
"introduced": "6.0.0"
},
{
"fixed": "6.2.7"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.activemq:activemq-stomp"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "5.19.8"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.activemq:activemq-stomp"
},
"ranges": [
{
"events": [
{
"introduced": "6.0.0"
},
{
"fixed": "6.2.7"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-49432"
],
"database_specific": {
"cwe_ids": [
"CWE-20",
"CWE-839"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-05T17:33:52Z",
"nvd_published_at": "2026-06-30T11:16:29Z",
"severity": "HIGH"
},
"details": "Improper Input Validation vulnerability in Apache ActiveMQ, Apache ActiveMQ All, Apache ActiveMQ Stomp.\n\nA remote unauthenticated peer that can reach an exposed STOMP connector can trigger denial-of-service behavior by sending a negative content-length. For the NIO STOMP transport, an attacker can keep streaming body bytes and grow the per-connection command buffer beyond configured limits to cause OOM. For the blocking STOMP protocol, an error will instead force abnormal transport exception handling for the affected connection and closure.\nThis issue affects Apache ActiveMQ: before 5.19.8, from 6.0.0 before 6.2.7; Apache ActiveMQ All: before 5.19.8, from 6.0.0 before 6.2.7; Apache ActiveMQ Stomp: before 5.19.8, from 6.0.0 before 6.2.7.\n\n\n\n\nUsers are recommended to upgrade to version 6.2.7 or 5.19.8, which fixes the issue.",
"id": "GHSA-xjwq-9jw5-jf7w",
"modified": "2026-11-05T17:33:52Z",
"published": "2026-06-30T12:31:52Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-49432"
},
{
"type": "WEB",
"url": "https://github.com/apache/activemq/pull/2064"
},
{
"type": "WEB",
"url": "https://github.com/apache/activemq/commit/1493db95b5918d4f4a305fd1df8155f57c38850b"
},
{
"type": "WEB",
"url": "https://github.com/apache/activemq/commit/63ca7332a47239964cbf2e343603412254ebb358"
},
{
"type": "WEB",
"url": "https://github.com/apache/activemq/commit/713cae920329c4caea016b08300182ec5c6dc99b"
},
{
"type": "PACKAGE",
"url": "https://github.com/apache/activemq"
},
{
"type": "WEB",
"url": "https://github.com/apache/activemq/releases/tag/activemq-5.19.8"
},
{
"type": "WEB",
"url": "https://github.com/apache/activemq/releases/tag/activemq-6.2.7"
},
{
"type": "WEB",
"url": "https://lists.apache.org/thread/fsjb26605syqr8xks249h8gkp86t55d2"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2026/06/29/7"
}
],
"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"
}
],
"summary": "Apache ActiveMQ, Apache ActiveMQ All, Apache ActiveMQ Stomp has an Improper Input Validation vulnerability"
}
Mitigation
Strategy: Enforcement by Conversion
If the number to be used is always expected to be positive, change the variable type from signed to unsigned or size_t.
Mitigation
Strategy: Input Validation
If the number to be used could have a negative value based on the specification (thus requiring a signed value), but the number should only be positive to preserve code correctness, then include a check to ensure that the value is positive.
No CAPEC attack patterns related to this CWE.