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

86 results · Clear filters · Feed

  • Low 3.3

    FFmpeg through 9.0.2 Integer Overflow via dng_decode_tiles() in libavcodec/tiff.c

    FFmpeg through 9.0.2 contains an integer overflow vulnerability in dng_decode_tiles() that allows attackers to leak uninitialized memory via crafted DNG tile dimensions. Attackers can set TileWidth or TileLength near INT_MAX so the tile loop never runs, outpu…

  • Low 3.7

    Silent element-count truncation via 32-bit bit-length overflow in packed-bit vector views

    A weakness in the BSON library's handling of a specialized binary vector data type allows an arithmetic wraparound when computing the number of elements described by an oversized attacker-supplied value. On builds where the platform word size is 32 bits, an a…

  • Low 1.9

    Integer overflow vulnerability in XML parsing functionality of Qt5Compat impacts Qt

    An integer overflow vulnerability in the Qt XML parsing (Qt5Compat / QXmlSimpleReader) functionality of Qt.

  • Low 3.7

    go-xrpl: ParseMPTAmountBinary: positive MPT amount silently decoded as negative (int64 wrap)

    go-xrpl is a Go implementation of the XRP Ledger protocol. In versions through the June 18, 2026 revision identified by the advisory, `ParseMPTAmountBinary` in `internal/ledger/state/ripple_state.go` converts the eight-byte MPT magnitude using `num.Int64()` w…

  • Low 3.7

    Forge: ASN.1 OID first arc truncation in asn1.oidToDer

    Forge (also called node-forge) is a native implementation of Transport Layer Security in JavaScript. Prior to 1.4.1, asn1.oidToDer() in lib/asn1.js did not range-check the first two arcs of an OID. An application that accepted an untrusted OID string, checked…

  • 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…

  • 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…

  • Low 2.9

    rapidcsv: Integer overflow in iterator arithmetic causes out-of-bounds access

    rapidcsv is a C++ CSV parser library. Prior to 8.99, RemoveColumn, InsertColumn, RemoveRow, InsertRow, and GetColumnNames converted size_t indexes to int before adding them to std::vector iterators. On 64-bit systems, in a CSV matrix dimension containing more…

  • Low 3.3

    Device-mapper-persistent-data: device-mapper-persistent-data: denial of service via crafted block indices

    A flaw was found in device-mapper-persistent-data. A local attacker can cause a Denial of Service (DoS) by inducing a user or system tool to process crafted device metadata containing an excessively large block index. An arithmetic error in the synchronous bl…

  • Low 1.8

    Integer Truncation Leading to Heap Corruption in GNU Aspell

    GNU Aspell contains an integer truncation vulnerability in the WritableDict::add() function in modules/speller/default/writable.cpp. When loading a personal wordlist, the word length is stored as a single byte, causing truncation for words whose length is a m…

  • Low 3.3

    Freedesktop Poppler SplashClip.cc clipToPath integer overflow

    A vulnerability was identified in Freedesktop Poppler up to 26.08.0. Affected is the function SplashClip::clipToPath of the file splash/SplashClip.cc. Such manipulation leads to integer overflow. The attack can only be performed from a local environment. The …

  • Low 3.3

    Freedesktop Poppler FoFiTrueType.cc cvtSfnts integer overflow

    A vulnerability was determined in Freedesktop Poppler 26.06.0/26.07.0/26.08.0. This impacts the function FoFiTrueType::cvtSfnts of the file fofi/FoFiTrueType.cc. This manipulation causes integer overflow. The attack can only be executed locally. The exploit h…

  • Low 3.4

    Integer overflow in Metrics in Google Chrome prior to 154.0.8037.57 allowed a remote attacker who had compromised the r…

  • Low 3.1

    SerenityOS LibGfx BMPLoader.cpp decode_bmp_pixel_data integer overflow

    A security vulnerability has been detected in SerenityOS up to 3d83e4509fd20d7438e1ae8470ffe668c136229c. Affected by this vulnerability is the function decode_bmp_pixel_data of the file Userland/Libraries/LibGfx/ImageFormats/BMPLoader.cpp of the component Lib…

  • Low 3.7

    Suricata swf: heap buffer overflow in SWF decompression depth handling

    Suricata is a network Intrusion Detection System, Intrusion Prevention System and Network Security Monitoring engine. Prior to 7.0.17 and 8.0.6, HTTP SWF decompression with the non-default swf-decompression feature and an unsafe decompress-depth can use the c…

  • Low 3.6

    Cockpit: cockpit: unauthorized modification of login records via integer overflow

    A flaw was found in Cockpit. An authenticated local user with a large user identifier (UID) can cause unauthorized modification and disclosure of login records. On 32-bit systems, an integer overflow during session accounting allows the user's login process t…

  • Low 3.7

    libheif hOp_RGB24_32_to_YCbCr Memory Access Error / SEGV

    libheif is a HEIF and AVIF file format decoder and encoder. Prior to 1.19.6, Op_RGB24_32_to_YCbCr::convert_colorspace() stores image-plane strides in an integer width that can overflow for extremely large RGB images created through heif_image_create() and hei…

  • Low 2.9

    An issue in Portable Puzzle Collection before 20230116.5782e29 allows attackers to cause a Denial of Service (DoS) via …

  • Low 3.6

    Vulnerabilities in IBM AIX and PowerVM VIOS

    IBM AIX 7.2, and 7.3 and IBM PowerVM VIOS 4.1 could allow a local attacker to obtain sensitive information or cause a denial of service due to an integer overflow.

  • Low 2.4

    Integer overflow in the UEFI firmware for the Intel(R) Slim Bootloader may allow an information disclosure. System soft…

  • Low 3.1

    Integer overflow in GPU in Google Chrome prior to 151.0.7922.109 allowed a remote attacker who had compromised the rend…

  • Low 2.1

    Heap-based Buffer Overflow in GNU diffutils

    diff3 tool from GNU diffutils is vulnerable to a heap‑based buffer overflow due to multiple signed integer overflows in line‑mapping calculations. Incorrect arithmetic in mapping line ranges can result in corrupted values being used for memory allocation and …

  • Low 2.9

    Libarchive: libarchive: signed integer overflow in archive_write_zip_header

    A signed integer overflow vulnerability was found in libarchive's ZIP writer. In the archive_write_zip_header function in archive_write_set_format_zip.c, when ZIP encryption is enabled and the entry file size is close to INT64_MAX, the addition of the encrypt…

  • Low 2.1

    Heap buffer overflow in gawk

    Integer overflow vulnerability has been found in "builtin.c" program file of gawk. This issue may lead to memory exhaustion on the hosting operating system and could be used to overwrite gawk heap metadata and objects with attacker-controlled bytes. It affect…

  • Low 3.8

    OP-TEE has AES-GCM 32-bit integer overflow in length counters that breaks authentication guarantee

    OP-TEE is a Trusted Execution Environment (TEE) designed as companion to a non-secure Linux kernel running on Arm; Cortex-A cores using the TrustZone technology. Starting in version 3.0.0 and prior to version 4.11.0, 32-bit integer overflows in OP-TEE core's …

  • Low 3.3

    radareorg radare2 pb Print cmd_print.inc cmd_print integer overflow

    A weakness has been identified in radareorg radare2 up to 6.1.6. Affected is the function cmd_print in the library libr/core/cmd_print.inc of the component pb Print Command Handler. This manipulation causes integer overflow. The attack needs to be launched lo…

  • Low 3.3

    radareorg radare2 str.c r_str_word_get0set integer overflow

    A security flaw has been discovered in radareorg radare2 up to 6.1.6. This impacts the function r_str_word_get0set of the file libr/util/str.c. The manipulation results in integer overflow. The attack must be initiated from a local position. The exploit has b…

  • Low 3.3

    radareorg radare2 str.c r_str_append integer overflow

    A security vulnerability has been detected in radareorg radare2 up to 6.1.6. The affected element is the function r_str_ndup/r_str_append of the file libr/util/str.c. The manipulation leads to integer overflow. An attack has to be approached locally. The expl…

  • Low 3.3

    radareorg radare2 hexpairs cmd_anal.inc.c cmd_anal_opcode integer overflow

    A vulnerability was identified in radareorg radare2 up to 6.1.6. This vulnerability affects the function cmd_anal_opcode of the file libr/core/cmd_anal.inc.c of the component hexpairs Parser. Such manipulation leads to integer overflow. The attack needs to be…

  • Low 3.3

    ImageMagick - Division by Zero in Binomial Kernel Processing

    ImageMagick before 7.1.2-22 contains a division by zero vulnerability in binomial kernel processing that allows attackers to cause denial of service. An attacker can supply a large binomial kernel value causing integer overflow, resulting in division by zero …

  • Low 3.3

    cilium ebpf LoadCollectionSpec/LoadCollectionSpecFromReader btf.go loadRawSpec integer overflow

    A vulnerability has been found in cilium ebpf up to 0.21.0. This affects the function loadRawSpec of the file btf/btf.go of the component LoadCollectionSpec/LoadCollectionSpecFromReader. Such manipulation of the argument offset leads to integer overflow. The …

  • Low 3.3

    janet-lang janet marsh.c unmarshal_one_fiber integer overflow

    A weakness has been identified in janet-lang janet up to 1.41.0. This vulnerability affects the function unmarshal_one_fiber of the file src/core/marsh.c. Executing a manipulation can lead to integer overflow. It is possible to launch the attack on the local …

  • Low 3.3

    Invoking integer overflow in NewNTUnicodeString in golang.org/x/sys/windows

    NewNTUnicodeString does not check for string length overflow. When provided with a string that overflows the maximum size of a NTUnicodeString (a 16-bit number of bytes), it returns a truncated string rather than an error.

  • Low 3.3

    kernel_liteos_a has an integer overflow vulnerability

    in OpenHarmony v6.0 and prior versions allow a local attacker cause DOS.

  • Low 1.8

    A compromised Trusted OS (TOS) driver could issue a malformed call that could potentially allow memory access outside t…

  • Low 3.7

    bettercap zerogod IPP Service zerogod_ipp_primitives.go ippReadChunkedBody integer coercion

    A vulnerability was detected in bettercap up to 2.41.5. Affected by this vulnerability is the function ippReadChunkedBody of the file modules/zerogod/zerogod_ipp_primitives.go of the component zerogod IPP Service. Performing a manipulation results in integer …

  • Low —

    MediaMTX affected by CVE-2026-27143 due to vulnerable dependency

    ### Summary Release 1.17.1 seems affected by CVE-2026-27143. golang 1.25.9 Seems to solve the issue. Is there any new release planned? ### Details See https://nvd.nist.gov/vuln/detail/CVE-2026-27143.

  • Low 3.1

    TCP backend stream ID overflow

    A client might theoretically be able to cause a mismatch between queries sent to a backend and the received responses by sending a flood of perfectly timed queries that are routed to a TCP-only or DNS over TLS backend.

  • Low 3.3

    uclouvain openjpeg pi.c opj_pi_initialise_encode integer overflow

    A vulnerability was identified in uclouvain openjpeg up to 2.5.4. This impacts the function opj_pi_initialise_encode in the library src/lib/openjp2/pi.c. The manipulation leads to integer overflow. The attack must be carried out locally. The exploit is public…

  • Low 3.3

    Gimp: gimp: denial of service via crafted psp image file

    A flaw was found in GIMP's PSP (Paint Shop Pro) file parser. A remote attacker could exploit an integer overflow vulnerability in the read_creator_block() function by providing a specially crafted PSP image file. This vulnerability occurs when a 32-bit length…