Skip to content

← Actionable
Medium, CVSS 6.0

net-imap rubygem vulnerable to possible DoS by memory exhaustion

CVE-2025-43857GHSA-j3g3-5qv5-52mj

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (net-imap 0.5.7, 0.4.20, 0.3.9, 0.2.5), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • RubyGems net-imap

    Affected
    >= 0.5.0, <= 0.5.6>= 0.4.0, <= 0.4.19>= 0.3.0, <= 0.3.8<= 0.2.4
    Fixed in
    0.4.20, 0.5.7, 0.2.5, 0.3.9

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS 4.0
6.0 · 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 · score source
EPSS
  • CVE-2025-43857: 0.49% estimated exploitation activity in the next 30 days; percentile 42.49 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary 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). Details The IMAP protocol allows "literal" strings to be sent in responses, prefixed with their size in curly braces (e.g. {1234567890}\r\n). When Net::IMAP receives a response containing a literal string, it calls IO#read with that size. When called with a size, IO#read immediately allocates memory to buffer the entire string before processing continues. The server does not…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-j3g3-5qv5-52mj

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2025-43857

Advisory: net-imap rubygem vulnerable to possible DoS by memory exhaustion
IDs: CVE-2025-43857, GHSA-j3g3-5qv5-52mj
Record: https://patchnext.com/advisories/cve-2025-43857 (revision 1, source checked 26 Oct 2026, 15:51 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 6.0)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: net-imap 0.5.7, 0.4.20, 0.3.9, 0.2.5. A vendor fix does not mean a deployment is fixed.

## Affected components
- RubyGems net-imap: affected >= 0.5.0, <= 0.5.6; >= 0.4.0, <= 0.4.19; >= 0.3.0, <= 0.3.8; <= 0.2.4; fixed in 0.4.20, 0.5.7, 0.2.5, 0.3.9

## Suggested inspection (read-only)
- RubyGems net-imap: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on net-imap.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-j3g3-5qv5-52mj (GitHub-reviewed advisory GHSA-j3g3-5qv5-52mj lists affected ranges: RubyGems net-imap >=0.5.0 =0.4.0 =0.3.0 =0 <=0.2.4)

Commands are suggestions: review each one before running it.

Loading voting…