Skip to content
OpenAdvisories

Weakness (CWE)

CWE-681: Incorrect Conversion between Numeric Types

Base Draft

When converting from one data type to another, such as long to integer, data can be omitted or translated in a way that produces unexpected values. If the resulting values are used in a sensitive context, then dangerous behaviors may occur.

How to prevent it (1 mitigation)
  1. Implementation

    Avoid making conversion between numeric types. Always check for the allowed ranges.

Source: MITRE CWE-681

98 results · Feed

  • Critical 9.1

    FreeSWITCH: Pre-authentication heap out-of-bounds write in mod_xml_rpc WebSocket frame length handling

    FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a software implementation that runs on any commodity hardware. Prior to 1.11.2, ws_read_frame() decoded a WebSocket frame's 64-bit extended…

  • Unscored —

    In the Samsung Exynos H-Arx DRM plugin, improper input validation during buffer operations can cause memory corruption,…

  • Medium 5.5

    Tesseract: GENERIC_2D_ARRAY DeSerializeSize signed integer comparison bypass allows negative dimensions

    Tesseract is an open source OCR engine. Prior to 5.5.4, GENERIC_2D_ARRAY::DeSerializeSize in src/ccstruct/matrix.h reads matrix dimensions as signed int32_t values and compares them only with UINT16_MAX, allowing negative values to reach ResizeNoInit. Negativ…

  • Critical 9.2

    Botan: Integer overflow when reporting block size in FFI can cause memory corruption

    Botan is a C++ cryptography library. From 2.1.0 until 3.13.0, the Botan C API function botan_block_cipher_block_size converted a size_t block size to int without a bounds check. In an application that accepts external algorithm parameter strings and uses the …

  • Medium 6.5

    BSON output corruption via out-of-range binary subtype bypassing UUID and OldBinary guards

    A numeric-type conversion flaw in the BSON handling library of the MongoDB C# Driver allows an out-of-range binary subtype value supplied through untrusted textual input to bypass the library's binary-element integrity checks. When such a value is later encod…

  • Medium 4.8

    Vyper 0.3.4 through 0.5.0b1 create_from_blueprint Offset Validation Bypass via Unsigned Wraparound

    Vyper 0.3.4 through 0.5.0b1 computes the remaining blueprint size in create_from_blueprint by uint256 subtraction without first checking that code_offset is below the blueprint's code size, so a huge offset wraps to a small positive value. An attacker control…

  • Medium 5.3

    IBM MQ Denial of Service

    IBM MQ could allow an authenticated attacker to cause a denial of service through a specially crafted message that triggers excessive memory operations during character set conversion.

  • High 7.8

    Windows TCP/IP Local Elevation of Privilege Vulnerability

    Incorrect conversion between numeric types in Windows TCP/IP allows an authorized attacker to elevate privileges locally.

  • Low 3.6

    Heap buffer overflow via 32-bit string-length truncation in MongoDB PHP Driver

    The BSON encoder in the MongoDB PHP Driver converts a string length to a 32-bit value without validation. When an affected application encodes a string near 4 GiB, the allocation size can wrap while the copy operation uses the original length. The resulting h…

  • Medium 6.5

    Excelize: A Zip64 uncompressed-size of 2^63 panics OpenFile/OpenReader

    Excelize is a Go language library for reading and writing Microsoft Excel spreadsheets. From 2.1.0 to 2.11.0, a Zip64 uncompressed size with the high bit set is converted from uint64 to a negative int64 before signed size-limit checks and allocation. ReadZipR…

  • Medium 6.7

    NVIDIA vGPU Virtual GPU Manager for Linux contains a vulnerability in the kernel mode layer where an attacker could cau…

  • High 7.8

    NVIDIA GPU Display Driver for Windows and Linux contains a vulnerability in the kernel mode layer, where a user could c…

  • High 7.5

    MuJS e892c9fdb contains an incorrect numeric conversion vulnerability in jsR_isindex() in jsrun.c. A specially crafted …

  • High 7.5

    NanoSVG commit 239e102ec contains an incorrect numeric conversion vulnerability in the rasterizer's nsvg__addActive() f…

  • High 7.5

    NanoSVG commit 239e102ec contains an incorrect numeric conversion vulnerability in nsvg__pathArcTo() when parsing SVG a…

  • Medium 6.5

    NanoSVG 239e102ec contains an incorrect numeric conversion vulnerability in nsvg__curveDivs() during SVG stroke rasteri…

  • Medium 5.5

    LibRaw 0.22.0 contains an incorrect numeric conversion vulnerability in LibRaw::parse_tiff_ifd() when processing TIFF t…

  • High 8.9

    RabbitMQ amqp091-go: Denial of Service via Malicious Field Length in AMQP Client

    RabbitMQ amqp091-go is a Go AMQP 0.9.1 client. Prior to 1.13.0, readField in read.go reads the length of an AMQP byte-array field with type tag x into a signed int32 and passes the value directly to make when allocating the field buffer. A malicious or compro…

  • High 8.1

    Microsoft JScript Remote Code Execution Vulnerability

    Incorrect conversion between numeric types in Microsoft JScript allows an unauthorized attacker to execute code over a network.

  • Medium 5.3

    Silent field truncation via unchecked int cast of huge JSON string values in JSON-to-BSON parser

    An incorrect numeric conversion in the JSON parsing component of the MongoDB C Driver's BSON library may cause an unusually large text value to be silently shortened, or the corresponding field to be omitted, while the parsing operation still reports success …

  • Medium 5.1

    BSON element injection via NUL-embedded document keys in builder append

    An incorrect numeric type conversion in the BSON document building component of the MongoDB C++ Driver may cause a length value to be interpreted incorrectly. When an application supplies an extremely large, non-terminated field name to the builder, the libra…

  • Medium 6.2

    Heap over-read or silent misparse via 32-bit truncation of JSON length in BSON JSON parser

    A numeric truncation weakness exists in the JSON parsing component of the MongoDB C++ Driver's BSON library. An actor who controls the text that an embedding application hands to the library's public JSON parsing interface, when that text is very large, can c…

  • Medium 5.4

    libjxl < 0.12.0 Container Box Parser Integer Underflow via 32-bit Size Truncation

    libjxl before 0.12 contains an integer underflow vulnerability in the container box parser that allows remote attackers to inject arbitrary metadata by exploiting 64-bit box size truncation to size_t on 32-bit platforms. Attackers can supply a crafted JPEG XL…

  • High 7.8

    su-exec through 0.3 Privilege Escalation via Numeric User ID

    su-exec through 0.3 fails to validate numeric user and group identifiers parsed with strtol before assigning to uid_t and gid_t, allowing truncation of out-of-range values to zero. Attackers can supply large numeric identifiers that truncate to root's identif…

  • Medium 5.3

    netty-incubator-codec-ohttp: Binary HTTP parser unchecked varint length overflow causes decoder crash

    ## Summary `io.netty.incubator:netty-incubator-codec-bhttp` uses attacker-controlled Binary HTTP variable-length integers as `long` values but accumulates them into `int` offsets. Large valid varint lengths wrap the internal offset negative, leading to unchec…

  • Medium 5.8

    FFmpeg Integer Narrowing Conversion OOB Memory Access in AV1 RTP Packetizer

    FFmpeg before commit b4c199c contains an incorrect integer narrowing conversion in the AV1 RTP packetizer (libavformat/rtpenc_av1.c). The OBU size is cast to long before comparison against the remaining frame size. On targets where long is 32 bits, including …

  • Medium 5.3

    Io.undertow/undertow: undertow: http response header integrity issue due to character truncation

    A flaw was found in Undertow, an HTTP server, within its HTTP response header writing path. The `writeString()` method performs a silent narrowing cast from 16-bit Unicode characters to 8-bit bytes when writing HTTP response header values. A remote attacker c…

  • Medium 4.4

    Qemu-kvm: vhost inflight migration vmstate integer type mismatch causes out-of-bounds access

    A type mismatch vulnerability was found in QEMU's vhost inflight migration VMState handling. The destination buffer size is stored as a uint64_t but read by the VMS_VBUFFER load path as a signed int32_t. On little-endian hosts, a crafted incoming migration st…

  • Medium 5.1

    Incorrect conversion between numeric types in VC1 codec in libsavsvc.so prior to SMR Aug-2026 Release 1 allows local at…

  • High 8.7

    GoAccess WebSocket Server: Signed 32 bit truncation of the 64 bit frame length causes a remote pre-authentication denial of service

    GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through the browser. Prior to version 1.11, the built-in WebSocket server narrows a 64-bit extended frame length into the signed 32-bit WSFrame.payloadl…

  • High 7.8

    Microsoft PowerPoint Remote Code Execution Vulnerability

    Heap-based buffer overflow in Microsoft Office PowerPoint allows an unauthorized attacker to execute code locally.

  • High 7.8
    CVE-2026-50402 Public exploit

    NTFS Elevation of Privilege Vulnerability

    Incorrect conversion between numeric types in Windows NTFS allows an authorized attacker to elevate privileges locally.

  • Medium 6.5

    ImageMagick: Heap Buffer Over-Read in XCF decoder due to integer conversion overflow

    ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 6.9.13-51 and 7.1.2-26, an integer overflow in the XCF decoder can result in an out of bounds read when a crafted image is read, potentially resul…

  • High 7.8
    CVE-2026-45258 Public exploit

    Multiple vulnerabilities in the sound(4) mmap path

    dsp_mmap_single() validated the requested mapping by checking the sum of the user-supplied offset and length against the buffer size. This addition could overflow, so that a large offset and length wrapped around and passed the check. The offset was then narr…

  • High 8.8

    iommu/amd: Fix clone_alias() to use the original device's devid

    In the Linux kernel, the following vulnerability has been resolved: iommu/amd: Fix clone_alias() to use the original device's devid Currently clone_alias() assumes first argument (pdev) is always the original device pointer. This function is called by pci_for…

  • Medium 5.3

    vLLM GGUF Kernels: int64_t to int truncation of tensor dimensions causes GPU buffer overflow

    vLLM is an inference and serving engine for large language models (LLMs). From 0.5.5 until 0.23.1rc0, integer truncation of tensor dimensions in vLLM's GGUF dequantize kernels (csrc/quantization/gguf/gguf_kernel.cu) causes partial tensor processing. The outpu…

  • Low 3.7

    Incorrect Conversion between Numeric Types in NI grpc-device due to missing range checks in CodeGen

    There is an incorrect conversion between numeric types vulnerability in NI grpc-device due to missing range checks in CodeGen.  This may silently discard high bits if a size value exceeded the target type's range. This affects NI grpc-device 2.17.0 and prior …

  • High 8.7

    iskorotkov/avro: Integer Overflow in Avro Decoder

    iskorotkov/avro is a fast Go Avro codec. Prior to 2.33.0, several Avro decoder paths read attacker-controlled 64-bit values from the wire format and either narrowed them to platform-sized int before bounds-checking, or summed them with overflow-prone signed-i…

  • High 7.8

    NVIDIA Display Driver for Linux contains a vulnerability where an attacker could cause an incorrect conversion between …

  • High 8.8

    Windows Advanced Rasterization Platform Elevation of Privilege Vulnerability

    Integer size truncation in Windows Advanced Rasterization Platform (WARP) allows an unauthorized attacker to elevate privileges locally.