CVE-2018-16477: Activestorage Exposure Of Sensitive Information To Vulnerability

MODERATE
Advisory Identifier: GHSA-7rr7-rcjw-56vj
CVSS 6.5
CWE-200
Published
Advisory Summary

CVE-2018-16477 is a MODERATE (CVSS 6.5) exposure of sensitive information to vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Activestorage libraries in the RubyGems ecosystem. The issue involves exposure of sensitive information to an unauthorized actor in activestorage. Remediation is available by upgrading affected packages to version 5.2.1.1.

CVE-2018-16477 at a Glance

CVE Identifier CVE-2018-16477
GHSA Identifier GHSA-7rr7-rcjw-56vj
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Activestorage
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 6.5

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

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

How to Fix CVE-2018-16477

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

activestorage fixed: 5.2.1.1
Upgrade activestorage to 5.2.1.1
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 activestorage

How to Check if You Are Affected

To determine whether your application is affected by CVE-2018-16477, inspect your project dependencies for Activestorage:

inspect dependencies for activestorage

Analyze the terminal output to locate any version of Activestorage in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.2.1.1), 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-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Activestorage, 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

A bypass vulnerability in Active Storage >= 5.2.0 for Google Cloud Storage and Disk services allow an attacker to modify the `content-disposition` and `content-type` parameters which can be used in with HTML files and have them executed inline. Additionally, if combined with other techniques such as cookie bombing and specially crafted AppCache manifests, an attacker can gain access to private signed URLs within a specific storage path. Vulnerable apps are those using either GCS or the Disk service in production. Other storage services such as S3 or Azure aren't affected.

CVE-2018-16477 Affected Activestorage Versions

1 component(s)
Fixed Versions:
5.2.1.1
Product / Package Ecosystem Affected Versions Fixed Version
activestorage
RubyGems
≥ 5.2.0
< 5.2.1.1
5.2.1.1

References

Frequently Asked Questions

What is CVE-2018-16477?
CVE-2018-16477 is a security vulnerability in Activestorage involving Exposure of Sensitive Information to an Unauthorized Actor in activestorage under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Activestorage versions are affected?
Affected versions include releases prior to 5.2.1.1 across affected packages: activestorage.
What version fixes CVE-2018-16477?
Upgrading to 5.2.1.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is activestorage affected?
Yes, activestorage is affected in releases prior to 5.2.1.1. Upgrade your dependency to 5.2.1.1 or later.
What is the CVSS score of CVE-2018-16477?
CVE-2018-16477 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2018-16477?
CVE-2018-16477 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check RubyGems dependencies for CVE-2018-16477?
Run the dependency tree command: 'inspect dependencies for activestorage'. 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-7rr7-rcjw-56vj",
  "modified" : "2023-07-05T19:08:30Z",
  "published" : "2018-12-05T17:17:02Z",
  "aliases" : [ "CVE-2018-16477" ],
  "summary" : "Exposure of Sensitive Information to an Unauthorized Actor in activestorage",
  "details" : "A bypass vulnerability in Active Storage >= 5.2.0 for Google Cloud Storage and Disk services allow an attacker to modify the `content-disposition` and `content-type` parameters which can be used in with HTML files and have them executed inline. Additionally, if combined with other techniques such as cookie bombing and specially crafted AppCache manifests, an attacker can gain access to private signed URLs within a specific storage path.\n\nVulnerable apps are those using either GCS or the Disk service in production. Other storage services such as S3 or Azure aren't affected.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "activestorage"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.2.0"
      }, {
        "fixed" : "5.2.1.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.2.1.0"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-16477"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-7rr7-rcjw-56vj"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/d/msg/rubyonrails-security/3KQRnXDIuLg/mByx5KkqBAAJ"
  }, {
    "type" : "WEB",
    "url" : "https://weblog.rubyonrails.org/2018/11/27/Rails-4-2-5-0-5-1-5-2-have-been-released"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:23:29Z",
    "nvd_published_at" : null
  }
}