1. CVE archive
  2. Vulnerability types
  3. CWE-839
CWE-839 · #503 most frequent type in the archive

Numeric Range Comparison Without Minimum Check

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.

Part of: CWE-1023 · Incomplete Comparison with Missing Factors

6CVEs of this type in the archive
0critical (CVSS ≥ 9)
3high severity (7–8.9)
Nov 25, 2026latest published

What it is

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.

Impact on systems

ScopeImpact
Confidentiality, Integrity Modify Memory, Read Memory
If a negative value is used to access memory, buffers, or other indexable structures, it could access memory outside the bounds of the buffer.
Availability DoS: Resource Consumption (Memory), DoS: Resource Consumption (Other)
In some contexts, a negative value could lead to resource consumption, e.g., if the negative value is used for memory allocation.
Integrity, Confidentiality, Availability Modify Application Data, Execute Unauthorized Code or Commands
An attacker could modify the structure of the message or data being sent to the downstream component, possibly injecting commands.
Integrity Varies by Context, Unexpected State
The use of a negative number in a positive-only context could have security implications for other types of resources. For example, a shopping cart might check that the user is not requesting more than 10 items, but a request for -3 items could cause the application to calculate a negative price and credit the attacker's account.

How to prevent it

Implementation · 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.
Implementation · 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.

Source: MITRE CWE catalog · Official entry on the MITRE website

CWE-839 CVEs published per year

2026: year in progress, updated every hour

Show the data as a table
YearCVE
20232
20264

All CWE-839 CVEs

6 results

Dottor Marc

Is this type of vulnerability in your systems?

An archive tells you what exists; a Vulnerability Assessment tells you what is exposed on your side. Dottor Marc tests your web applications and network with automated and manual checks.