目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1310

100%

CWE-681 数值类型间的不正确转换 类漏洞列表 42

CWE-681 数值类型间的不正确转换 类弱点 42 条 CVE 漏洞汇总,含 AI 中文分析。

CWE-681属于数值类型转换错误漏洞,指在不同数据类型(如长整型转整型)转换时,数据被截断或错误翻译导致意外值。攻击者常利用此缺陷构造特殊输入,引发逻辑错误或溢出,从而执行恶意操作或破坏系统完整性。开发者应避免隐式转换,使用显式类型检查与边界验证,确保转换过程安全,防止敏感上下文中的危险行为发生。

MITRE CWE 官方描述
CWE:CWE-681 数值类型间转换错误 (Incorrect Conversion between Numeric Types) 英文:当在不同数据类型之间进行转换时(例如从 long 转换为 integer),数据可能会被省略或以产生意外值的方式进行转换。如果这些结果值被用于敏感上下文中,则可能导致危险行为。
常见影响 (1)
Other, IntegrityUnexpected State, Quality Degradation
The 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.
缓解措施 (1)
ImplementationAvoid making conversion between numeric types. Always check for the allowed ranges.
代码示例 (2)
In the following Java example, a float literal is cast to an integer, thus causing a loss of precision.
int i = (int) 33457.8f;
Bad · Java
This code adds a float and an integer together, casting the result to an integer.
$floatVal = 1.8345; $intVal = 3; $result = (int)$floatVal + $intVal;
Bad · PHP
CVE ID标题CVSS风险等级Published
CVE-2021-41202 Google TensorFlow 安全漏洞 — tensorflow 5.5 Medium2021-11-05
CVE-2021-37669 Google TensorFlow输入验证错误漏洞 — tensorflow 5.5 Medium2021-08-12
CVE-2021-37646 Google TensorFlow安全漏洞 — tensorflow 5.5 Medium2021-08-12
CVE-2021-37661 Google TensorFlow 安全漏洞 — tensorflow 5.5 Medium2021-08-12
CVE-2021-37645 Google TensorFlow 数字错误漏洞 — tensorflow 5.5 Medium2021-08-12
CVE-2021-29539 Google TensorFlow 安全漏洞 — tensorflow 2.5 Low2021-05-14
CVE-2020-28588 Linux kernel 安全漏洞 — Linux Kernel 6.2 -2021-05-10
CVE-2020-15225 Django 安全漏洞 — django-filter 7.5 High2021-04-29
CVE-2021-3444 Linux kernel 安全漏洞 — kernel 7.8 High2021-03-23
CVE-2020-4032 FreeRDP 安全漏洞 — FreeRDP 3.1 Low2020-06-22
CVE-2019-14842 libnbd 输入验证错误漏洞 — libnbd 9.8 -2019-11-26
CVE-2019-10203 PowerDNS Authoritative Server 资源管理错误漏洞 — pdns 6.5 -2019-11-22

CWE-681(数值类型间的不正确转换) 是常见的弱点类别,本平台收录该类弱点关联的 42 条 CVE 漏洞。