CWE-191

Integer Underflow (Wrap or Wraparound)
AI Translation Available

The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result.

Status
draft
Abstraction
base
C C# C++ Java

This can happen in signed and unsigned cases.

Common Consequences

availability integrity confidentiality access control
Impacts
dos: crash, exit, or restart dos: resource consumption (cpu) dos: resource consumption (memory) dos: instability modify memory execute unauthorized code or commands bypass protection mechanism

Detection Methods

automated static analysis

Potential Mitigations