Description
Net::SMTP in Ruby before 2.4.0 is vulnerable to SMTP command injection via CRLF sequences in a RCPT TO or MAIL FROM command, as demonstrated by CRLF sequences immediately before and after a DATA substring.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 9 | ruby2.3 | 2.3.3-1+deb9u1 | DSA-3966-1 |
| Debian 8 | ruby2.1 | 2.1.5-2+deb8u4 | DLA-1421-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | ruby2.3 | 2.3.1-2~16.04.2 | USN-3365-1 |
| Ubuntu 14.04 LTS | ruby1.9.1 | 1.9.3.484-2ubuntu1.3 | USN-3365-1 |
| Ubuntu 14.04 LTS | ruby2.0 | 2.0.0.484-1ubuntu2.4 | USN-3365-1 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Hardened Images 1 | ruby3.3 +5 | 3.3.10-23.1.hum1 | RHSA-2026:7305 |
| Red Hat Hardened Images 1 | ruby3.4 +5 | 3.4.8-31.1.hum1 | RHSA-2026:7307 |
| Red Hat Hardened Images 1 | ruby4.0 +5 | 4.0.0-33.3.hum1 | RHSA-2026:8838 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 12 SP5 | ruby2.1 | 2.1.9-19.3.2 | SUSE-SU-2020:1570-1 |
| SLES 12 SP4 | ruby2.1 | 2.1.9-19.3.2 | SUSE-SU-2020:1570-1 |
| SLES 12 SP3 | ruby2.1 | 2.1.9-19.3.2 | SUSE-SU-2020:1570-1 |
| SLES 12 SP2 | ruby2.1 | 2.1.9-19.3.2 | SUSE-SU-2020:1570-1 |
| SLES 12 SP2 | yast2-ruby-bindings | 3.1.53-9.8.1 | SUSE-SU-2020:1570-1 |
Show 9 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 12 SP5 | ruby2.1 | 2.1.9-19.3.2 | SUSE-SU-2020:1570-1 |
| SLES for SAP 12 SP4 | ruby2.1 | 2.1.9-19.3.2 | SUSE-SU-2020:1570-1 |
| SLES for SAP 12 SP3 | ruby2.1 | 2.1.9-19.3.2 | SUSE-SU-2020:1570-1 |
| SLES for SAP 12 SP2 | ruby2.1 | 2.1.9-19.3.2 | SUSE-SU-2020:1570-1 |
| SLES for SAP 12 SP2 | yast2-ruby-bindings | 3.1.53-9.8.1 | SUSE-SU-2020:1570-1 |
| SUSE OpenStack Cloud Crowbar 8 | ruby2.1 | 2.1.9-19.3.2 | SUSE-SU-2020:1570-1 |
| SUSE OpenStack Cloud 8 | ruby2.1 | 2.1.9-19.3.2 | SUSE-SU-2020:1570-1 |
| SUSE OpenStack Cloud 7 | ruby2.1 | 2.1.9-19.3.2 | SUSE-SU-2020:1570-1 |
| SUSE OpenStack Cloud 7 | yast2-ruby-bindings | 3.1.53-9.8.1 | SUSE-SU-2020:1570-1 |
| SUSE HPE Helion OpenStack 8 | ruby2.1 | 2.1.9-19.3.2 | SUSE-SU-2020:1570-1 |
| SUSE Enterprise Storage 5 | ruby2.1 | 2.1.9-19.3.2 | SUSE-SU-2020:1570-1 |
Advisories 8
- RHSA-2026:7305 Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update Red Hat Security Advisories (RHSA) · Oct 6, 2026
- RHSA-2026:8838 Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update Red Hat Security Advisories (RHSA) · Oct 6, 2026
- RHSA-2026:7307 Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update Red Hat Security Advisories (RHSA) · Oct 6, 2026
- WID-SEC-2026-1421 Ruby: Mehrere Schwachstellen BSI CERT-Bund (WID) · May 7, 2026
- USN-3365-1 ruby1.9.1, ruby2.0, ruby2.3 vulnerabilities Ubuntu Security Notices (USN) · Apr 27, 2026
- DSA-3966-1 ruby2.3 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-1421-1 ruby2.1 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- SUSE-SU-2020:1570-1 Security update for ruby2.1 SUSE / openSUSE Security Updates · Feb 4, 2026
References
- DSA-3966 vendor-advisory
- https://hackerone.com/reports/137631
- [debian-lts-announce] 20180714 [SECURITY] [DLA 1421-1] ruby2.1 security update mailing-list
- https://github.com/rubysec/ruby-advisory-db/issues/215
- https://github.com/ruby/ruby/commit/0827a7e52ba3d957a634b063bf5a391239b9ffee
- http://www.mbsd.jp/Whitepaper/smtpi.pdf