CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 10:31:04 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"ab178a653b93db89487f4af7ef17fc25"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com github.githubassets.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com marketplace-screenshots.githubusercontent.com/ copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=OMQ%2F%2FfjLslX2nfwhVFW%2B%2F7SEZiyv7W3txCLAlSk4r1lbBGVHfPK8ZHMsXWM%2B1CWA05o%2BSDnLptb6lJCZBUrnYSGPUaWIeSD4Yy1H5DFk%2F7DBjuIoIBeHKYtFZSxBdUqN01O2RyPcmOPW8ivv2hVao0sOqBToaIwly4j%2F8pRc%2BfH6ptEYjlduyy8CYr7FAnLohYjBL31NFVR2XPBCUCe5Y7f5HqBx%2BPRfD6adLielS65F0%2FP5qPtTQpjN2VQiUCvGHCEwgmKdsg7Dqn9ajY6Vow%3D%3D--qVr9Ny%2FdHQNcSpyY--Ewj8lYto4YgfvIgqtH%2F7KA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1305341905.1760178663; Path=/; Domain=github.com; Expires=Sun, 11 Oct 2026 10:31:03 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 11 Oct 2026 10:31:03 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: A2DE:2994BB:59FD0B:78F612:68EA31E7
Possible DoS by memory exhaustion in net/imap · Advisory · ruby/net-imap · GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 34
Possible DoS by memory exhaustion in net/imap
Moderate
Package
Affected versions
>= 0.5.0, <= 0.5.6
>= 0.4.0, <= 0.4.19
> 0.3.0, <= 0.3.8
> 0, <= 0.2.4
Patched versions
0.5.7
0.4.20
0.3.9
0.2.5
Description
Severity
Moderate
/ 10
CVSS v4 base metrics
Exploitability Metrics
Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User interaction
Passive
Vulnerable System Impact Metrics
Confidentiality
None
Integrity
None
Availability
High
Subsequent System Impact Metrics
Confidentiality
None
Integrity
None
Availability
None
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
CVE ID
CVE-2025-43857
Weaknesses
Weakness CWE-400
Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. Learn more on MITRE.Weakness CWE-405
Asymmetric Resource Consumption (Amplification)
The product does not properly control situations in which an adversary can cause the product to consume or produce excessive resources without requiring the adversary to invest equivalent work or otherwise prove authorization, i.e., the adversary's influence is asymmetric. Learn more on MITRE.Weakness CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor. Learn more on MITRE.Weakness CWE-789
Memory Allocation with Excessive Size Value
The product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated. Learn more on MITRE.Credits
-
Masamuneee Reporter
-
nevans Remediation developer
You can’t perform that action at this time.
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
). WhenNet::IMAP
receives a response containing a literal string, it callsIO#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 need to send any more data. There is no limit on the size of literals that will be accepted.Fix
Upgrade
Users should upgrade to
net-imap
0.5.7 or later. A configurablemax_response_size
limit has been added toNet::IMAP
's response reader. Themax_response_size
limit has also been backported tonet-imap
0.2.5, 0.3.9, and 0.4.20.To set a global value for
max_response_size
, users must upgrade tonet-imap
~> 0.4.20, or > 0.5.7.Configuration
To avoid backward compatibility issues for secure connections to trusted well-behaved servers, the default
max_response_size
fornet-imap
0.5.7 is very high (512MiB), and the defaultmax_response_size
fornet-imap
~> 0.4.20, ~> 0.3.9, and 0.2.5 isnil
(unlimited).When connecting to untrusted servers or using insecure connections, a much lower
max_response_size
should be used.Please Note:
max_response_size
only limits the size per response. It does not prevent a flood of individual responses and it does not limit how many unhandled responses may be stored on the responses hash. Users are responsible for adding response handlers to prune excessive unhandled responses.Compatibility with lower
max_response_size
A lower
max_response_size
may cause a few commands which legitimately return very large responses to raise an exception and close the connection. Themax_response_size
could be temporarily set to a higher value, but paginated or limited versions of commands should be used whenever possible. For example, to fetch message bodies:References