{"answers":{"affected":"3 open source packages ship an affected version, including thread-amount.","exploited":"There is no known exploitation of CVE-2025-65947 in the wild and no public exploit code.","fix":"Upgrade thread-amount to 0.2.2 or later.","what":"CVE-2025-65947 is a high-severity denial of service vulnerability in jzeuzs thread-amount, published on 21 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-65947 and fix it if it is affected.\n\nWhat it is: CVE-2025-65947 is a high-severity denial of service vulnerability in jzeuzs thread-amount, published on 21 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2025-65947 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- thread-amount (crates.io): affected all versions; fixed in 0.2.2\n- thread-amount (crates.io): affected all versions; fixed in 0.2.2\n- thread-amount (crates.io): affected from 0.0.0-0; fixed in 0.2.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-65947/ (Markdown: https://insights.sbomify.com/CVE-2025-65947/index.md)","id":"CVE-2025-65947","markdown":"https://insights.sbomify.com/CVE-2025-65947/index.md","name":"CVE-2025-65947","record":{"aliases":["GHSA-jf9p-2fv9-2jp2","RUSTSEC-2025-0125"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Rust thread counting library","requires_auth":"none","summary":"Repeated calls to thread-amount leak resources on Windows and macOS, causing process termination due to handle or memory exhaustion.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.7,"severity":"high","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-772","name":"Missing Release of Resource after Effective Lifetime"},{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"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.","ecosystems":["crates.io"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"thread-amount is Vulnerable to Resource Exhaustion (Memory and Handle Leaks) on Windows and macOS","id":"CVE-2025-65947","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"denial_of_service","year":"2025"},"n_packages":3,"n_references":3,"next":{"headline":"WBCE CMS is Vulnerable to Time-Based Blind SQL Injection through groups[] Parameter","id":"CVE-2025-65950"},"packages":[{"ecosystem":"crates.io","fixed":["0.2.2"],"introduced":["0"],"last_affected":[],"package":"thread-amount","purl":null,"source":"GHSA-jf9p-2fv9-2jp2"},{"ecosystem":"crates.io","fixed":["0.2.2"],"introduced":["0"],"last_affected":[],"package":"thread-amount","purl":"pkg:cargo/thread-amount","source":"GHSA-jf9p-2fv9-2jp2"},{"ecosystem":"crates.io","fixed":["0.2.2"],"introduced":["0.0.0-0"],"last_affected":[],"package":"thread-amount","purl":"pkg:cargo/thread-amount","source":"RUSTSEC-2025-0125"}],"prev":{"headline":"Roo Code is Vulnerable to Potential Remote Code Execution via zsh Command Validation Bug","id":"CVE-2025-65946"},"products":["thread-amount"],"published":"2025-11-21","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"open","licence":"CC0 1.0","name":"RustSec","prefix":"RUSTSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-11-24","vendors":["jzeuzs"]},"summary":"Repeated calls to thread-amount leak resources on Windows and macOS, causing process termination due to handle or memory exhaustion.","url":"https://insights.sbomify.com/CVE-2025-65947/"}