CVE-2016-7798
OpenSSL gem for Ruby using inadequate encryption strength
The openssl gem for Ruby uses the same initialization vector (IV) in GCM Mode (aes-*-gcm) when the IV is set before the key, which makes it easier for context-dependent attackers to bypass the encryption protection mechanism.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
7.5
The openssl gem for Ruby uses the same initialization vector (IV) in GCM Mode (aes-*-gcm) when the IV is set before the key, which makes it easier for context-dependent attackers to bypass the encryption protection mechanism.
- Record
CVE-2016-7798- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:P/I:N/A:N - Weakness
- CWE-326
- Updated
- 2026-11-02
CVE List No score
The openssl gem for Ruby uses the same initialization vector (IV) in GCM Mode (aes-*-gcm) when the IV is set before the key, which makes it easier for context-dependent attackers to bypass the encryption protection mechanism.
- Record
CVE-2016-7798- Updated
- 2026-11-02
EUVDEUVD-2017-0176 No score
The openssl gem for Ruby uses the same initialization vector (IV) in GCM Mode (aes-*-gcm) when the IV is set before the key, which makes it easier for context-dependent attackers to bypass the encryption protection mechanism.
- Record
EUVD-2017-0176- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-6h88-qjpv-p32m
7.5
OpenSSL gem for Ruby using inadequate encryption strength
The OpenSSL gem for Ruby uses the same initialization vector (IV) in GCM Mode (aes-*-gcm) when the IV is set before the key, which makes it easier for context-dependent attackers to bypass the encryption protection mechanism.
- Record
GHSA-6h88-qjpv-p32m- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-326
- Updated
- 2026-11-02
OSV
7.5
The openssl gem for Ruby uses the same initialization vector (IV) in GCM Mode (aes-*-gcm) when the IV is set before the key, which makes it easier for context-dependent attackers to bypass the encryption protection mechanism.
- Record
CVE-2016-7798- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2016-7798
7.5
The openssl gem for Ruby uses the same initialization vector (IV) in GCM Mode (aes-*-gcm) when the IV is set before the key, which makes it easier for context-dependent attackers to bypass the encryption protection mechanism.
- Record
DEBIAN-CVE-2016-7798- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
Show 5 moreShow less
OSVGHSA-6h88-qjpv-p32m
7.5
OpenSSL gem for Ruby using inadequate encryption strength
The OpenSSL gem for Ruby uses the same initialization vector (IV) in GCM Mode (aes-*-gcm) when the IV is set before the key, which makes it easier for context-dependent attackers to bypass the encryption protection mechanism.
- Record
GHSA-6h88-qjpv-p32m- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-326
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2016-7798
7.5
The openssl gem for Ruby uses the same initialization vector (IV) in GCM Mode (aes-*-gcm) when the IV is set before the key, which makes it easier for context-dependent attackers to bypass the encryption protection mechanism.
- Record
UBUNTU-CVE-2016-7798- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVMGASA-2016-0342 No score
Updated ruby packages fix a security vulnerability
A bug in openssl module caused using an all 0 IV for AES-GCM ciphers in some cases (when setting a key, an iv, and then setting a key a again (CVE-2016-779
- Record
MGASA-2016-0342- Updated
- 2026-11-02
OSVSUSE-SU-2020:1570-1 No score
Security update for ruby2.1
This update for ruby2.1 fixes the following issues:
Security issues fixed:
- CVE-2015-9096: Fixed an SMTP command injection via CRLFsequences in a RCPT TO or MAIL FROM command (bsc#1043983).
- CVE-2016-7798: Fixed an IV Reuse in GCM Mode (bsc#1055265).
- CVE-2017-0898: Fixed a buffer underrun vulnerability in Kernel.sprintf (bsc#1058755).
- CVE-2017-0899: Fixed an issue with malicious gem specifications, insufficient sanitation when printing gem specifications could have included terminal characters (bsc#1056286).
- CVE-2017-0900: Fixed an issue with malicious gem specifications, the query command could have led to a denial of service attack against clients (bsc#1056286).
- CVE-2017-0901: Fixed an issue with malicious gem specifications, potentially overwriting arbitrary files on the client system (bsc#1056286).
- CVE-2017-0902: Fixed an issue with malicious gem specifications, that could have enabled MITM attacks against clients (bsc#1056286).
- CVE-2017-0903: Fixed an unsafe object deserialization vulnerability (bsc#1062452).
- CVE-2017-9228: Fixed a heap out-of-bounds write in bitset_set_range() during regex compilation (bsc#1069607).
- CVE-2017-9229: Fixed an invalid pointer dereference in left_adjust_char_head() in oniguruma (bsc#1069632).
- CVE-2017-10784: Fixed an escape sequence injection vulnerability in the Basic authentication of WEBrick (bsc#1058754).
- CVE-2017-14033: Fixed a buffer underrun vulnerability in OpenSSL ASN1 decode (bsc#1058757).
- CVE-2017-14064: Fixed an arbitrary memory exposure during a JSON.generate call (bsc#1056782).
- CVE-2017-17405: Fixed a command injection vulnerability in Net::FTP (bsc#1073002).
- CVE-2017-17742: Fixed an HTTP response splitting issue in WEBrick (bsc#1087434).
- CVE-2017-17790: Fixed a command injection in lib/resolv.rb:lazy_initialize() (bsc#1078782).
- CVE-2018-6914: Fixed an unintentional file and directory creation with directory traversal in tempfile and tmpdir (bsc#1087441).
- CVE-2018-8777: Fixed a potential DoS caused by large requests in WEBrick (bsc#1087436).
- CVE-2018-8778: Fixed a buffer under-read in String#unpack (bsc#1087433).
- CVE-2018-8779: Fixed an unintentional socket creation by poisoned NUL byte in UNIXServer and UNIXSocket (bsc#1087440).
- CVE-2018-8780: Fixed an unintentional directory traversal by poisoned NUL byte in Dir (bsc#1087437).
- CVE-2018-16395: Fixed an issue with OpenSSL::X509::Name equality checking (bsc#1112530).
- CVE-2018-16396: Fixed an issue with tainted string handling, where the flag was not propagated in Array#pack and String#unpack with some directives (bsc#1112532).
- CVE-2018-1000073: Fixed a path traversal issue (bsc#1082007).
- CVE-2018-1000074: Fixed an unsafe object deserialization vulnerability in gem owner, allowing arbitrary code execution with specially crafted YAML (bsc#1082008).
- CVE-2018-1000075: Fixed an infinite loop vulnerability due to negative size in tar header causes Denial of Service (bsc#1082014).
- CVE-2018-1000076: Fixed an improper verification of signatures in tarballs (bsc#1082009).
- CVE-2018-1000077: Fixed an improper URL validation in the homepage attribute of ruby gems (bsc#1082010).
- CVE-2018-1000078: Fixed a XSS vulnerability in the homepage attribute when displayed via gem server (bsc#1082011).
- CVE-2018-1000079: Fixed a path traversal issue during gem installation allows to write to arbitrary filesystem locations (bsc#1082058).
- CVE-2019-8320: Fixed a directory traversal issue when decompressing tar files (bsc#1130627).
- CVE-2019-8321: Fixed an escape sequence injection vulnerability in verbose (bsc#1130623).
- CVE-2019-8322: Fixed an escape sequence injection vulnerability in gem owner (bsc#1130622).
- CVE-2019-8323: Fixed an escape sequence injection vulnerability in API response handling (bsc#1130620).
- CVE-2019-8324: Fixed an issue with malicious gems that may have led to arbitrary code execution (bsc#1130617).
- CVE-2019-8325: Fixed an escape sequence injection vulnerability in…
- Record
SUSE-SU-2020:1570-1- Updated
- 2026-11-02
OSVUSN-3365-1 No score
ruby1.9.1, ruby2.0, ruby2.3 vulnerabilities
It was discovered that Ruby DL::dlopen incorrectly handled opening libraries. An attacker could possibly use this issue to open libraries with tainted names. This issue only applied to Ubuntu 14.04 LTS. (CVE-2009-5147)
Tony Arcieri, Jeffrey Walton, and Steffan Ullrich discovered that the Ruby OpenSSL extension incorrectly handled hostname wildcard matching. This issue only applied to Ubuntu 14.04 LTS. (CVE-2015-1855)
Christian Hofstaedtler discovered that Ruby Fiddle::Handle incorrectly handled certain crafted strings. An attacker could use this issue to cause a denial of service, or possibly execute arbitrary code. This issue only applied to Ubuntu 14.04 LTS. (CVE-2015-7551)
It was discovered that Ruby Net::SMTP incorrectly handled CRLF sequences. A remote attacker could possibly use this issue to inject SMTP commands. (CVE-2015-9096)
Marcin Noga discovered that Ruby incorrectly handled certain arguments in a TclTkIp class method. An attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 14.04 LTS. (CVE-2016-2337)
It was discovered that Ruby Fiddle::Function.new incorrectly handled certain arguments. An attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 14.04 LTS. (CVE-2016-2339)
It was discovered that Ruby incorrectly handled the initialization vector (IV) in GCM mode. An attacker could possibly use this issue to bypass encryption. (CVE-2016-7798)
- Record
USN-3365-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
opensslRubyGems |
before 2.0.0 | 2.0.0 |
ruby-attr-encryptedDebian:12 |
before 3.0.1-2 | 3.0.1-2 |
ruby-attr-encryptedDebian:13 |
before 3.0.1-2 | 3.0.1-2 |
ruby-attr-encryptedDebian:14 |
before 3.0.1-2 | 3.0.1-2 |
ruby-encryptorDebian:12 |
before 3.0.0-1 | 3.0.0-1 |
ruby-encryptorDebian:13 |
before 3.0.0-1 | 3.0.0-1 |
ruby-encryptorDebian:14 |
before 3.0.0-1 | 3.0.0-1 |
ruby2.1Debian:8 |
before 2.1.5-2+deb8u4, plus listed versions 2.1.5-22.1.5-2+deb8u12.1.5-2+deb8u22.1.5-2+deb8u3 |
2.1.5-2+deb8u4 |
ruby2.3Debian:9 |
before 2.3.3-1+deb9u1, plus listed versions 2.3.3-1 |
2.3.3-1+deb9u1 |
opensslRubyGems |
before 2.0.0, plus listed versions 2.0.0.beta.12.0.0.beta.2 |
2.0.0 |
Show 27 moreShow less
| Package | Affected | Fixed |
|---|---|---|
rubyMageia:5 |
before 2.0.0.p648-1.1.mga5 | 2.0.0.p648-1.1.mga5 |
ruby2.1SUSE:HPE Helion OpenStack 8 |
before 2.1.9-19.3.2 | 2.1.9-19.3.2 |
ruby2.1SUSE:OpenStack Cloud 7 |
before 2.1.9-19.3.2 | 2.1.9-19.3.2 |
yast2-ruby-bindingsSUSE:OpenStack Cloud 7 |
before 3.1.53-9.8.1 | 3.1.53-9.8.1 |
ruby2.1SUSE:OpenStack Cloud 8 |
before 2.1.9-19.3.2 | 2.1.9-19.3.2 |
ruby2.1SUSE:OpenStack Cloud Crowbar 8 |
before 2.1.9-19.3.2 | 2.1.9-19.3.2 |
ruby2.1SUSE:Linux Enterprise Server for SAP Applications 12 SP2 |
before 2.1.9-19.3.2 | 2.1.9-19.3.2 |
yast2-ruby-bindingsSUSE:Linux Enterprise Server for SAP Applications 12 SP2 |
before 3.1.53-9.8.1 | 3.1.53-9.8.1 |
ruby2.1SUSE:Linux Enterprise Server for SAP Applications 12 SP3 |
before 2.1.9-19.3.2 | 2.1.9-19.3.2 |
ruby2.1SUSE:Linux Enterprise Software Development Kit 12 SP4 |
before 2.1.9-19.3.2 | 2.1.9-19.3.2 |
ruby2.1SUSE:Linux Enterprise Software Development Kit 12 SP5 |
before 2.1.9-19.3.2 | 2.1.9-19.3.2 |
ruby2.1SUSE:Linux Enterprise Server 12 SP2-LTSS |
before 2.1.9-19.3.2 | 2.1.9-19.3.2 |
yast2-ruby-bindingsSUSE:Linux Enterprise Server 12 SP2-LTSS |
before 3.1.53-9.8.1 | 3.1.53-9.8.1 |
ruby2.1SUSE:Linux Enterprise Server 12 SP2-BCL |
before 2.1.9-19.3.2 | 2.1.9-19.3.2 |
yast2-ruby-bindingsSUSE:Linux Enterprise Server 12 SP2-BCL |
before 3.1.53-9.8.1 | 3.1.53-9.8.1 |
ruby2.1SUSE:Linux Enterprise Server 12 SP3-LTSS |
before 2.1.9-19.3.2 | 2.1.9-19.3.2 |
ruby2.1SUSE:Linux Enterprise Server 12 SP3-BCL |
before 2.1.9-19.3.2 | 2.1.9-19.3.2 |
ruby2.1SUSE:Linux Enterprise Server 12 SP4 |
before 2.1.9-19.3.2 | 2.1.9-19.3.2 |
ruby2.1SUSE:Linux Enterprise Server for SAP Applications 12 SP4 |
before 2.1.9-19.3.2 | 2.1.9-19.3.2 |
ruby2.1SUSE:Linux Enterprise Server 12 SP5 |
before 2.1.9-19.3.2 | 2.1.9-19.3.2 |
ruby2.1SUSE:Linux Enterprise Server for SAP Applications 12 SP5 |
before 2.1.9-19.3.2 | 2.1.9-19.3.2 |
ruby2.1SUSE:Enterprise Storage 5 |
before 2.1.9-19.3.2 | 2.1.9-19.3.2 |
ruby1.9.1Ubuntu:14.04:LTS |
before 1.9.3.484-2ubuntu1.3, plus listed versions 1.9.3.194-8.1ubuntu21.9.3.448-1ubuntu11.9.3.448-1ubuntu21.9.3.484-1ubuntu11.9.3.484-1ubuntu21.9.3.484-2ubuntu11.9.3.484-2ubuntu1.11.9.3.484-2ubuntu1.2 |
1.9.3.484-2ubuntu1.3 |
ruby2.0Ubuntu:14.04:LTS |
before 2.0.0.484-1ubuntu2.4, plus listed versions 2.0.0.299-22.0.0.343-12.0.0.343-1ubuntu12.0.0.353-12.0.0.353-1ubuntu1 Show 4 moreShow less2.0.0.484-1ubuntu12.0.0.484-1ubuntu22.0.0.484-1ubuntu2.12.0.0.484-1ubuntu2.2 |
2.0.0.484-1ubuntu2.4 |
ruby2.3Ubuntu:16.04:LTS |
before 2.3.1-2~16.04.2, plus listed versions 2.3.0-12.3.0-22.3.0-4ubuntu22.3.0-4ubuntu32.3.0-5ubuntu12.3.1-2~16.04 |
2.3.1-2~16.04.2 |
ruby-attr-encryptedUbuntu:16.04:LTS |
All versions, plus listed versions 1.3.4-1 |
None known |
ruby-encryptorUbuntu:16.04:LTS |
All versions, plus listed versions 1.3.0-12.0.0-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2016-7798 is a high vulnerability (CVSS 7.5) in Ruby-lang Openssl, published October 13, 2016. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 3.17%, the 88th percentile. Fixed in openssl 2.0.0.
References
openwall.com/lists/oss-security/2016/09/30/6
debian.org/security/2017/dsa-3966
github.com/ruby/openssl/commit/8108e0a6db133f3375608303fdd2083eb5115062
openwall.com/lists/oss-security/2016/10/01/2
lists.debian.org/debian-lts-announce/2018/07/msg00012.html
openwall.com/lists/oss-security/2016/09/19/9
Show 104 moreShow less
securityfocus.com/bid/93031
github.com/ruby/openssl/issues/49
nvd.nist.gov/vuln/detail/CVE-2016-7798
github.com/advisories/GHSA-6h88-qjpv-p32m
github.com/rubysec/ruby-advisory-db/blob/master/gems/openssl/CVE-2016-7798.yml
web.archive.org/web/20210121065227/https://www.securityfocus.com/bid/93031/info
security-tracker.debian.org/tracker/CVE-2016-7798
github.com/ruby/openssl
advisories.mageia.org/MGASA-2016-0342.html
bugs.mageia.org/show_bug.cgi?id=19501
suse.com/support/update/announcement/2020/suse-su-20201570-1
bugzilla.suse.com/1043983
bugzilla.suse.com/1048072
bugzilla.suse.com/1055265
bugzilla.suse.com/1056286
bugzilla.suse.com/1056782
bugzilla.suse.com/1058754
bugzilla.suse.com/1058755
bugzilla.suse.com/1058757
bugzilla.suse.com/1062452
bugzilla.suse.com/1069607
bugzilla.suse.com/1069632
bugzilla.suse.com/1073002
bugzilla.suse.com/1078782
bugzilla.suse.com/1082007
bugzilla.suse.com/1082008
bugzilla.suse.com/1082009
bugzilla.suse.com/1082010
bugzilla.suse.com/1082011
bugzilla.suse.com/1082014
bugzilla.suse.com/1082058
bugzilla.suse.com/1087433
bugzilla.suse.com/1087434
bugzilla.suse.com/1087436
bugzilla.suse.com/1087437
bugzilla.suse.com/1087440
bugzilla.suse.com/1087441
bugzilla.suse.com/1112530
bugzilla.suse.com/1112532
bugzilla.suse.com/1130611
bugzilla.suse.com/1130617
bugzilla.suse.com/1130620
bugzilla.suse.com/1130622
bugzilla.suse.com/1130623
bugzilla.suse.com/1130627
bugzilla.suse.com/1152990
bugzilla.suse.com/1152992
bugzilla.suse.com/1152994
bugzilla.suse.com/1152995
bugzilla.suse.com/1171517
bugzilla.suse.com/1172275
suse.com/security/cve/CVE-2015-9096
suse.com/security/cve/CVE-2016-2339
suse.com/security/cve/CVE-2016-7798
suse.com/security/cve/CVE-2017-0898
suse.com/security/cve/CVE-2017-0899
suse.com/security/cve/CVE-2017-0900
suse.com/security/cve/CVE-2017-0901
suse.com/security/cve/CVE-2017-0902
suse.com/security/cve/CVE-2017-0903
suse.com/security/cve/CVE-2017-10784
suse.com/security/cve/CVE-2017-14033
suse.com/security/cve/CVE-2017-14064
suse.com/security/cve/CVE-2017-17405
suse.com/security/cve/CVE-2017-17742
suse.com/security/cve/CVE-2017-17790
suse.com/security/cve/CVE-2017-9228
suse.com/security/cve/CVE-2017-9229
suse.com/security/cve/CVE-2018-1000073
suse.com/security/cve/CVE-2018-1000074
suse.com/security/cve/CVE-2018-1000075
suse.com/security/cve/CVE-2018-1000076
suse.com/security/cve/CVE-2018-1000077
suse.com/security/cve/CVE-2018-1000078
suse.com/security/cve/CVE-2018-1000079
suse.com/security/cve/CVE-2018-16395
suse.com/security/cve/CVE-2018-16396
suse.com/security/cve/CVE-2018-6914
suse.com/security/cve/CVE-2018-8777
suse.com/security/cve/CVE-2018-8778
suse.com/security/cve/CVE-2018-8779
suse.com/security/cve/CVE-2018-8780
suse.com/security/cve/CVE-2019-15845
suse.com/security/cve/CVE-2019-16201
suse.com/security/cve/CVE-2019-16254
suse.com/security/cve/CVE-2019-16255
suse.com/security/cve/CVE-2019-8320
suse.com/security/cve/CVE-2019-8321
suse.com/security/cve/CVE-2019-8322
suse.com/security/cve/CVE-2019-8323
suse.com/security/cve/CVE-2019-8324
suse.com/security/cve/CVE-2019-8325
suse.com/security/cve/CVE-2020-10663
ubuntu.com/security/CVE-2016-7798
github.com/attr-encrypted/attr_encrypted/issues/203
github.com/attr-encrypted/encryptor/pull/22
ubuntu.com/security/notices/USN-3365-1
cve.org/CVERecord?id=CVE-2016-7798
ubuntu.com/security/CVE-2009-5147
ubuntu.com/security/CVE-2015-1855
ubuntu.com/security/CVE-2015-7551
ubuntu.com/security/CVE-2015-9096
ubuntu.com/security/CVE-2016-2337
ubuntu.com/security/CVE-2016-2339
Left out here: the rest of 1 source description. The JSON record has them.