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,068 results · Feed

  • Medium 6.1

    GreycLab CImg through 4.0.6 Heap Out-of-Bounds Read via Integer Overflow in _load_bmp()

    CImg through 4.0.6 contains a heap out-of-bounds read vulnerability in the _load_bmp() function of CImg.h caused by an integer overflow in the row byte count. Attackers can supply a crafted BMP file with a large header width that wraps dx_bytes, causing crash…

  • Medium 6.6

    llama.cpp b10398 before b11301 Integer Overflow in gguf_init_from_reader

    llama.cpp b10398 before b11301 contains an integer overflow vulnerability in gguf_init_from_reader that allows attackers to bypass tensor element-count validation by supplying shapes whose product wraps to zero. Attackers can craft GGUF files with enormous te…

  • Medium 6.1

    llama.cpp b5854 before b11275 Integer Overflow in gguf_init_from_reader

    llama.cpp b5854 before b11275 contains an integer overflow vulnerability in gguf_init_from_reader that bypasses the CVE-2025-53630 size check when padding near-SIZE_MAX tensor sizes. Attackers can supply a crafted GGUF file whose tensor size pads to zero, cau…

  • High 8.7

    compress zstd: Panic on two-block frames

    compress provides various compression algorithms. Prior to 1.20.2, the zstd DecodeAll and streaming decoder paths can panic when a crafted two-block frame reaches huff0.ReadTable with an FSE normalized count of 32768 that readNCount stores in int16 as -32768.…

  • Low 3.7

    flatcc through 0.6.4 Out-of-Bounds Read via verifier check_header

    flatcc through 0.6.4 contains an integer overflow vulnerability in the check_header function of the FlatBuffers verifier because its overflow guard is dead code. On 32-bit builds, attackers can supply a crafted buffer offset that wraps the bounds check, causi…

  • High 7.8

    FLTK through 1.4.5 Heap Buffer Overflow via Fl_BMP_Image Integer Overflow

    FLTK through 1.4.5 contains an integer overflow vulnerability in Fl_BMP_Image::load_bmp_() that causes undersized pixel buffer allocation from file-supplied width and height. Attackers can supply a crafted BMP or ICO file with large dimensions so row decoding…

  • High 7.8

    An integer overflow was addressed with improved input validation. This issue is fixed in visionOS 27.2. Processing a ma…

  • High 7.5

    An integer overflow was addressed with improved input validation. This issue is fixed in iOS 26.7 and iPadOS 26.7, iOS …

  • Medium 5.5

    An integer overflow was addressed with improved input validation. This issue is fixed in macOS Sequoia 15.8.2. An app m…

  • High 7.5

    An integer overflow was addressed with improved input validation. This issue is fixed in macOS Golden Gate 27.2, macOS …

  • Medium 5.5

    An integer overflow was addressed with improved bounds checking. This issue is fixed in iOS 27.2 and iPadOS 27.2, macOS…

  • Medium 5.5

    An integer overflow was addressed with improved input validation. This issue is fixed in macOS Golden Gate 27.2, macOS …

  • High 7.5

    An integer overflow was addressed with improved input validation. This issue is fixed in iOS 26.7.2 and iPadOS 26.7.2, …

  • High 8.8

    An integer overflow was addressed with improved input validation. This issue is fixed in iOS 26.7.2 and iPadOS 26.7.2, …

  • Medium 5.4

    qiujie mall-server 0.0.1-SNAPSHOT contains an integer overflow in CartServiceImpl that allows an authenticated user to …

  • Medium 5.3

    rclone serve s3 1.75.0 before 1.75.2 Memory Limit Bypass via Multipart Overflow

    rclone serve s3 versions 1.75.0 before 1.75.2 contain an integer overflow vulnerability in multipart reorder-memory accounting that bypasses the configured buffer limit. Attackers can open two concurrent current-part PUT requests declaring huge lengths to wra…

  • Low 2.5

    ImageMagick before 7.1.2-33 Heap Buffer Overflow via Convex-Hull on 32-bit

    ImageMagick before 7.1.2-33 contains a heap buffer overflow vulnerability on 32-bit systems that allows attackers to overwrite heap memory when convex-hull information is requested. Attackers can supply crafted images processed with convex-hull calculations t…

  • High 8.1

    open62541 1.5.0 before 1.5.7 Integer Overflow Heap Buffer Overflow via Custom DataType

    open62541 1.5.0 before 1.5.7 contains an integer overflow in UA_DataType_fromStructureDescription() that wraps the 16-bit memSize field for large custom structure definitions. A malicious OPC UA server can supply DataType definitions via UA_Client_getRemoteDa…

  • High 7.6

    libsmb2 before 6.3 Integer Overflow in DCE/RPC NDR Decoder via NetrShareEnum

    libsmb2 before 6.3 contains integer overflow vulnerabilities in the DCE/RPC NDR decoder in lib/dcerpc.c that allow heap out-of-bounds reads and writes. A malicious SMB server or machine-in-the-middle on unsigned connections can send crafted NetrShareEnum repl…

  • Medium 6.2

    Wasmtime before 36.0.16, 37.0.0 before 48.0.3, and 49.0.0 before 49.0.1 Host Panic via WASI Filesystem Timestamp Overflow

    Wasmtime before 36.0.16, 37.0.0 before 48.0.3, and 49.0.0 before 49.0.1 contains a denial of service vulnerability in wasmtime-wasi that allows guest WASI programs to panic the host via overflowing filesystem timestamps. Attackers can pass atim or mtim values…

  • Medium 5.2

    Heap overflow via 32-bit length wrap of the URI username in Windows Kerberos auth message wrapping

    A 32-bit integer wraparound in the MongoDB C Driver's Windows-only Kerberos/SSPI authentication code can cause an undersized heap buffer to be allocated when an excessively long credential value is supplied in the client's connection configuration. A party ab…

  • Medium 5.3

    Apache DataSketches: datasketches-cpp: Out-of-bounds read and write in Count-Min sketch deserialization allows memory corruption via a crafted sketch

    Out-of-bounds read and write in the Count-Min sketch deserialization of Apache DataSketches C++ (repo: datasketches-cpp). count_min_sketch::deserialize() did not include the preamble in its input size check, so a truncated sketch could cause a read of up to 1…

  • Critical 10.0
    CVE-2026-110264 Public exploit

    Integer Overflow or Wraparound in GitLab

    An issue has been discovered in GitLab CE/EE affecting all versions from 7.0 before 18.11.13, 19.0 before 19.0.10, 19.1 before 19.1.9, 19.2 before 19.2.9, 19.3 before 19.3.6, 19.4 before 19.4.3, and 19.5 before 19.5.1 that, under certain conditions, could hav…

  • Medium 6.5

    Pillow: Reachable undefined behavior in native integer operations, potentially leading to denial of service or logic integrity compromise

    Pillow is a Python imaging library. Prior to 13.0.0, PILfont text-width accumulation in src/_imaging.c checks positive glyph advances against INT_MAX but does not check negative advances against INT_MIN. Repeating a signed 16-bit advance of -32768 can therefo…

  • Medium 4.0

    Null-pointer dereference in QTriangulator reachable through VectorImage

    A malicious SVG can trigger an integer overflow which in turn triggers a null-pointer dereference in VectorImage QML Type.

  • High 8.7

    JITServer: Pre-authentication remote Denial of Service via integer overflow infinite loop in MessageBuffer::computeRequiredCapacity()

    In Eclipse OpenJ9 versions prior to 0.63.0, the JITServer component is vulnerable to a pre-authentication remote denial of service. When processing the initial 4-byte length field of an incoming TCP connection, an integer overflow in `MessageBuffer::computeRe…

  • High 8.8

    Integer overflow in ANGLE in Google Chrome prior to 156.0.8078.47 allowed a remote attacker to potentially execute arbi…

  • Medium 6.5

    Integer overflow in ANGLE in Google Chrome on on Windows prior to 156.0.8078.47 allowed a remote attacker to read memor…

  • Medium 5.5

    OpenImageIO before 3.0.20.0, 3.1.x before 3.1.15.0, and 3.2.x before 3.2.0.3-beta1 Cineon Reader Heap Out-of-Bounds Read

    OpenImageIO before 3.0.20.0, 3.1.x before 3.1.15.0, and 3.2.x before 3.2.0.3-beta1 contains an integer overflow in cineon::Codec::Read that undersizes the scanline buffer, causing a heap out-of-bounds read. Attackers can supply a crafted Cineon file with a hu…

  • High 7.0

    Module object allocation size overflow corrupts the manager object pool

    A ThreadX module chooses `object_size` when it calls `txm_module_object_allocate`. The Module Manager adds its own 16-byte private header to that size and asked the object pool for the result **without checking the addition**. A size near the top of a `ULONG`…

  • High 7.1

    GUIX binary resource loader: unvalidated glyph range causes an integer underflow and a heap out-of-bounds write when loading an untrusted font or theme

    The GUIX binary resource loader never checks that a font page's glyph range is well formed. `gx_page_header_first_glyph` and `gx_page_header_last_glyph` are read verbatim from the file and only the upper bound of `last_glyph` is validated, so a page declaring…

  • Critical 9.8

    Incorrect boundary conditions in the SVG component

    Incorrect boundary conditions in the SVG component. This vulnerability was fixed in Firefox 158.0.1 and Thunderbird 158.0.1.

  • Medium 6.9

    An integer overflow vulnerability in the license manager service could allow an unauthenticated attacker to crash the s…

  • Medium 4.3

    QBinaryJson::fromBinaryData() integer overflow leading to OOB read

    A malformed header in the binary file fed to QBinaryJson::fromBinaryData() can cause undefined behaviour because of out-of-bounds read.

  • Medium 5.9

    An integer underflow was addressed with improved input validation. This issue is fixed in macOS Golden Gate 27, macOS S…

  • Medium 6.5

    MikroTik RouterOS ipt_SAME.ko same_check integer overflow

    A weakness has been identified in MikroTik RouterOS up to 6.40.5/6.44/7.20.8. Impacted is the function same_check of the file ipt_SAME.ko. Executing a manipulation can lead to integer overflow. The attack may be launched remotely. Upgrading to version 7.21.5 …

  • Medium 6.3

    Tencent ncnn Conversion API mat_pixel.cpp yuv420sp2rgb integer overflow

    A security flaw has been discovered in Tencent ncnn up to 44b02dabdcf97499281a4692ebd65bad73dcf8b6. Affected by this issue is the function ncnn::yuv420sp2rgb of the file src/mat_pixel.cpp of the component Conversion API. The manipulation results in integer ov…

  • Medium 6.1

    libspatialite through 5.1.0 Integer Overflow in WKB Geometry Parsing

    libspatialite through 5.1.0 contains an integer overflow vulnerability in the WKB point and vertex count size guard of ParseWkbLine and related parsers in gg_wkb.c, allowing out-of-bounds reads. Attackers can supply a crafted geometry BLOB with a large point …

  • Medium 5.3

    libtta through 2.3 Integer Overflow via tta_decoder_init_get_info Seek Table

    libtta through 2.3 contains an integer overflow vulnerability in tta_decoder_init_get_info() that allows attackers to cause a heap buffer overflow on 32-bit builds via unvalidated header fields. Attackers can supply a crafted .tta file with a sample rate of 1…

  • Medium 6.1

    Gimp: gimp: paa integer overflow out-of-bounds read

    A flaw was found in GIMP. An attacker can cause a Denial of Service (DoS) or potentially disclose sensitive memory contents by convincing a user to open or preview a specially crafted Bohemia Interactive (PAA) texture file. Due to an integer overflow when cal…