cve.bz

CVE-2016-7798 Inadequate Encryption Strength

7.5 highExploit referenceEPSS 3.2%Fix available

High (7.5). EPSS 3.2% estimated probability of exploitation activity in the next 30 days. Fixed in openssl 2.0.0.

On this page
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.

Severity

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
EPSS
3.2% (unchanged from 3.2% a week ago; 3.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 88th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-326 Inadequate Encryption Strength
OWASP Top 10
A04:2025 Cryptographic Failures
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2016-7798 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2016-7798?via=ask-ai-copy and https://cve.bz/cve/CVE-2016-7798?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2016-7798 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
ruby-lang:opensslbefore 2.0.0
debian:debian_linux8.0
debian:debian_linux9.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-6h88-qjpv-p32mRubyGemsopenssl<2.0.02.0.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian8ruby2.12.1.5-2+deb8u4DLA-1421-1
Debian9ruby2.32.3.3-1+deb9u1DSA-3966-1
Debian12, 13, 14ruby-attr-encrypted3.0.1-2DEBIAN-CVE-2016-7798
Debian12, 13, 14ruby-encryptor3.0.0-1DEBIAN-CVE-2016-7798
Ubuntu14.04:LTSruby1.9.11.9.3.484-2ubuntu1.3UBUNTU-CVE-2016-7798 USN-3365-1
Ubuntu14.04:LTSruby2.02.0.0.484-1ubuntu2.4UBUNTU-CVE-2016-7798 USN-3365-1
Ubuntu16.04:LTSruby-encryptor, ruby-attr-encryptedno fix listedUBUNTU-CVE-2016-7798
Ubuntu16.04:LTSruby2.32.3.1-2~16.04.2UBUNTU-CVE-2016-7798 USN-3365-1
SUSEEnterprise Storage 5, HPE Helion OpenStack 8, Linux Enterprise Server 12 SP2-BCL and 14 moreruby2.12.1.9-19.3.2SUSE-SU-2020:1570-1
SUSELinux Enterprise Server 12 SP2-BCL, Linux Enterprise Server 12 SP2-LTSS, Linux Enterprise Server for SAP Applications 12 SP2 and 1 moreyast2-ruby-bindings3.1.53-9.8.1SUSE-SU-2020:1570-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's mitigation

A possible workaround to this flaw is, when using aes-256-gcm mode, always set the key first and then the iv. For example when setting random keys and iv use the following code segment:

key = cipher.random_key

iv = cipher.random_iv

ProductPackageStateAdvisory
CloudForms Management Engine 5rh-ruby22-rubyWill not fix
CloudForms Management Engine 5ruby-200-rubyWill not fix
Red Hat Enterprise Linux 5rubyWill not fix
Red Hat Enterprise Linux 6rubyWill not fix
Red Hat Enterprise Linux 7rubyWill not fix
Red Hat Software Collectionsrh-ruby22-rubyWill not fix
Red Hat Software Collectionsrh-ruby23-rubyWill not fix
Red Hat Software Collectionsruby200-rubyWill not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2016-7798.

Attack patterns (CAPEC)

  • CAPEC-20 Encryption Brute Forcing Likelihood: Low · Severity: Low
  • CAPEC-112 Brute Force Severity: High
  • CAPEC-192 Protocol Analysis Likelihood: Low · Severity: Low

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON