CVE-2025-0306Ruby: openssl: ruby marvin attack
A vulnerability was found in Ruby. The Ruby interpreter is vulnerable to the Marvin Attack. This attack allows the attacker to decrypt previously encrypted messages or forge signatures by exchanging a large number of messages with the vulnerable service.
What to do
Fixed builds are available from Debian: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | ruby3.2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | ruby3.0 | Not affected vulnerable_code_not_present | ||
| Debian 12 | ruby3.1 | Fixed | 3.1.2-8.4 | DEBIAN-CVE-2025-0306 |
| Red Hat Enterprise Linux 10 | ruby | Not affected | ||
| Red Hat Enterprise Linux 10 | ruby-bundled-gems | Not affected | ||
| Red Hat Enterprise Linux 10 | ruby-default-gems | Not affected | ||
| Red Hat Enterprise Linux 10 | ruby-devel | Not affected | ||
| Red Hat Enterprise Linux 10 | ruby-doc | Not affected | ||
| Red Hat Enterprise Linux 10 | ruby-libs | Not affected | ||
| Red Hat Enterprise Linux 10 | rubygem-bigdecimal | Not affected | ||
| Red Hat Enterprise Linux 10 | rubygem-bundler | Not affected | ||
| Red Hat Enterprise Linux 10 | rubygem-io-console | Not affected | ||
| Red Hat Enterprise Linux 10 | rubygem-irb | Not affected | ||
| Red Hat Enterprise Linux 10 | rubygem-json | Not affected | ||
| Red Hat Enterprise Linux 10 | rubygem-minitest | Not affected | ||
| Red Hat Enterprise Linux 10 | rubygem-power_assert | Not affected | ||
| Red Hat Enterprise Linux 10 | rubygem-psych | Not affected | ||
| Red Hat Enterprise Linux 10 | rubygem-racc | Not affected | ||
| Red Hat Enterprise Linux 10 | rubygem-rake | Not affected | ||
| Red Hat Enterprise Linux 10 | rubygem-rbs | Not affected | ||
| Red Hat Enterprise Linux 10 | rubygem-rdoc | Not affected | ||
| Red Hat Enterprise Linux 10 | rubygem-rexml | Not affected | ||
| Red Hat Enterprise Linux 10 | rubygem-rss | Not affected | ||
| Red Hat Enterprise Linux 10 | rubygem-test-unit | Not affected | ||
| Red Hat Enterprise Linux 10 | rubygem-typeprof | Not affected | ||
| Red Hat Enterprise Linux 10 | rubygems | Not affected | ||
| Red Hat Enterprise Linux 10 | rubygems-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | ruby | Not affected | ||
| Red Hat Enterprise Linux 9 | ruby-default-gems | Not affected | ||
| Red Hat Enterprise Linux 9 | ruby-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | ruby-doc | Not affected | ||
| Red Hat Enterprise Linux 9 | ruby-libs | Not affected | ||
| Red Hat Enterprise Linux 9 | rubygem-bigdecimal | Not affected | ||
| Red Hat Enterprise Linux 9 | rubygem-bundler | Not affected | ||
| Red Hat Enterprise Linux 9 | rubygem-io-console | Not affected | ||
| Red Hat Enterprise Linux 9 | rubygem-irb | Not affected | ||
| Red Hat Enterprise Linux 9 | rubygem-json | Not affected | ||
| Red Hat Enterprise Linux 9 | rubygem-minitest | Not affected | ||
| Red Hat Enterprise Linux 9 | rubygem-power_assert | Not affected | ||
| Red Hat Enterprise Linux 9 | rubygem-psych | Not affected | ||
| Red Hat Enterprise Linux 9 | rubygem-rake | Not affected | ||
| Red Hat Enterprise Linux 9 | rubygem-rbs | Not affected | ||
| Red Hat Enterprise Linux 9 | rubygem-rdoc | Not affected | ||
| Red Hat Enterprise Linux 9 | rubygem-rexml | Not affected | ||
| Red Hat Enterprise Linux 9 | rubygem-rss | Not affected | ||
| Red Hat Enterprise Linux 9 | rubygem-test-unit | Not affected | ||
| Red Hat Enterprise Linux 9 | rubygem-typeprof | Not affected | ||
| Red Hat Enterprise Linux 9 | rubygems | Not affected | ||
| Red Hat Enterprise Linux 9 | rubygems-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | ruby | Not affected | ||
| Red Hat Enterprise Linux 8 | ruby-bundled-gems | Not affected | ||
| Red Hat Enterprise Linux 8 | ruby-default-gems | Not affected | ||
| Red Hat Enterprise Linux 8 | ruby-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | ruby-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | ruby-irb | Not affected | ||
| Red Hat Enterprise Linux 8 | ruby-libs | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-abrt | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-abrt-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-bigdecimal | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-bson | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-bson-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-bundler | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-bundler-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-did_you_mean | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-io-console | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-irb | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-json | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-minitest | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-mongo | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-mongo-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-mysql2 | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-mysql2-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-net-telnet | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-openssl | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-pg | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-pg-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-power_assert | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-psych | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-racc | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-rake | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-rbs | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-rdoc | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-rexml | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-rss | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-test-unit | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-typeprof | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygem-xmlrpc | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygems | Not affected | ||
| Red Hat Enterprise Linux 8 | rubygems-devel | Not affected | ||
| Red Hat Enterprise Linux 7 | ruby | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | ruby-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | ruby-doc | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | ruby-irb | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | ruby-libs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | ruby-tcltk | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | rubygem-bigdecimal | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | rubygem-io-console | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | rubygem-json | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | rubygem-minitest | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | rubygem-psych | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | rubygem-rake | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | rubygem-rdoc | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | rubygems | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | rubygems-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | ruby | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | ruby-devel | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | ruby-docs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | ruby-irb | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | ruby-libs | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | ruby-rdoc | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | ruby-ri | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | ruby-static | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | ruby-tcltk | Will not fix Out of support scope |
What the vendor says
As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- Ruby: affected: all versions
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat Storage 3
Workaround: See the following possible mitigations for this flaw: * Do not use the methods with PKCS#1v1.5 padding in network contexts. Make sure that any calls that happen, will perform OAEP decryption only. Do not support PKCS#1v1.5 encryption padding at all. * Use Ruby with a version of OpenSSL that has the implicit rejection mechanism implemented.(https://github.com/openssl/openssl/pull/13817, https://github.com/openssl/openssl/commit/7fc67e0a33102aa47bbaa56533eeecb98c0450f7 included in 3.2.0, backported to RHEL-8)
References
- https://access.redhat.com/security/cve/CVE-2025-0306
- https://bugzilla.redhat.com/show_bug.cgi?id=2336100
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.