-
-
Notifications
You must be signed in to change notification settings - Fork 242
Expand file tree
/
Copy pathCVE-2026-47242.yml
More file actions
75 lines (61 loc) · 2.79 KB
/
Copy pathCVE-2026-47242.yml
File metadata and controls
75 lines (61 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
gem: net-imap
cve: 2026-47242
ghsa: 46q3-7gv7-qmgg
url: https://www.cve.org/CVERecord?id=CVE-2026-47242
title: 'Net::IMAP: Command Injection via ID command argument'
date: 2026-06-09
description: |
### Summary
Two `Net::IMAP` commands, `#id` and `#enable`, do not validate their
arguments. Arguments to either command could be used by an attacker
to inject arbitrary IMAP commands.
Please note that passing untrusted inputs to these commands is usually
inappropriate and expected to be uncommon.
### Details
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.
### Impact
This is expected to impact very few users: use of untrusted user input
for either command is expected to be very uncommon.
The documentation for `#enable` explicitly warns that using any arguments
that are not in the explicitly supported list may result in undocumented
behavior. Using arbitrary untrusted user input for `#enable` will always
be inappropriate.
Although client ID field values will most commonly be static and hardcoded,
dynamic input sources may be used. For example, client ID fields may be
set by configuration or version numbers. Using untrusted user inputs
for client ID fields is expected to be uncommon. But any untrusted
inputs to client ID can trivially exploit this vulnerability.
Untrusted inputs to either command may include a CRLF sequence followed
by a new IMAP command (like DELETE mailbox). Although this does not
directly enable data exfiltration, it could be combined with other
attack vectors or knowledge of the target system's attributes,
e.g.: shared mail folders or the application's installed response handlers.
### Mitigation
Update to a version of `net-imap` which validates `#id` and `#enable`
arguments.
Untrusted inputs should _never_ be used for `#enable` arguments.
If `net-imap` cannot be upgraded:
* do not use untrusted inputs for client ID field values
* or add validation that client ID field values must not contain
any CR or LF bytes.
cvss_v3: 4.3
cvss_v4: 5.8
patched_versions:
- "~> 0.5.15"
- ">= 0.6.4.1"
related:
url:
- https://www.cve.org/CVERecord?id=CVE-2026-47242
- https://rubygems.org/gems/net-imap/versions/0.6.4.1
- https://github.com/ruby/net-imap/releases/tag/v0.6.4.1
- https://github.com/ruby/net-imap/security/advisories/GHSA-46q3-7gv7-qmgg
- https://github.com/advisories/GHSA-46q3-7gv7-qmgg
notes: |
- cve is reserved
- cvss_v3 - in GHSA ; No cvss_v2, cvss_v4 values.