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

4 results · Clear filters · 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…

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

  • Critical 9.1

    Incorrect Conversion between Numeric Types in Besu Ethereum Client

    Besu is a Java-based Ethereum client. In versions newer than 22.1.3 and prior to 22.7.1, Besu is subject to an Incorrect Conversion between Numeric Types. An error in 32 bit signed and unsigned types in the calculation of available gas in the CALL operations …

  • Critical 9.8

    Incorrect cast in anymap

    An issue was discovered in the anymap crate through 0.12.1 for Rust. It violates soundness via conversion of a *u8 to a *u64.