CVE-2026-47241: Ruby Net::IMAP denial of service via incomplete raw argument validation

CVE-2026-47241 · Severity: medium · CVSS 4 · Published 2026-06-22

The Ruby Net::IMAP library, which allows applications to communicate with email servers, contains a flaw in how it handles certain command arguments. An attacker providing specially crafted input can cause the application to hang or crash by tricking the email server into misinterpreting commands. This results in a denial-of-service condition where the application becomes unresponsive or fails to process email-related tasks.

Technologies: net-imap (RubyGems). Vendors: RubyGems.

Quick answers

Is CVE-2026-47241 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-47241 being exploited in the wild.
How severe is CVE-2026-47241?
Medium severity, with a CVSS score of 4, published 22 June 2026.
Which products and versions are affected?
net-imap (RubyGems) ECOSYSTEM:introduced=0.6.0,fixed=0.6.4.1.
Is there a fix for CVE-2026-47241?
Yes. net-imap (RubyGems): upgrade to 0.6.4.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-47241 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-47241?
Check whether you run net-imap (RubyGems) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • net-imap (RubyGems): upgrade to 0.6.4.1 or later
    bundle update net-imap

Technical details

Net::IMAP fails to properly validate trailing literal-continuation markers in raw string arguments for commands such as SEARCH, FETCH, and SORT. The validation regex incorrectly allows strings ending in '{0}' or '{0+}', which the IMAP server interprets as a literal prefix. This causes the server to absorb the subsequent command as part of the current command's arguments. Consequently, the first command fails with a BadResponseError while the second command (often from a different thread) hangs indefinitely until the connection is closed. This vulnerability is fixed in versions 0.6.4.1 and 0.5.15.

Affected products

  • ruby net-imap >= 0.6.0, < 0.6.4.1; < 0.5.15

Identifiers

  • CVE-2026-47241
  • GHSA-c4fp-cxrr-mj66

Timeline

  • 2026-06-09: advisory: GitHub Security Advisory published
  • 2026-06-22: disclosed: CVE published to NVD

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.