CVE-2026-47240
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedNet::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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · moderate confidenceNet::IMAP Ruby library before 0.6.5 and 0.5.15 contains a CRLF command injection vulnerability when servers do not support non-synchronizing literals. Attackers can inject arbitrary IMAP commands by crafting search_keys or fetch attributes that, when the server rejects a malformed command, cause the literal contents to be interpreted as pipelined commands. Affected methods include search, uid_search, sort, thread, uid_sort, uid_thread, fetch, and uid_fetch.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Local
- Complexity
- Low
- Privileges
- None
- Authentication
- X
- User interaction
- P
- Scope
- X
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify Net::IMAP library versionRun `gem list net-imap` or inspect the Gemfile.lock to find the installed version of the net-imap gemAffected if The installed version is lower than 0.5.15 or is between 0.5.15 and 0.6.5 (exclusive)
-
Locate Net::IMAP usage in codebaseSearch source code for require 'net/imap' or require 'net-imap' statements to identify files using the libraryAffected if The application uses Net::IMAP for IMAP operations
-
Identify affected method callsSearch for invocations of search, uid_search, sort, thread, uid_sort, uid_thread, fetch, or uid_fetch methods on Net::IMAP objectsAffected if Any of these methods are called with data that could contain user-controlled input
-
Verify input sanitization on vulnerable methodsReview the code handling search_keys and fetch attributes passed to the affected methods to determine if user input is validated or sanitized before useAffected if User-supplied input is passed directly to these methods without sanitization of CRLF sequences
A system is affected if it uses a Net::IMAP version below 0.5.15 or between 0.5.15 and 0.6.5, and passes unsanitized user input to search, uid_search, sort, thread, uid_sort, uid_thread, fetch, or uid_fetch methods.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpgrade Net::IMAP to version 0.6.5 or 0.5.15. Additionally, sanitize all user-supplied input passed to these IMAP methods to prevent malicious payload injection regardless of server configuration.
net-imap version 0.6.5 (or 0.5.15 for older Ruby support)
- Check current Net::IMAP version in use by running `gem list net-imap` or checking your Gemfile
- Update to the fixed version by running `gem install net-imap -v 0.6.5` or adding `gem 'net-imap', '~> 0.6.5'` to your Gemfile
- If using Bundler, run `bundle update net-imap` to apply the update
- Verify the update was successful by running `gem list net-imap` and confirming version 0.6.5 or 0.5.15 is installed
- Test that IMAP functionality (search, uid_search, sort, thread, fetch, uid_fetch operations) continues to work correctly
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation4.0 h
- Testing4.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,968.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-47240 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-47240 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data