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

  • Medium 4.3

    An integer overflow or wraparound vulnerability in File Operation in Synology DiskStation Manager (DSM) before 7.2.1-69…

  • Medium 6.3

    Freedesktop Poppler FoFiTrueType.cc mapCodeToGID integer overflow

    A vulnerability was determined in Freedesktop Poppler 26.07.0. This affects the function FoFiTrueType::mapCodeToGID of the file fofi/FoFiTrueType.cc. Executing a manipulation of the argument segCnt can lead to integer overflow. The attack can be launched remo…

  • Medium 6.3

    Freedesktop Poppler JBIG2Stream.cc readCodeTableSeg integer overflow

    A vulnerability was found in Freedesktop Poppler 26.07.0. The impacted element is the function JBIG2Stream::readCodeTableSeg of the file poppler/JBIG2Stream.cc. Performing a manipulation results in integer overflow. The attack can be initiated remotely. The e…

  • Medium 4.3

    Freedesktop Poppler SampledFunction Function.cc integer overflow

    A vulnerability was detected in Freedesktop Poppler 26.07.0. This issue affects the function SampledFunction::SampledFunction of the file poppler/Function.cc of the component SampledFunction. The manipulation of the argument BitsPerSample results in integer o…

  • High 8.7

    ESPAsyncWebServer: Integer overflow in multipart boundary parser causes denial of service

    ESPAsyncWebServer is an asynchronous HTTP and WebSocket server library for ESP32, ESP8266, RP2040 and RP2350. Prior to 3.11.1, the multipart/form-data parser in src/WebRequest.cpp stores _boundaryPosition as an 8-bit value while _parseMultipartPostByte proces…

  • High 7.8

    Integer Overflow or Wraparound in OOBM

    Memory Corruption when validating large data buffers from external sources using addition to check buffer length.

  • High 7.5

    Wire: Unauthenticated decoder crash via 32-bit length integer overflow in ByteArrayProtoReader32 (incomplete fix of CVE-2026-45799)

    Wire provides gRPC and protocol buffers for Android, Kotlin, Swift, and Java. Prior to 6.4.5 and 7.0.0-alpha04, Wire protobuf readers do not consistently validate attacker-controlled lengths against the current logical message boundary before advancing cursor…

  • Critical 9.1

    RabbitMQ amqp091-go: Silent Data Truncation and State Corruption via Shortstr Integer Overflow

    RabbitMQ amqp091-go is a Go AMQP 0.9.1 client. Prior to 1.13.0, the writeShortstr function in write.go casts the byte length of AMQP shortstr property values to uint8 without first rejecting values longer than 255 bytes. An application that accepts an oversiz…

  • High 7.8

    Gimp: integer overflow when generating a thumbnail preview for a psd file

    A flaw was found in the file-psd plugin in GIMP. When generating a thumbnail preview for a specially crafted PSD (Photoshop Document) image file, an integer overflow occurs during the multiplication of values from an embedded JPEG header. This leads to an und…

  • Medium 5.5

    Integer overflow or wraparound vulnerability in Samsung Opensource Escargot allows attackers with write access to the b…

  • Medium 4.3

    Integer overflow in Compositing in Google Chrome prior to 153.0.8010.47 allowed a remote attacker to obtain cross-origi…

  • Critical 9.6

    Integer overflow in V8 in Google Chrome prior to 153.0.8010.47 allowed a remote attacker to execute arbitrary code insi…

  • High 8.1

    Unauthenticated Buffer Overflow Vulnerability leads to Remote Code Execution or Denial-of-Service in HPE Networking EdgeConnect SD-WAN Gateways

    A vulnerability exists in the proxy packet processing logic of the affected component where it improperly processes malformed or truncated input. An unauthenticated remote attacker could exploit this vulnerability by providing specially crafted input that tri…

  • Medium 6.7

    In multiple locations, there is a possible permission bypass due to an integer overflow. This could lead to local escal…

  • High 7.8

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

  • High 8.4

    In multiple locations, there is a possible permission bypass due to an integer overflow. This could lead to local escal…

  • Medium 6.5

    FreeRDP before 3.31.0 Integer Overflow Double Free

    FreeRDP versions before 3.31.0 contain an integer overflow in WinPR's Stream_EnsureRemainingCapacity function that allows remote attackers to cause denial of service. A malicious RD Gateway peer can send a WebSocket Ping frame with a crafted 64-bit extended p…

  • Medium 5.5

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

  • Medium 5.9

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

  • Medium 5.5

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

  • Medium 6.6

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

  • Medium 5.5

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

  • High 7.3

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

  • High 7.5

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

  • Medium 6.5

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

  • High 8.8

    An out-of-bounds write issue was addressed with improved bounds checking. This issue is fixed in Safari 26.6.1, iOS 26.…

  • High 8.8

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

  • Medium 5.5

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

  • Medium 6.5

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

  • Medium 6.1

    tract-nnef: integer overflow in NNEF `.dat` tensor parser yields an out-of-bounds read on model load

    Tract is a tiny, no-nonsense, self-contained TensorFlow and ONNX inference toolkit. Prior to 0.21.16, 0.22.2, and 0.23.1, tract-nnef uses unchecked usize multiplication in nnef/src/tensors.rs read_tensor for attacker-controlled tensor dimensions, the allocati…

  • High 7.3

    marcobambini Gravity udp json-parser gravity_json.c integer overflow

    A security vulnerability has been detected in marcobambini Gravity up to 0.9.7. This affects an unknown function of the file src/utils/gravity_json.c of the component udp json-parser. Such manipulation leads to integer overflow. The attack may be performed fr…

  • Low 2.9

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

  • Medium 6.5

    embedded-graphics image_raw.rs new/bytes_per_row integer overflow

    A weakness has been identified in embedded-graphics up to 0.8.2 on 32-bit. Impacted is the function ImageRaw::new/bytes_per_row of the file src/image/image_raw.rs. This manipulation causes integer overflow. The attack is possible to be carried out remotely. U…

  • High 7.3

    embedded-graphics image_raw.rs draw_sub_image integer overflow

    A vulnerability was determined in embedded-graphics up to 0.8.2. This affects the function ImageRaw::draw_sub_image of the file src/image/image_raw.rs. Executing a manipulation of the argument width can lead to integer overflow. The attack may be launched rem…

  • Medium 5.3

    msgpack-java through 0.9.12 Integer Overflow via MAP32

    msgpack-java through 0.9.12 contains an integer overflow vulnerability in MessageUnpacker.skipValue() when processing MAP32 containers with large element counts. Attackers can supply a MAP32 element count at or above 0x40000000 that wraps when doubled, causin…

  • High 7.4

    libde265: SAO sequential filter heap buffer overflow via signed integer overflow

    libde265 is an open source implementation of the h.265 video codec. Versions prior to 1.1.1 use signed 32-bit arithmetic to calculate the sample adaptive offset input-buffer size, allowing a crafted HEVC stream with large dimensions and 16-bit luma samples to…

  • High 7.4

    libde265: Pixel accessor signed integer overflow causes heap OOB read/write

    libde265 is an open source implementation of the h.265 video codec. Versions prior to 1.1.1 use signed 32-bit arithmetic to calculate pixel offsets, allowing a crafted HEVC stream with large image dimensions to trigger an integer overflow and cause out-of-bou…

  • High 8.1

    Orthanc DICOM Server Integer Overflow or Wraparound

    An integer overflow in a specified pitch and buffer-size computation leads to a heap out-of-bounds write when Orthanc DICOM Server decodes an attacker-supplied PNG.

  • High 7.5

    libp2p-rendezvous through 0.17.1 Denial of Service via Unbounded Registration TTL in Discovery Responses

    libp2p-rendezvous through 0.17.1 fails to validate registration TTL values in discovery responses, allowing attackers to trigger timer arithmetic overflow. A malicious rendezvous server can send a discovery response with an unbounded TTL value that causes the…

  • Medium 6.5

    PCRE2 before 10.48, on 32-bit platforms, has a pcre2_compile_32 integer overflow and resultant out-of-bounds write.