{"answers":{"affected":"8 open source packages ship an affected version, including net-imap. It affects 1 product.","exploited":"There is no known exploitation of CVE-2025-43857 in the wild and no public exploit code.","fix":"Upgrade net-imap to a fixed version for your release line: 0.2.5, 0.3.9, 0.4.20 or 0.5.7.","what":"CVE-2025-43857 is a medium-severity denial of service vulnerability in ruby net-imap, published on 28 Apr 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-43857 and fix it if it is affected.\n\nWhat it is: CVE-2025-43857 is a medium-severity denial of service vulnerability in ruby net-imap, published on 28 Apr 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2025-43857 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- net-imap (RubyGems): affected all versions; fixed in 0.2.5\n- net-imap (RubyGems): affected all versions; fixed in 0.2.5\n- net-imap (RubyGems): affected from 0.3.0; fixed in 0.3.9\n- net-imap (RubyGems): affected from 0.3.0; fixed in 0.3.9\n- net-imap (RubyGems): affected from 0.4.0; fixed in 0.4.20\n- net-imap (RubyGems): affected from 0.4.0; fixed in 0.4.20\n- net-imap (RubyGems): affected from 0.5.0; fixed in 0.5.7\n- net-imap (RubyGems): affected from 0.5.0; fixed in 0.5.7\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-43857/ (Markdown: https://insights.sbomify.com/CVE-2025-43857/index.md)","id":"CVE-2025-43857","markdown":"https://insights.sbomify.com/CVE-2025-43857/index.md","name":"CVE-2025-43857","record":{"aliases":["ALPINE-CVE-2025-43857","DEBIAN-CVE-2025-43857","ECHO-d252-3984-4cf6","GHSA-j3g3-5qv5-52mj","MINI-mfwq-779c-vj46","MINI-mj9j-p5vp-f5jh","MINI-w3r4-vv49-vf4r","MINI-xgxc-h9pc-qvf6","OESA-2025-1640","UBUNTU-CVE-2025-43857"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Ruby IMAP client library","requires_auth":"none","summary":"A malicious IMAP server can cause memory exhaustion and denial of service in the Ruby net-imap client by sending large literal byte counts.","user_interaction":"required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"net\\","vendor":"ruby-lang"}],"cvss":{"score":6,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-770","name":"Allocation of Resources Without Limits or Throttling"},{"id":"CWE-789","name":"Memory Allocation with Excessive Size Value"},{"id":"CWE-405","name":"Asymmetric Resource Consumption (Amplification)"},{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"description":"Net::IMAP implements Internet Message Access Protocol (IMAP) client functionality in Ruby. Prior to versions 0.5.7, 0.4.20, 0.3.9, and 0.2.5, there is a possibility for denial of service by memory exhaustion when net-imap reads server responses. At any time while the client is connected, a malicious server can send can send a \"literal\" byte count, which is automatically read by the client's receiver thread. The response reader immediately allocates memory for the number of bytes indicated by the server response. This should not be an issue when securely connecting to trusted IMAP servers that are well-behaved. It can affect insecure connections and buggy, untrusted, or compromised servers (for example, connecting to a user supplied hostname). This issue has been patched in versions 0.5.7, 0.4.20, 0.3.9, and 0.2.5.","ecosystems":["RubyGems"],"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":"net-imap rubygem vulnerable to possible DoS by memory exhaustion","id":"CVE-2025-43857","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"RubyGems","product":null,"products":[],"type":"denial_of_service","year":"2025"},"n_packages":8,"n_references":6,"next":{"headline":"YoutubeDLSharp allows command injection on windows system due to non sanitized arguments","id":"CVE-2025-43858"},"packages":[{"ecosystem":"RubyGems","fixed":["0.2.5"],"introduced":["0"],"last_affected":[],"package":"net-imap","purl":null,"source":"GHSA-j3g3-5qv5-52mj"},{"ecosystem":"RubyGems","fixed":["0.2.5"],"introduced":["0"],"last_affected":[],"package":"net-imap","purl":"pkg:gem/net-imap","source":"GHSA-j3g3-5qv5-52mj"},{"ecosystem":"RubyGems","fixed":["0.3.9"],"introduced":["0.3.0"],"last_affected":[],"package":"net-imap","purl":null,"source":"GHSA-j3g3-5qv5-52mj"},{"ecosystem":"RubyGems","fixed":["0.3.9"],"introduced":["0.3.0"],"last_affected":[],"package":"net-imap","purl":"pkg:gem/net-imap","source":"GHSA-j3g3-5qv5-52mj"},{"ecosystem":"RubyGems","fixed":["0.4.20"],"introduced":["0.4.0"],"last_affected":[],"package":"net-imap","purl":null,"source":"GHSA-j3g3-5qv5-52mj"},{"ecosystem":"RubyGems","fixed":["0.4.20"],"introduced":["0.4.0"],"last_affected":[],"package":"net-imap","purl":"pkg:gem/net-imap","source":"GHSA-j3g3-5qv5-52mj"},{"ecosystem":"RubyGems","fixed":["0.5.7"],"introduced":["0.5.0"],"last_affected":[],"package":"net-imap","purl":null,"source":"GHSA-j3g3-5qv5-52mj"},{"ecosystem":"RubyGems","fixed":["0.5.7"],"introduced":["0.5.0"],"last_affected":[],"package":"net-imap","purl":"pkg:gem/net-imap","source":"GHSA-j3g3-5qv5-52mj"}],"prev":{"headline":"immich allows account hijacking through oauth2","id":"CVE-2025-43856"},"products":["net-imap"],"published":"2025-04-28","related":[{"cvss_score":7.6,"headline":"net-imap vulnerable to STARTTLS stripping via invalid response timing","id":"CVE-2026-42246","kev_date_added":null,"published":"2026-05-09"},{"cvss_score":6,"headline":"net-imap: Denial of service via high iteration count for `SCRAM-*` authentication","id":"CVE-2026-42256","kev_date_added":null,"published":"2026-05-09"},{"cvss_score":5.8,"headline":"net-imap: Command Injection via \"raw\" arguments to multiple commands","id":"CVE-2026-42257","kev_date_added":null,"published":"2026-05-09"},{"cvss_score":5.8,"headline":"net-imap: Command Injection via unvalidated Symbol inputs","id":"CVE-2026-42258","kev_date_added":null,"published":"2026-05-09"},{"cvss_score":2.3,"headline":"net-imap: Quadratic complexity when reading response literals","id":"CVE-2026-42245","kev_date_added":null,"published":"2026-05-09"}],"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":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-28","vendors":["ruby"]},"summary":"A malicious IMAP server can cause memory exhaustion and denial of service in the Ruby net-imap client by sending large literal byte counts.","url":"https://insights.sbomify.com/CVE-2025-43857/"}