Skip to content
OpenAdvisories

Weakness (CWE)

CWE-190: Integer Overflow or Wraparound

Base

The product performs a calculation that can
produce an integer overflow or wraparound when the logic
assumes that the resulting value will always be larger than
the original value. This occurs when an integer value is
incremented to a value that is too large to store in the
associated representation. When this occurs, the value may
become a very small or negative number.

How to prevent it (7 mitigations)
  1. Requirements

    Ensure that all protocols are strictly defined, such that all out-of-bounds behavior can be identified simply, and require strict conformance to the protocol.

  2. Requirements

    Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.

    If possible, choose a language or compiler that performs automatic bounds checking.

  3. Architecture and Design

    Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].

    Use libraries or frameworks that make it easier to handle numbers without unexpected consequences.

    Examples include safe integer handling packages such as SafeInt (C++) or IntegerLib (C or C++). [REF-106]

  4. Implementation

    Perform input validation on any numeric input by ensuring that it is within the expected range. Enforce that the input meets both the minimum and maximum requirements for the expected range.

    Use unsigned integers where possible. This makes it easier to perform validation for integer overflows. When signed integers are required, ensure that the range check includes minimum values as well as maximum values.

  5. Implementation

    Understand the programming language's underlying representation and how it interacts with numeric calculation (CWE-681). Pay close attention to byte size discrepancies, precision, signed/unsigned distinctions, truncation, conversion and casting between types, "not-a-number" calculations, and how the language handles numbers that are too large or too small for its underlying representation. [REF-7]

    Also be careful to account for 32-bit, 64-bit, and other potential differences that may affect the numeric representation.

  6. Architecture and Design

    For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.

  7. Implementation

    Examine compiler warnings closely and eliminate problems with potential security implications, such as signed / unsigned mismatch in memory operations, or use of uninitialized variables. Even if the weakness is rarely exploitable, a single failure may lead to the compromise of the entire system.

Source: MITRE CWE-190

