CVE-2016-7798: Openssl OpenSSL Gem For Ruby Using Vulnerability

HIGH
Advisory Identifier: GHSA-6h88-qjpv-p32m
CVSS 7.5
CWE-326
Published
Advisory Summary

CVE-2016-7798 is a HIGH (CVSS 7.5) openssl gem for ruby using vulnerability (CWE-326: Inadequate Encryption Strength) affecting Openssl libraries in the RubyGems ecosystem. The issue involves openssl gem for ruby using inadequate encryption strength. Remediation is available by upgrading affected packages to version 2.0.0.

CVE-2016-7798 at a Glance

CVE Identifier CVE-2016-7798
GHSA Identifier GHSA-6h88-qjpv-p32m
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-326: Inadequate Encryption Strength
Affected Product Openssl
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2016-7798

To remediate this vulnerability, upgrade all affected Openssl dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

openssl fixed: 2.0.0
Upgrade openssl to 2.0.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for openssl

How to Check if You Are Affected

To determine whether your application is affected by CVE-2016-7798, inspect your project dependencies for Openssl:

inspect dependencies for openssl

Analyze the terminal output to locate any version of Openssl in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-326: Inadequate Encryption Strength, where the product stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required. In Openssl, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2016-7798 Affected Openssl Versions

1 component(s)
Fixed Versions:
2.0.0
Product / Package Ecosystem Affected Versions Fixed Version
openssl
RubyGems
< 2.0.0
2.0.0

References

Frequently Asked Questions

What is CVE-2016-7798?
CVE-2016-7798 is a security vulnerability in Openssl involving OpenSSL gem for Ruby using inadequate encryption strength under CWE-326: Inadequate Encryption Strength.
Which Openssl versions are affected?
Affected versions include releases prior to 2.0.0 across affected packages: openssl.
What version fixes CVE-2016-7798?
Upgrading to 2.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is openssl affected?
Yes, openssl is affected in releases prior to 2.0.0. Upgrade your dependency to 2.0.0 or later.
What is the CVSS score of CVE-2016-7798?
CVE-2016-7798 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2016-7798?
CVE-2016-7798 is classified under CWE-326: Inadequate Encryption Strength (The product stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required.).
How can I check RubyGems dependencies for CVE-2016-7798?
Run the dependency tree command: 'inspect dependencies for openssl'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6h88-qjpv-p32m",
  "modified" : "2022-04-25T16:33:57Z",
  "published" : "2017-10-24T18:33:35Z",
  "aliases" : [ "CVE-2016-7798" ],
  "summary" : "OpenSSL gem for Ruby using inadequate encryption strength",
  "details" : "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" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "openssl"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-7798"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ruby/openssl/issues/49"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ruby/openssl/commit/8108e0a6db133f3375608303fdd2083eb5115062"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-6h88-qjpv-p32m"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ruby/openssl"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/openssl/CVE-2016-7798.yml"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20210121065227/https://www.securityfocus.com/bid/93031/info"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2017/dsa-3966"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2016/09/19/9"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2016/09/30/6"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2016/10/01/2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-326" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:19:22Z",
    "nvd_published_at" : null
  }
}