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

目标: 1000 元 · 已筹: 1359 元

100%

CWE-252 未加检查的返回值 类漏洞列表 102

CWE-252 未加检查的返回值 类弱点 102 条 CVE 漏洞汇总,含 AI 中文分析。

CWE-252 属于未检查返回值漏洞,指程序忽略函数或方法的返回状态,导致无法识别异常条件。攻击者常通过构造输入迫使函数失败,利用开发者“调用必成功”的错误假设,使程序进入非预期状态或执行错误逻辑。开发者应在每次调用可能失败的函数后,严格验证返回值,确保仅在成功时继续执行后续逻辑,从而提升系统鲁棒性。

MITRE CWE 官方描述
CWE:CWE-252 Unchecked Return Value(未检查返回值) 英文:The product does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions. 译文:产品未检查方法或函数的返回值,这可能导致其无法检测到意外状态和条件。 Two common programmer assumptions are "this function call can never fail" and "it doesn't matter if this function call fails". If an attacker can force the function to fail or otherwise return a value that is not expected, then the subsequent program logic could lead to a vulnerability, because the product is not in a state that the programmer assumes. For example, if the program calls a function to drop privileges but does not check the return code to ensure that privileges were successfully dropped, then the program will continue to operate with the higher privileges. 译文:程序员常见的两种假设是“此函数调用绝不会失败”以及“此函数调用失败也无所谓”。如果攻击者能够强制函数失败,或以非预期方式返回一个值,那么后续的程序逻辑可能会导致漏洞,因为产品并未处于程序员所假设的状态。例如,如果程序调用一个函数来降低权限,但未检查返回码以确保权限已成功降低,则程序将继续以较高权限运行。
常见影响 (1)
Availability, Integrity Unexpected State, DoS: Crash, Exit, or Restart
An unexpected return value could place the system in a state that could lead to a crash or other unintended behaviors.
缓解措施 (4)
Implementation Check the results of all functions that return a value and verify that the value is expected.
Effectiveness: High
Implementation For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished [REF-1484].
Implementation Ensure that you account for all possible return values from the function.
Implementation When designing a function, make sure you return a value or throw an exception in case of an error.
代码示例 (2)
Consider the following code segment:
char buf[10], cp_buf[10]; fgets(buf, 10, stdin); strcpy(cp_buf, buf);
Bad · C
In the following example, it is possible to request that memcpy move a much larger segment of memory than assumed:
int returnChunkSize(void *) { /* if chunk info is valid, return the size of usable memory, * else, return -1 to indicate an error */ ... } int main() { ... memcpy(destBuf, srcBuf, (returnChunkSize(destBuf)-1)); ... }
Bad · C
CVE ID 标题 CVSS 风险等级 Published
CVE-2026-127169 Unchecked Return Value in CODESYS Control RTE — Control RTE (SL) 7.5 High 2026-11-30
CVE-2026-133845 Flatpak 沙盒逃逸漏洞(fd冲突) — Red Hat Enterprise Linux 10 7.3 High 2026-11-27
CVE-2026-76101 keystore-go v2 完整性与密码验证绕过 — keystore-go 7.1 High 2026-11-18
CVE-2026-126708 OpenSSL(版本未知)任意口令认证绕过 — Eclipse Mosquitto - - 2026-11-18
CVE-2026-107853 tiny-secp256k1 无效无穷调整缓冲区漏洞 — tiny-secp256k1 6.3 Medium 2026-11-17
CVE-2026-19809 charger_get_prop 内核栈信息泄露漏洞 — zephyr 3.3 Low 2026-11-12
CVE-2026-125225 FFmpeg 9.0.2 AAC 位流过滤器空指针解引用漏洞 — FFmpeg 5.5 Medium 2026-11-09
CVE-2026-125174 FFmpeg 8.1.3 前及 9.0.2 前空指针解引用漏洞 — FFmpeg 5.5 Medium 2026-11-09
CVE-2026-125072 FFmpeg 9.0.2 前版本 MPEG 音频解码空指针解引用漏洞 — FFmpeg 4.7 Medium 2026-11-09
CVE-2026-125071 FFmpeg 9.0.2 JV 视频解码器空指针解引用漏洞 — FFmpeg 4.7 Medium 2026-11-09
CVE-2026-125069 FFmpeg 9.0.2 运动像素解码器空指针解引用漏洞 — FFmpeg 4.7 Medium 2026-11-09
CVE-2026-125070 FFmpeg 9.0.2 EA TQI 解码器空指针解引用漏洞 — FFmpeg 5.5 Medium 2026-11-09
CVE-2026-125068 FFmpeg 9.0.2 Bink 视频解码器空指针解引用漏洞 — FFmpeg 5.5 Medium 2026-11-09
CVE-2026-125066 FFmpeg 9.0.2 之前版本 CLJR 解码器空指针解引用漏洞 — FFmpeg 5.5 Medium 2026-11-09
CVE-2026-125067 FFmpeg 9.0.2 VBLE 解码器空指针解引用漏洞 — FFmpeg 5.5 Medium 2026-11-09
CVE-2026-125065 FFmpeg 9.0.2 TGV 解码器空指针解引用漏洞 — FFmpeg 5.5 Medium 2026-11-09
CVE-2026-125064 FFmpeg 9.0.2 G.726 解码器空指针解引用漏洞 — FFmpeg 5.5 Medium 2026-11-09
CVE-2026-121639 WatchGuard AuthPoint Gateway 身份验证绕过导致拒绝服务漏洞 — AuthPoint Authentication Gateway 9.2 Critical 2026-11-04
CVE-2026-115403 BSD 原始 IPv6 发送路径空指针解引用漏洞 — Eclipse ThreadX 8.2 High 2026-11-02
CVE-2026-114408 ICMPv6 处理中目的表满时 NULL 指针解引用漏洞 — Eclipse ThreadX NetX Duo 8.7 High 2026-11-02
CVE-2026-118263 Echo BodyDump 未知长度请求忽略溢出错误漏洞 — echo 6.3 Medium 2026-10-28
CVE-2026-110353 HAProxy 3.2-3.4.6 HTTP/2 PING 拒绝服务漏洞 — HAProxy 7.5 High 2026-10-22
CVE-2026-107838 RIOT nanocoap_fileserver 未处理响应初始化失败导致断言可达 — RIOT 7.5 High 2026-10-09
CVE-2026-106436 MongoDB PHP 驱动拒绝服务与数据截断漏洞 — PHP Driver 4.8 Medium 2026-10-08
CVE-2026-95316 Chrome 154.0.8037.57前Performance未检查返回值漏洞 — Chrome - - 2026-09-29
CVE-2026-67409 RabbitMQ JWKS获取忽略HTTP状态码致认证DoS漏洞 — rabbitmq-server 8.2 High 2026-09-25
CVE-2026-71180 Dell Update Package Framework 26.07.03 前返回值未检查 — Update Package Framework 8.2 High 2026-09-16
CVE-2026-90648 WebAssembly WABT 异常处理不当漏洞 — wabt 7.1 High 2026-09-12
CVE-2026-86749 Grokability Snipe-IT 异常处理不当漏洞 — snipe-it 6.3 Medium 2026-09-09
CVE-2026-86739 Grokability Snipe-IT 异常处理不当漏洞 — snipe-it 3.1 Low 2026-09-09

CWE-252(未加检查的返回值) 是常见的弱点类别,本平台收录该类弱点关联的 102 条 CVE 漏洞。