2,079 results · Feed

  • High 8.8

    iccDEV has Type Confusion in SIccCalcOp::ArgsPushed() at IccProfLib/IccMpeCalc.cpp

    iccDEV provides a set of libraries and tools that allow for the interaction, manipulation, and application of International Color Consortium (ICC) color management profiles. Versions prior to 2.3.1.2 have a Type Confusion vulnerability in `SIccCalcOp::ArgsPus…

  • High 7.8

    Use After Free and Heap-based Buffer Overflow and Integer Overflow or Wraparound and Out-of-bounds Write in iccDEV

    iccDEV provides a set of libraries and tools for working with ICC color management profiles. Versions 2.3.1.1 and below contain Use After Free, Heap-based Buffer Overflow and Integer Overflow or Wraparound and Out-of-bounds Write vulnerabilities in its CIccSp…

  • High 8.8

    iccDEV Undefined Behavior (UB) and Out of Memory in CIccProfile::LoadTag()

    iccDEV provides a set of libraries and tools for working with ICC color management profiles. Versions 2.3.1.1 and below are prone to have Undefined Behavior (UB) and Out of Memory errors. This issue is fixed in version 2.3.1.2.

  • Medium 6.7

    In dpe, there is a possible out of bounds write due to an integer overflow. This could lead to local escalation of priv…

  • Medium 6.7

    In dpe, there is a possible memory corruption due to an integer overflow. This could lead to local escalation of privil…

  • High 7.8

    iccDEV has Integer Overflow/Underflow in CIccXmlArrayType::ParseTextCountNum()

    iccDEV provides a set of libraries and tools for working with ICC color management profiles. Versions 2.3.1 and below have overflows and underflows in CIccXmlArrayType::ParseTextCountNum(). This vulnerability affects users of the iccDEV library who process IC…

  • High 7.8

    FontForge GUtils XBM File Parsing Integer Overflow Remote Code Execution Vulnerability

    FontForge GUtils XBM File Parsing Integer Overflow Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of FontForge. User interaction is required to exploit this vulnerability in …

  • Medium 5.5

    WasmEdge integer wrap in MemoryInstance::getSpan()'s memory size check

    WasmEdge is a WebAssembly runtime. Prior to version 0.16.0-alpha.3, a multiplication in `WasmEdge/include/runtime/instance/memory.h` can wrap, causing `checkAccessBound()` to incorrectly allow the access. This leads to a segmentation fault. Version 0.16.0-alp…

  • Medium 5.3

    ImageMagick converting a malicious MVG file to SVG caused an integer overflow.

    ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to version 7.1.2-12, in the WriteSVGImage function, using an int variable to store number_attributes caused an integer overflow. This, in turn, triggered a bu…

  • Medium 6.5

    libheif has Potential Heap Buffer Over-Read

    libheif is an HEIF and AVIF file format decoder and encoder. Prior to version 1.21.0, a crafted HEIF that exercises the overlay image item path triggers a heap buffer over-read in `HeifPixelImage::overlay()`. The function computes a negative row length (likel…

  • Medium 6.5

    Heap buffer overflow in array_merge()

    In PHP versions:8.1.* before 8.1.34, 8.2.* before 8.2.30, 8.3.* before 8.3.29, 8.4.* before 8.4.16, 8.5.* before 8.5.1, a heap buffer overflow occurs in array_merge() when the total element count of packed arrays exceeds 32-bit limits or HT_MAX_SIZE, due to a…

  • High 7.8

    GIMP PNM File Parsing Integer Overflow Remote Code Execution Vulnerability

    GIMP PNM File Parsing Integer Overflow Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of GIMP. User interaction is required to exploit this vulnerability in that the target m…

  • High 7.8

    NSF Unidata NetCDF-C NC Variable Integer Overflow Remote Code Execution Vulnerability

    NSF Unidata NetCDF-C NC Variable Integer Overflow Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of NSF Unidata NetCDF-C. User interaction is required to exploit this vulnera…

  • High 7.5

    An integer overflow in the RTPS protocol implementation of OpenDDS DDS before v3.33.0 allows attackers to cause a Denia…

  • High 7.5

    An integer overflow in eProsima Fast-DDS v3.3 allows attackers to cause a Denial of Service (DoS) via a crafted input.

  • High 7.8

    Foxit PDF Reader PDF Parsing Heap-Based Buffer Overflow Remote Code Execution Vulnerability

    A heap-based buffer overflow vulnerability exists in the PDF parsing of Foxit PDF Reader when processing specially crafted JBIG2 data. An integer overflow in the calculation of the image buffer size may occur, potentially allowing a remote attacker to execute…

  • High 7.8

    Integer Overflow or Wraparound in Audio

    Memory corruption while routing GPR packets between user and root when handling large data packet.

  • High 7.5

    Integer overflow vulnerability in the yuv2ya16_X_c_template function in libswscale/output.c in FFmpeg 8.0.

  • Medium 6.5

    Bluetooth: Integer Overflow in Bluetooth Classic (BR/EDR) L2CAP

    An integer overflow condition exists in Bluetooth Host stack, within the bt_br_acl_recv routine a critical path for processing inbound BR/EDR L2CAP traffic.

  • High 7.8

    An integer overflow was addressed by adopting 64-bit timestamps. This issue is fixed in iOS 18.7.3 and iPadOS 18.7.3, i…

  • Low 3.3

    Malwarebytes 1.0.14 for Linux doesn't properly compute signatures in some scenarios. This allows a bypass of detection.

  • Critical 9.9

    Sandboxie's Integer Overflow in SbieIniServer::RC4Crypt allows sandbox escape and SYSTEM compromise

    Sandboxie is a sandbox-based isolation software for 32-bit and 64-bit Windows NT-based operating systems. In versions 1.16.6 and below, the SYSTEM-level service SbieSvc.exe exposes SbieIniServer::RC4Crypt to sandboxed processes. The handler adds a fixed heade…

  • High 7.8

    In GetTachyonCommand of tachyon_server_common.h, there is a possible out of bounds write due to an integer overflow. Th…

  • Medium 6.5

    Glib: integer overflow in glib gio attribute escaping causes heap buffer overflow

    A flaw was found in glib. This vulnerability allows a heap buffer overflow and denial-of-service (DoS) via an integer overflow in GLib's GIO (GLib Input/Output) escape_byte_string() function when processing malicious file or remote filesystem attribute values.

  • Medium 5.6

    Glib: glib: buffer underflow in gvariant parser leads to heap corruption

    A flaw was found in GLib (Gnome Lib). This vulnerability allows a remote attacker to cause heap corruption, leading to a denial of service or potential code execution via a buffer-underflow in the GVariant parser when processing maliciously crafted input stri…

  • Medium 6.5

    An integer overflow in the psdParser::ReadImageData function of FreeImage v3.18.0 and before allows attackers to cause …

  • High 7.8

    Windows Projected File System Elevation of Privilege Vulnerability

    Integer overflow or wraparound in Windows Projected File System allows an authorized attacker to elevate privileges locally.

  • Medium 5.5

    DNG SDK | Integer Overflow or Wraparound (CWE-190)

    DNG SDK versions 1.7.0 and earlier are affected by an Integer Overflow or Wraparound vulnerability that could lead to application denial-of-service. An attacker could exploit this issue to cause the application to crash or become unresponsive. Exploitation of…

  • High 7.8

    DNG SDK | Integer Overflow or Wraparound (CWE-190)

    DNG SDK versions 1.7.0 and earlier are affected by an Integer Overflow or Wraparound vulnerability that could result in arbitrary code execution in the context of the current user. Exploitation of this issue requires user interaction in that a victim must ope…

  • Critical 10.0

    Integer Overflow in Robocode's Buffer Write Method

    An integer overflow vulnerability exists in the write method of the Buffer class in Robocode version 1.9.3.6. The method fails to properly validate the length of data being written, allowing attackers to cause an overflow, potentially leading to buffer overfl…

  • High 7.8

    In multiple functions of mem_protect.c, there is a possible out of bounds write due to an integer overflow. This could …

  • High 7.5

    Apache HTTP Server: mod_md (ACME), unintended retry intervals

    An integer overflow in the case of failed ACME certificate renewal leads, after a number of failures (~30 days in default configurations), to the backoff timer becoming 0. Attempts to renew the certificate then are repeated without delays until it succeeds. T…

  • High 8.6

    KissFFT Integer Overflow Heap Buffer Overflow via kiss_fft_alloc

    KissFFT versions prior to the fix commit 1b083165 contain an integer overflow in kiss_fft_alloc() in kiss_fft.c on platforms where size_t is 32-bit. The nfft parameter is not validated before being used in a size calculation (sizeof(kiss_fft_cpx) * (nfft - 1)…

  • Critical 9.0
    CVE-2025-3500 Public exploit

    Integer Overflow in Avast Antiviurs 25.1.981.6 on Windows may result in privilege escalation

    Integer Overflow or Wraparound vulnerability in Avast Antivirus (25.1.981.6) on Windows allows Privilege Escalation.This issue affects Antivirus: from 25.1.981.6 before 25.3.

  • Medium 6.3

    node-forge ASN.1 OID Integer Truncation

    Forge (also called `node-forge`) is a native implementation of Transport Layer Security in JavaScript. An Integer Overflow vulnerability in node-forge versions 1.3.1 and below enables remote, unauthenticated attackers to craft ASN.1 structures containing OIDs…

  • High 7.7

    Glib: integer overflow in in g_escape_uri_string()

    A heap-based buffer overflow problem was found in glib through an incorrect calculation of buffer size in the g_escape_uri_string() function. If the string to escape contains a very large number of unacceptable characters (which would need escaping), the calc…

  • Medium 6.5

    Tinyproxy through 1.11.2 contains an integer overflow vulnerability in the strip_return_port() function within src/reqs…

  • High 8.0

    Improper input validation within the XOCL driver may allow a local attacker to generate an integer overflow condition, …

  • High 7.3

    Improper input validation within the XOCL driver may allow a local attacker to generate an integer overflow condition, …

  • Medium 5.9

    PostgreSQL libpq undersizes allocations, via integer wraparound

    Integer wraparound in multiple PostgreSQL libpq client library functions allows an application input provider or network peer to cause libpq to undersize an allocation and write out-of-bounds by hundreds of megabytes. This results in a segmentation fault for …