Common Weakness Enumeration

    CWE Definition / CWE-681

    CWE-681: Incorrect Conversion between Numeric Types

    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.

    Published:11 Apr 2008
    Organization:MITRE
    Modified:11 Dec 2025

    Related Weakness

    CWE-704: Incorrect Type Conversion or Cast

    CWE-704: Incorrect Type Conversion or Cast

    CWE-682: Incorrect Calculation