Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-65947: CWE-400: Uncontrolled Resource Consumption in jzeuzs thread-amount

0
High
VulnerabilityCVE-2025-65947cvecve-2025-65947cwe-400cwe-772
Published: Fri Nov 21 2025 (11/21/2025, 22:15:30 UTC)
Source: CVE Database V5
Vendor/Project: jzeuzs
Product: thread-amount

Description

thread-amount is a tool that gets the amount of threads in the current process. Prior to version 0.2.2, there are resource leaks when querying thread counts on Windows and Apple platforms. In Windows platforms, the thread_amount function calls CreateToolhelp32Snapshot but fails to close the returned HANDLE using CloseHandle. Repeated calls to this function will cause the handle count of the process to grow indefinitely, eventually leading to system instability or process termination when the handle limit is reached. In Apple platforms, the thread_amount function calls task_threads (via Mach kernel APIs) which allocates memory for the thread list. The function fails to deallocate this memory using vm_deallocate. Repeated calls will result in a steady memory leak, eventually causing the process to be killed by the OOM (Out of Memory) killer. This issue has been patched in version 0.2.2.

AI-Powered Analysis

AILast updated: 11/28/2025, 22:50:49 UTC

Technical Analysis

CVE-2025-65947 is a vulnerability classified under CWE-400 (Uncontrolled Resource Consumption) and CWE-772 (Missing Release of Resource after Effective Lifetime) affecting the thread-amount tool developed by jzeuzs. The tool is designed to retrieve the number of threads in the current process. In versions prior to 0.2.2, the implementation on Windows platforms calls the Windows API CreateToolhelp32Snapshot to obtain thread information but neglects to close the HANDLE returned by this call using CloseHandle. This omission causes a handle leak that accumulates with each invocation, eventually exhausting the process's handle quota and leading to system instability or forced termination of the process. On Apple platforms (macOS), the tool uses Mach kernel APIs, specifically task_threads, which allocates memory for the thread list. The vulnerability arises because the allocated memory is not freed via vm_deallocate, resulting in a memory leak that grows with repeated calls. This leak can cause the process to consume excessive memory and be terminated by the operating system's Out of Memory (OOM) killer. The vulnerability does not require any authentication or user interaction and can be exploited remotely if the tool is exposed in such a manner. The issue was publicly disclosed on November 21, 2025, with a CVSS 4.0 base score of 8.7 (high severity), reflecting its potential to cause significant denial of service through resource exhaustion. No known exploits have been reported in the wild to date. The vulnerability has been fixed in thread-amount version 0.2.2 by ensuring proper resource release after querying thread counts on both Windows and Apple platforms.

Potential Impact

For European organizations, this vulnerability poses a significant risk of denial of service on systems running vulnerable versions of thread-amount, particularly on Windows and macOS endpoints or servers. The handle leak on Windows can degrade system stability, cause application crashes, or force process termination, potentially disrupting critical services or monitoring tools that rely on thread-amount. On Apple platforms, the memory leak can lead to increased memory consumption, triggering the OOM killer to terminate the affected process, which may result in service interruptions or loss of monitoring capabilities. Organizations with automated systems or scripts that frequently query thread counts using this tool are especially vulnerable to rapid resource depletion. This could impact operational continuity, especially in environments with limited system resources or strict uptime requirements. Additionally, if thread-amount is integrated into security or performance monitoring solutions, its failure could blind defenders to other ongoing issues. Although no active exploitation is reported, the high CVSS score and ease of exploitation without authentication or user interaction make timely remediation critical to prevent potential denial of service attacks or accidental outages.

Mitigation Recommendations

The primary mitigation is to upgrade the thread-amount tool to version 0.2.2 or later, where the resource leaks have been fixed. Organizations should audit their environments to identify all instances of thread-amount and verify the version in use. For environments where immediate upgrade is not feasible, implement monitoring of handle counts on Windows systems and memory usage on Apple systems for processes invoking thread-amount to detect abnormal resource consumption early. Limit the frequency of calls to thread-amount in automated scripts or monitoring tools to reduce the risk of rapid resource exhaustion. Employ application whitelisting and endpoint protection to prevent unauthorized or unintended execution of vulnerable versions. Additionally, consider isolating or sandboxing processes that use thread-amount to contain potential impact. Regularly review and update system and application inventories to ensure vulnerable versions are not overlooked. Finally, maintain awareness of vendor advisories and apply patches promptly to minimize exposure.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2025-11-18T16:14:56.691Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6920e83b27835fd566e7935a

Added to database: 11/21/2025, 10:31:23 PM

Last enriched: 11/28/2025, 10:50:49 PM

Last updated: 1/7/2026, 7:56:45 AM

Views: 111

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats