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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-404 (不恰当的资源关闭或释放) — Vulnerability Class 337

337 vulnerabilities classified as CWE-404 (不恰当的资源关闭或释放). AI Chinese analysis included.

CWE-404 represents a critical resource management weakness where software fails to properly release or incorrectly frees allocated resources, such as memory, file handles, or network connections, before they are reused. This flaw typically leads to resource exhaustion, causing application crashes, denial of service, or system instability as available resources dwindle. Attackers often exploit this by triggering repeated allocations without corresponding releases, effectively starving the system of necessary assets. To mitigate this risk, developers must implement rigorous lifecycle management, ensuring every allocated resource has a corresponding release mechanism. This involves using structured cleanup routines, leveraging language-specific garbage collection or smart pointers, and accounting for all execution paths, including error conditions and timeouts, to guarantee resources are consistently returned to the pool for safe reuse.

MITRE CWE Description
The product does not release or incorrectly releases a resource before it is made available for re-use. When a resource is created or allocated, the developer is responsible for properly releasing the resource as well as accounting for all potential paths of expiration or invalidation, such as a set period of time or revocation.
Common Consequences (2)
Availability, OtherDoS: Resource Consumption (Other), Varies by Context
Most unreleased resource issues result in general software reliability problems, but if an attacker can intentionally trigger a resource leak, the attacker might be able to launch a denial of service attack by depleting the resource pool.
ConfidentialityRead Application Data
When a resource containing sensitive information is not correctly shutdown, it may expose the sensitive data in a subsequent allocation.
Mitigations (4)
RequirementsUse a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, languages such as Java, Ruby, and Lisp perform automatic garbage collection that releases memory for objects that have been deallocated.
ImplementationIt is good practice to be responsible for freeing all resources you allocate and to be consistent with how and where you free memory in a function. If you allocate memory that you intend to free upon completion of the function, you must be sure to free the memory at all exit points for that function including error conditions.
ImplementationMemory should be allocated/freed using matching functions such as malloc/free, new/delete, and new[]/delete[].
ImplementationWhen releasing a complex object or structure, ensure that you properly dispose of all of its member components, not just the object itself.
Examples (2)
The following method never closes the new file handle. Given enough time, the Finalize() method for BufferReader should eventually call Close(), but there is no guarantee as to how long this action will take. In fact, there is no guarantee that Finalize() will ever be invoked. In a busy environment, the Operating System could use up all of the available file handles before the Close() function is …
private void processFile(string fName) { BufferReader fil = new BufferReader(new FileReader(fName)); String line; while ((line = fil.ReadLine()) != null) { processLine(line); } }
Bad · Java
private void processFile(string fName) { BufferReader fil = new BufferReader(new FileReader(fName)); String line; while ((line = fil.ReadLine()) != null) { processLine(line); } fil.Close(); }
Good · Java
This code attempts to open a connection to a database and catches any exceptions that may occur.
try { Connection con = DriverManager.getConnection(some_connection_string); } catch ( Exception e ) { log( e ); }
Bad · Java
CVE IDTitleCVSSSeverityPublished
CVE-2025-20127 Cisco Adaptive Security Appliance Software and Firepower Threat Defense Software for Firepower 3100 and 4200 Series TLS Cipher Denial of Service Vulnerability — Cisco Adaptive Security Appliance (ASA) Software 7.7 High2025-08-14
CVE-2025-48989 Apache Tomcat: h2 DoS - Made You Reset — Apache Tomcat 7.5AIHighAI2025-08-13
CVE-2025-8761 INSTAR 2K+/4K Backend IPC Server denial of service — 2K+ 7.5 High2025-08-13
CVE-2025-8805 Open5GS SMF gsm-sm.c smf_gsm_state_wait_pfcp_deletion denial of service — Open5GS 5.3 Medium2025-08-10
CVE-2025-8803 Open5GS AMF gmm-sm.c gmm_state_exception denial of service — Open5GS 5.3 Medium2025-08-10
CVE-2025-8802 Open5GS SMF smf-sm.c smf_state_operational denial of service — Open5GS 5.3 Medium2025-08-10
CVE-2025-8801 Open5GS AMF gmm-sm.c gmm_state_exception denial of service — Open5GS 5.3 Medium2025-08-10
CVE-2025-8800 Open5GS AMF esm-handler.c esm_handle_pdn_connectivity_request denial of service — Open5GS 5.3 Medium2025-08-10
CVE-2025-8799 Open5GS AMF npcf-build.c amf_nsmf_pdusession_build_create_sm_context denial of service — Open5GS 5.3 Medium2025-08-10
CVE-2025-52982 Junos OS: MX Series: When specific SIP packets are processed the MS-MPC will crash — Junos OS 5.9 Medium2025-07-11
CVE-2025-49483 Resource leaks in tr069 — Falcon_Linux、Kestrel、Lapwing_Linux 5.4 Medium2025-07-01
CVE-2025-49482 Resource leaks in tr069 — Falcon_Linux、Kestrel、Lapwing_Linux 5.4 Medium2025-07-01
CVE-2025-49481 Resource leaks in router — Falcon_Linux、Kestrel、Lapwing_Linux 5.4 Medium2025-07-01
CVE-2025-49488 Resource leaks in router — Falcon_Linux、Kestrel、Lapwing_Linux 5.4 Medium2025-07-01
CVE-2025-49491 Resource leaks in traffic_stat — Falcon_Linux、Kestrel、Lapwing_Linux 5.4 Medium2025-07-01
CVE-2025-49490 Resource leaks in router — Falcon_Linux、Kestrel、Lapwing_Linux 5.4 Medium2025-07-01
CVE-2025-49489 Resource leaks in cm — Falcon_Linux、Kestrel、Lapwing_Linux 5.4 Medium2025-07-01
CVE-2025-5072 Resource leaks in cm — Falcon_Linux、Kestrel、Lapwing_Linux 5.4 Medium2025-07-01
CVE-2025-6530 70mai M300 Telnet Service demo.sh denial of service — M300 4.8 Medium2025-06-23
CVE-2025-6401 TOTOLINK N300RH HTTP POST Message formFilter denial of service — N300RH 3.5 Low2025-06-21
CVE-2025-5935 Open5GS AMF/MME emm-sm.c common_register_state denial of service — Open5GS 5.3 Medium2025-06-10
CVE-2025-5404 chaitak-gorai Blogbook GET Parameter search.php denial of service — Blogbook 4.3 Medium2025-06-01
CVE-2025-4998 H3C Magic R200G HTTP POST Request aspForm EditWlanMacList denial of service — Magic R200G 6.5 Medium2025-05-20
CVE-2025-4997 H3C R2+ProG HTTP POST Request aspForm SetAPInfoById denial of service — R2+ProG 6.5 Medium2025-05-20
CVE-2025-4867 Tenda A15 ArpNerworkSet formArpNerworkSet denial of service — A15 6.5 Medium2025-05-18
CVE-2025-4756 D-Link DI-7003GV2 restart.asp denial of service — DI-7003GV2 5.3 Medium2025-05-16
CVE-2025-4749 D-Link DI-7003GV2 Factory Reset backup.asp sub_4983B0 denial of service — DI-7003GV2 7.5 High2025-05-16
CVE-2024-13009 Eclipse Jetty GZIP buffer release — Jetty 7.2 High2025-05-08
CVE-2025-41399 SCTP Vulnerability — BIG-IP 7.5 High2025-05-07
CVE-2025-4287 PyTorch nccl.py torch.cuda.nccl.reduce denial of service — PyTorch 3.3 Low2025-05-05

Vulnerabilities classified as CWE-404 (不恰当的资源关闭或释放) represent 337 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.