CWE•Base•Draft•20 recent CVEs
CWE-681Incorrect Conversion between Numeric Types
Description
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.
Common consequences
- Other,Integrity→Unexpected State,Quality DegradationThe program could wind up using the wrong number and generate incorrect results. If the number is used to allocate resources or make a security decision, then this could introduce a vulnerability.
Potential mitigations
- ImplementationAvoid making conversion between numeric types. Always check for the allowed ranges.
Related CWEs
Recent CVEs classified under this CWE
CVE-2026-694388.12026-09-08CVE-2026-849665.12026-09-03CVE-2026-849635.32026-09-03CVE-2026-849706.22026-09-03CVE-2026-825225.42026-09-02CVE-2026-824577.82026-08-29CVE-2026-751455.82026-08-19CVE-2026-64264.42026-08-10CVE-2026-210697.82026-08-10CVE-2026-557682026-07-30CVE-2026-551237.82026-07-14CVE-2026-504027.82026-07-14CVE-2026-534666.52026-07-01CVE-2026-452587.82026-06-27CVE-2026-531337.82026-06-25CVE-2026-539237.52026-06-22CVE-2026-91433.72026-06-19CVE-2026-241927.82026-05-26CVE-2026-261788.82026-04-14CVE-2026-349452026-04-09