CWEweakness
CWE-191 Integer Underflow (Wrap or Wraparound)
- Alternate terms
- Integer underflow
- Abstraction
- Base
- Structure
- Simple
- Status
- Draft
- Languages
- C, C#, C++, Java, Python
- CWE version
- 5.0
Description
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.
Extended description
This can happen in signed and unsigned cases.
Common consequences
• Availability: DoS: Crash, Exit, or Restart, DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory), DoS: Instability — This weakness will generally lead to undefined behavior and therefore crashes. In the case of overflows involving loop index variables, the likelihood of infinite loops is also high.
• Integrity: Modify Memory — If the value in question is important to data (as opposed to flow), simple data corruption has occurred. Also, if the wrap around results in other conditions such as buffer overflows, further memory corruption may occur.
• Confidentiality, Availability, Access Control: Execute Unauthorized Code or Commands, Bypass Protection Mechanism — This weakness can sometimes trigger buffer overflows which can be used to execute arbitrary code. This is usually outside the scope of a program's implicit security policy.
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.)
Observed examples
• CVE-2004-0816: Integer underflow in firewall via malformed packet.
• CVE-2004-1002: Integer underflow by packet with invalid length.
• CVE-2005-0199: Long input causes incorrect length calculation.
• CVE-2005-1891: Malformed icon causes integer underflow in loop counter variable.
Related
Observed example · CVE (4)
- CVE-2005-1891 The GIF parser in ateimg32.dll in AOL Instant Messenger (AIM) 5.9.3797 and earlier allows remote attackers to cause a denial of service… vulnerability
- CVE-2005-0199 Integer underflow in the Lists_MakeMask() function in lists.c in ngIRCd before 0.8.2 allows remote attackers to cause a denial of service… vulnerability
- CVE-2004-1002 Integer underflow in pppd in cbcp.c for ppp 2.4.1 allows remote attackers to cause a denial of service (daemon crash) via a CBCP packet… vulnerability
- CVE-2004-0816 Integer underflow in the firewall logging rules for iptables in Linux before 2.6.8 allows remote attackers to cause a denial of service… vulnerability
Child of · CWE (1)
- CWE-682 Incorrect Calculation weakness
Referenced by CVE · weakness (661)
- CVE-2026-111735 P-Net before 1.0.3 contains an integer underflow in pf_cpm_c_data_ind(). vulnerability
- CVE-2026-103411 An Integer Underflow vulnerability in DhcpMessageDecoder in Juniper Networks Session Smart Router allows an attacker with local network… vulnerability
- CVE-2026-70388 SOEM version 2.0.0 and earlier contains vulnerabilities where a malicious device on the network can send specially crafted messages that… vulnerability
- CVE-2026-82947 SOEM version 2.0.0 and earlier contains multiple vulnerabilities in frame processing where a malicious device can cause the master to read… vulnerability
- CVE-2026-111075 In Eclipse OpenJ9 versions prior to 0.63.0, the JITServer component fails to perform cross-field validation on attacker-controlled `_size`,… vulnerability
- CVE-2026-111808 Apache Traffic Server can be used to exhaust an HTTP/1.1 origin's worker pool via a malformed padded HTTP/2 DATA frame. vulnerability
- CVE-2026-56386 Integer underflow and out-of-bounds read in the HTTP/2 server DATA frame parser in Apache bRPC allows an unauthenticated remote attacker to… vulnerability
- CVE-2026-74755 An integer underflow in the mcpack2pb component of Apache bRPC (version < 1.18.0) on all platforms allows remote attackers to crash a bRPC… vulnerability
- CVE-2026-92853 The TLS 1.3 Certificate-message parser in NetX Secure decrements the message length to skip a context byte without first establishing that… vulnerability
- CVE-2026-112010 smpeg through 2.0.0 contains an integer underflow vulnerability in stream_header() in MPEGsystem.cpp that allows attackers to wrap… vulnerability
- CVE-2026-111881 FreeRDP from 3.14.1 before 3.32.0 contains an integer underflow in the WinPR BMP writer, where a mismatched stride calculation passes… vulnerability
- CVE-2026-48503 libIEC61850 is an open-source implementation of IEC 61850 client and server protocols including MMS, GOOSE, Sampled Values, and R-Session. vulnerability
- CVE-2026-49868 RIOT is an open-source microcontroller operating system designed for Internet of Things devices and other embedded systems. vulnerability
- CVE-2026-101938 An Integer Underflow (Wrap or Wraparound) vulnerability in the srxpfe of Juniper Networks Junos OS and Junos OS Evolved on the SRX Series… vulnerability
- CVE-2026-101968 An Integer Underflow (Wrap or Wraparound) vulnerability in the rpd process of Juniper Networks Junos OS on EX Series and MX Series, and… vulnerability
- CVE-2026-101980 An Integer Underflow vulnerability in the kernel of Juniper Networks Junos OS with Extended Echo configured allows an unauthenticated,… vulnerability
- CVE-2026-106464 `_nx_secure_x509_parse_signature_data` computes the certificate signature's length as `tlv_length - 1` without first checking that… vulnerability
- CVE-2026-110714 libsmb2 through 6.2 contains an integer underflow vulnerability in decode_acl that allows malicious SMB servers to trigger heap… vulnerability
- CVE-2026-50216 An integer underflow exists in the DNS proxy component of the macOS NetworkExtension system extension shipped with Akamai Guardicore… vulnerability
- CVE-2026-73252 Mongoose is an embedded web server and network library. vulnerability
- CVE-2026-75083 The receive path of the NXP KW41Z IEEE 802.15.4 driver, kw41z_rx() in drivers/ieee802154/ieee802154_kw41z.c, computed the payload size as… vulnerability
- CVE-2026-86566 A flaw was found in DPDK lib/vhost. vulnerability
- CVE-2026-100222 Heap-based buffer overflow in Network Policy Server (NPS) allows an unauthorized attacker to execute code over a network. vulnerability
- CVE-2026-102073 A vulnerability has been identified in APOGEE MBC (PPC) (BACnet) (All versions), APOGEE MBC (PPC) (P2 Ethernet) (All versions), APOGEE MEC… vulnerability
- CVE-2026-102192 Integer underflow (wrap or wraparound) in Windows Failover Cluster allows an unauthorized attacker to deny service over a network. vulnerability
- CVE-2026-102699 [This CNA information record relates to multiple CVEs; the text explains which aspects/vulnerabilities correspond to which CVE.] 1) XSA-437… vulnerability
- CVE-2026-102702 [This CNA information record relates to multiple CVEs; the text explains which aspects/vulnerabilities correspond to which CVE.] 1) XSA-437… vulnerability
- CVE-2026-58242 SAP Cloud Connector contains an improper authorization check, which could be exploited by a low-privileged attacker through specially… vulnerability
- CVE-2026-58249 SAP NetWeaver and SAP Web Dispatcher do not properly validate certain fields in specially crafted requests handled by an internal protocol… vulnerability
- CVE-2026-65200 The openUBMC device-management process parses PLDM-over-MCTP and NCSI-over-MCTP responses from on-bus devices, and three response parsers… vulnerability
Referenced by CWE · has member (1)
- CWE-884 CWE Cross-section view