Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CWE-252 (未加检查的返回值) — Vulnerability Class 76

76 vulnerabilities classified as CWE-252 (未加检查的返回值). AI Chinese analysis included.

CWE-252 represents a critical programming weakness where software fails to verify the return value of a function or method, often stemming from the erroneous assumption that operations cannot fail or that their failure is inconsequential. This oversight allows attackers to exploit the vulnerability by forcing functions to return unexpected error codes or null values, thereby disrupting the intended execution flow. When the program proceeds without validating these outcomes, it may operate in an unstable state, leading to data corruption, denial of service, or privilege escalation. To mitigate this risk, developers must rigorously implement error-handling routines that explicitly check return statuses. By treating every function call as potentially hazardous and ensuring subsequent logic accounts for failure conditions, programmers can prevent attackers from manipulating program state through unchecked return values.

MITRE CWE Description
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.
Common Consequences (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.
Mitigations (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.
Examples (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 Title CVSS Severity Published
CVE-2025-62789 Wazuh vulnerable to NULL pointer dereference in fim_alert line 712 — wazuh 7.5AI High AI 2025-10-29
CVE-2025-62785 Wazuh fillData NULL pointer dereference causes analysisd crash — wazuh 7.5AI High AI 2025-10-29
CVE-2025-11839 GNU Binutils prdbg.c tg_tag_type return value — Binutils 3.3 Low 2025-10-16
CVE-2025-61935 BIG-IP Advanced WAF and ASM vulnerability — BIG-IP 7.5 High 2025-10-15
CVE-2025-58903 Fortinet FortiOS 安全漏洞 — FortiOS 2.5 Low 2025-10-14
CVE-2025-55146 Ivanti多款产品 安全漏洞 — Connect Secure 4.9 Medium 2025-09-09
CVE-2025-54571 ModSecurity's Insufficient Return Value Handling can Lead to XSS and Source Code Disclosure — ModSecurity 6.1AI Medium AI 2025-08-05
CVE-2025-1394 Denial of Service (DoS) vulnerabilitiey in Zigbee library — Zigbee Stack 9.1AI Critical AI 2025-07-30
CVE-2025-46672 CryptoLib 安全漏洞 — CryptoLib 3.5 Low 2025-04-27
CVE-2024-12650 Wago: Vulnerability in libwagosnmp — CC100 0751-9x01 5.4 Medium 2025-03-05
CVE-2025-25724 libarchive 安全漏洞 — libarchive 4.0 Medium 2025-03-02
CVE-2024-45775 Grub2: commands/extcmd: missing check for failed allocation 5.2 Medium 2025-02-18
CVE-2025-0518 Unchecked sscanf return value which leads to memory data leak — FFmpeg 6.5 - 2025-01-16
CVE-2024-45419 Zoom Apps - Improper Input Validation — Zoom Workplace Apps, SDKs, Rooms Clients, and Rooms Controllers 8.1 High 2024-11-19
CVE-2024-50306 Apache Traffic Server: Server process can fail to drop privilege — Apache Traffic Server 9.8 - 2024-11-14
CVE-2024-8110 Yokogawa Dual-redundant Platform for Computer 安全漏洞 — Dual-redundant Platform for Computer (PC2CKM) 7.5 High 2024-09-17
CVE-2024-42491 A malformed Contact or Record-Route URI in an incoming SIP request can cause Asterisk to crash when res_resolver_unbound is used — asterisk 5.7 Medium 2024-09-05
CVE-2024-39558 Junos OS and Junos OS Evolved: Receipt of specific PIM packet causes rpd crash when PIM is configured along with MoFRR — Junos OS 6.5 Medium 2024-07-10
CVE-2024-37039 Schneider Electric SAGE RTUs 安全漏洞 — Sage 1410 5.9 Medium 2024-06-12
CVE-2023-50359 QTS, QuTS hero — QTS 3.4 Low 2024-02-02
CVE-2023-6918 Libssh: missing checks for return values for digests — Red Hat Enterprise Linux 8 3.7 Low 2023-12-18
CVE-2023-44322 Siemens 多款产品 安全漏洞 — RUGGEDCOM RM1224 LTE(4G) EU 3.7 Low 2023-11-14
CVE-2023-44182 Junos OS and Junos OS Evolved: An Unchecked Return Value in multiple users interfaces affects confidentiality and integrity of device operations — Junos OS 7.3 High 2023-10-12
CVE-2023-4162 Segmentation fault in Brocade Fabric OS after Brocade Fabric OS v9.0 — Fabric OS 4.4 Medium 2023-08-31
CVE-2023-37902 Vyper's ecrecover can return undefined data if signature does not verify — vyper 5.3 Medium 2023-07-25
CVE-2023-3247 Missing error check and insufficient random bytes in HTTP Digest authentication for SOAP — PHP 2.6 Low 2023-07-22
CVE-2020-8934 Site Kit by Google plugin for WordPress — Site Kit By Google 4.3 Medium 2023-07-07
CVE-2023-3013 Unchecked Return Value in gpac/gpac — gpac/gpac 6.1 - 2023-05-31
CVE-2023-24825 RIOT-OS vulnerable to NULL pointer dereference in gnrc_pktbuf_mark — RIOT 7.5 High 2023-05-30
CVE-2022-43765 DoS in APROLs Tbase server — B&R APROL 7.5 High 2023-02-08

Vulnerabilities classified as CWE-252 (未加检查的返回值) represent 76 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.