{"answers":{"affected":"4 open source packages ship an affected version, including net-imap.","exploited":"There is no known exploitation of CVE-2026-47240 in the wild and no public exploit code.","fix":"Upgrade net-imap to a fixed version for your release line: 0.5.15 or 0.6.4.1.","what":"CVE-2026-47240 is a medium-severity command injection vulnerability in ruby net-imap, published on 22 Jun 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-47240 and fix it if it is affected.\n\nWhat it is: CVE-2026-47240 is a medium-severity command injection vulnerability in ruby net-imap, published on 22 Jun 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2026-47240 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- net-imap (RubyGems): affected all versions; fixed in 0.5.15\n- net-imap (RubyGems): affected all versions; fixed in 0.5.15\n- net-imap (RubyGems): affected from 0.6.0; fixed in 0.6.4.1\n- net-imap (RubyGems): affected from 0.6.0; fixed in 0.6.4.1\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-2026-47240/ (Markdown: https://insights.sbomify.com/CVE-2026-47240/index.md)","id":"CVE-2026-47240","markdown":"https://insights.sbomify.com/CVE-2026-47240/index.md","name":"CVE-2026-47240","record":{"aliases":["ALPINE-CVE-2026-47240","AZL-91281","BELL-CVE-2026-47240","CLEANSTART-2026-EX55189","CLEANSTART-2026-WB90286","DEBIAN-CVE-2026-47240","ECHO-aed2-d0ee-eb0a","GHSA-8p34-64r3-mwg8","MINI-2vxc-4x6h-cj2x","MINI-35g3-2376-mr42","MINI-3c7g-3qfv-qrx5","MINI-63m3-rcqm-224w","MINI-7f2c-6f6r-hxmx","MINI-g3g9-72pv-x22m","MINI-jcmf-hh2h-wr2j","MINI-mp8q-q7cp-8366","MINI-mx77-7rcx-8wmg","MINI-p933-3m9m-964v","MINI-r499-82q3-wrrx","MINI-rf2j-693r-j37r","MINI-v6h4-qgqh-5vv3","MINI-wg6r-8q3g-m86g","MINI-wj69-p77w-8mx6","UBUNTU-CVE-2026-47240"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Ruby IMAP client library","requires_auth":"none","summary":"Attackers can inject arbitrary IMAP commands via non-synchronizing literals in the Ruby Net::IMAP library, potentially leading to code execution.","user_interaction":"required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":5.8,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-93","name":"Improper Neutralization of CRLF Sequences"},{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"}],"description":"Net::IMAP implements Internet Message Access Protocol (IMAP) client functionality in Ruby. Prior to 0.6.5 and 0.5.15, several Net::IMAP commands accept a \"raw data\" argument that is sent verbatim after validation to prevent command injection. However, if a server does not support non-synchronizing literals, it may still be possible to inject arbitrary IMAP commands inside non-synchronizing literals.  A server without support for non-synchronizing literals may interpret the \"+}\\r\\n\" as the end of a malformed command line and respond with a tagged BAD. In that case, the contents of the literal will be interpreted as one or more new pipelined commands, allowing a CRLF command injection attack to succeed. This affects criteria for #search and #uid_search; search_keys for #sort, #thread, #uid_sort, and #uid_thread; and attr for #fetch and #uid_fetch. This vulnerability is fixed in 0.6.5 and 0.5.15.","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: Command Injection via non-synchronizing literal in \"raw\" argument","id":"CVE-2026-47240","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"RubyGems","product":null,"products":[],"type":"command_injection","year":"2026"},"n_packages":4,"n_references":1,"next":{"headline":"Net::IMAP: Denial of Service via incomplete raw argument validation","id":"CVE-2026-47241"},"packages":[{"ecosystem":"RubyGems","fixed":["0.5.15"],"introduced":["0"],"last_affected":[],"package":"net-imap","purl":null,"source":"GHSA-8p34-64r3-mwg8"},{"ecosystem":"RubyGems","fixed":["0.5.15"],"introduced":["0"],"last_affected":[],"package":"net-imap","purl":"pkg:gem/net-imap","source":"GHSA-8p34-64r3-mwg8"},{"ecosystem":"RubyGems","fixed":["0.6.4.1"],"introduced":["0.6.0"],"last_affected":[],"package":"net-imap","purl":null,"source":"GHSA-8p34-64r3-mwg8"},{"ecosystem":"RubyGems","fixed":["0.6.4.1"],"introduced":["0.6.0"],"last_affected":[],"package":"net-imap","purl":"pkg:gem/net-imap","source":"GHSA-8p34-64r3-mwg8"}],"prev":{"headline":"ClipBucket: IDOR in videos subtitle editor","id":"CVE-2026-47238"},"products":["net-imap"],"published":"2026-06-22","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":"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":"2026-06-23","vendors":["ruby"]},"summary":"Attackers can inject arbitrary IMAP commands via non-synchronizing literals in the Ruby Net::IMAP library, potentially leading to code execution.","url":"https://insights.sbomify.com/CVE-2026-47240/"}