CVE-2026-47242
Net::IMAP: Command Injection via ID command argument
Also known as GHSA-46q3-7gv7-qmgg
Mitigation
- Upgrade net-imap to one of 0.6.4.1, 0.5.15 (or later in the same release line).
Who should check
- Projects that depend on RubyGems package net-imap (>= 0.6.0, < 0.6.4.1)
- Anyone running ruby net-imap >= 0.6.0, < 0.6.4.1; < 0.5.15
Vulnerability facts
- Affected
- net-imap >= 0.6.0, < 0.6.4.1
- Fixed in
- 0.6.4.1, 0.5.15
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 5.8 (v4.0, CNA)CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:NOpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Attack requirements: Present
- Privileges required: None
- User interaction: Passive
- Confidentiality impact: None
- Integrity impact: High
- Availability impact: Low
- Confidentiality impact on other systems: None
- Integrity impact on other systems: None
- Availability impact on other systems: None
- EPSS
- 0.18% chance of exploitation in 30 days (percentile 5, 2026-11-26)
- CWE
- CWE-77, CWE-93
- Modified
Description
Net::IMAP implements Internet Message Access Protocol (IMAP) client functionality in Ruby. Prior to 0.6.5 and 0.5.15, when Net::IMAP#id is called with a hash argument, although the ID field value strings are correctly quoted (escaping quoted specials), they were not validated to prohibit CRLF sequences. While Net::IMAP#enable does process its arguments for aliases, it does not validate them as valid atoms (or as a list of valid atoms). The #to_s value is sent verbatim. Arguments to either command could be used by an attacker to inject arbitrary IMAP commands. This vulnerability is fixed in 0.6.5 and 0.5.15.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-47242. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-47242.md Affected: net-imap >= 0.6.0, < 0.6.4.1 Fixed in: 0.6.4.1, 0.5.15 Steps: 1. Search this machine and project for net-imap (RubyGems), ruby net-imap: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2026-47242 being exploited?
There is no confirmed exploitation: CVE-2026-47242 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-47242?
Medium: CVSS 5.8 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2026-47242?
net-imap >= 0.6.0, < 0.6.4.1.
Is there a fix for CVE-2026-47242?
Yes. Fixed in 0.6.4.1, 0.5.15. Upgrade net-imap to one of 0.6.4.1, 0.5.15 (or later in the same release line).
How do I check if I'm affected by CVE-2026-47242?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.