Skip to main content

CWE-191: Integer Underflow (Wrap or Wraparound)

BaseDraft

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.

View on MITRE
Back to CWE Lookup

Extended Description

This can happen in signed and unsigned cases.

Technical Details

Structure
Simple

Applicable To

Languages
CC++JavaC#
Platforms

Frequently Asked Questions

What is CWE-191: Integer Underflow (Wrap or Wraparound)?+

CWE-191: Integer Underflow (Wrap or Wraparound) is a Common Weakness Enumeration (CWE) entry maintained by MITRE. 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. This can happen in signed and unsigned cases.

What are the security consequences of Integer Underflow (Wrap or Wraparound)?+

If exploited, CWE-191 (Integer Underflow (Wrap or Wraparound)) it can compromise Availability, Integrity, Confidentiality and Access Control, leading to outcomes such as DoS: Crash, Exit, or Restart, DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory), DoS: Instability, Modify Memory and Execute Unauthorized Code or Commands.

Which programming languages are affected by Integer Underflow (Wrap or Wraparound)?+

CWE-191 commonly affects C, C++, Java and C#. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.

What are real-world examples of Integer Underflow (Wrap or Wraparound)?+

MITRE documents real CVEs mapped to CWE-191, including CVE-2004-0816, CVE-2004-1002, CVE-2005-0199 and CVE-2005-1891. You can look up the full details of each CVE, including CVSS scores and remediation guidance, on our CVE Lookup tool.

What is the difference between a CWE and a CVE?+

A CWE (Common Weakness Enumeration) like CWE-191 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.

Learn More