CVE-2018-1000078: Rubygems update Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-87qx-g5wg-mwmj
CVSS 6.1
CWE-79
Published
Advisory Summary

CVE-2018-1000078 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Rubygems update libraries in the RubyGems ecosystem. The issue involves rubygems cross-site scripting vulnerability. Remediation is available by upgrading affected packages to version 2.7.6, 9.1.16.0.

CVE-2018-1000078 at a Glance

CVE Identifier CVE-2018-1000078
GHSA Identifier GHSA-87qx-g5wg-mwmj
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Rubygems update
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 6.1

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:C/C:L/I:L/A:N).

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

How to Fix CVE-2018-1000078

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

rubygems-update fixed: 2.7.6
Upgrade rubygems-update to 2.7.6
org.jruby:jruby-stdlib fixed: 9.1.16.0
<dependency>
    <groupId>org.jruby</groupId>
    <artifactId>jruby-stdlib</artifactId>
    <version>9.1.16.0</version>
</dependency>
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 rubygems-update

How to Check if You Are Affected

To determine whether your application is affected by CVE-2018-1000078, inspect your project dependencies for Rubygems update:

inspect dependencies for rubygems-update

Analyze the terminal output to locate any version of Rubygems update in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.7.6), 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Rubygems update, 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

RubyGems version Ruby 2.2 series: 2.2.9 and earlier, Ruby 2.3 series: 2.3.6 and earlier, Ruby 2.4 series: 2.4.3 and earlier, Ruby 2.5 series: 2.5.0 and earlier, prior to trunk revision 62422 contains a Cross Site Scripting (XSS) vulnerability in gem server display of homepage attribute that can result in XSS. This attack requires the victim to browse to a malicious gem on a vulnerable gem server. This vulnerability is fixed in 2.7.6.

CVE-2018-1000078 Affected Rubygems update Versions

2 component(s)
Fixed Versions:
2.7.69.1.16.0
Product / Package Ecosystem Affected Versions Fixed Version
rubygems-update
RubyGems
< 2.7.6
2.7.6
org.jruby:jruby-stdlib
Maven
< 9.1.16.0
9.1.16.0

References

NVD — CVE-2018-1000078 NVD
https://nvd.nist.gov/vuln/detail/CVE-2018-1000078
Security Fix Commit FIX COMMIT
https://github.com/jruby/jruby/commit/0b06b48ab4432237ce5fc1bef47f2c6bcf7843f7
Security Fix Commit FIX COMMIT
https://github.com/rubygems/rubygems/commit/5971b486d4dbb2bad5d3445b3801c456eb0ce183
Security Fix Commit FIX COMMIT
https://github.com/rubygems/rubygems/commit/66a28b9275551384fdab45f3591a82d6b59952cb
Rubygems update Security Information SECURITY
https://www.debian.org/security/2018/dsa-4259
Rubygems update Security Information SECURITY
https://www.debian.org/security/2018/dsa-4219
usn.ubuntu.com/3621-1 WEB
https://usn.ubuntu.com/3621-1
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2019/05/msg00028.html
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2018/04/msg00023.html
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2018/04/msg00001.html
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2018/04/msg00000.html
access.redhat.com/errata/rhsa-2020:06... WEB
https://access.redhat.com/errata/RHSA-2020:0663
access.redhat.com/errata/rhsa-2020:05... WEB
https://access.redhat.com/errata/RHSA-2020:0591
access.redhat.com/errata/rhsa-2020:05... WEB
https://access.redhat.com/errata/RHSA-2020:0542
access.redhat.com/errata/rhsa-2019:20... WEB
https://access.redhat.com/errata/RHSA-2019:2028
access.redhat.com/errata/rhsa-2018:37... WEB
https://access.redhat.com/errata/RHSA-2018:3731
access.redhat.com/errata/rhsa-2018:37... WEB
https://access.redhat.com/errata/RHSA-2018:3730
access.redhat.com/errata/rhsa-2018:37... WEB
https://access.redhat.com/errata/RHSA-2018:3729
blog.rubygems.org/2018/02/15/2.7.6-re... WEB
http://blog.rubygems.org/2018/02/15/2.7.6-released.html
Rubygems update Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00036.html

Frequently Asked Questions

What is CVE-2018-1000078?
CVE-2018-1000078 is a security vulnerability in Rubygems update involving RubyGems Cross-site Scripting vulnerability under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Rubygems update versions are affected?
Affected versions include releases prior to 2.7.6, 9.1.16.0 across affected packages: rubygems-update, org.jruby:jruby-stdlib.
What version fixes CVE-2018-1000078?
Upgrading to 2.7.6, 9.1.16.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rubygems-update affected?
Yes, rubygems-update is affected in releases prior to 2.7.6. Upgrade your dependency to 2.7.6 or later.
Is jruby-stdlib affected?
Yes, org.jruby:jruby-stdlib is affected in releases prior to 9.1.16.0. Upgrade your dependency to 9.1.16.0 or later.
What is the CVSS score of CVE-2018-1000078?
CVE-2018-1000078 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2018-1000078?
CVE-2018-1000078 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check RubyGems dependencies for CVE-2018-1000078?
Run the dependency tree command: 'inspect dependencies for rubygems-update'. 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-87qx-g5wg-mwmj",
  "modified" : "2023-03-10T02:34:50Z",
  "published" : "2022-05-14T01:01:09Z",
  "aliases" : [ "CVE-2018-1000078" ],
  "summary" : "RubyGems Cross-site Scripting vulnerability",
  "details" : "RubyGems version Ruby 2.2 series: 2.2.9 and earlier, Ruby 2.3 series: 2.3.6 and earlier, Ruby 2.4 series: 2.4.3 and earlier, Ruby 2.5 series: 2.5.0 and earlier, prior to trunk revision 62422 contains a Cross Site Scripting (XSS) vulnerability in gem server display of homepage attribute that can result in XSS. This attack requires the victim to browse to a malicious gem on a vulnerable gem server. This vulnerability is fixed in 2.7.6.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "rubygems-update"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.7.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.jruby:jruby-stdlib"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "9.1.16.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-1000078"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jruby/jruby/commit/0b06b48ab4432237ce5fc1bef47f2c6bcf7843f7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubygems/rubygems/commit/5971b486d4dbb2bad5d3445b3801c456eb0ce183"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubygems/rubygems/commit/66a28b9275551384fdab45f3591a82d6b59952cb"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2018/dsa-4259"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2018/dsa-4219"
  }, {
    "type" : "WEB",
    "url" : "https://usn.ubuntu.com/3621-1"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2019/05/msg00028.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2018/04/msg00023.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2018/04/msg00001.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2018/04/msg00000.html"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2020:0663"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2020:0591"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2020:0542"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:2028"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:3731"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:3730"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:3729"
  }, {
    "type" : "WEB",
    "url" : "http://blog.rubygems.org/2018/02/15/2.7.6-released.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00036.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-03-10T02:34:50Z",
    "nvd_published_at" : "2018-03-13T15:29:00Z"
  }
}