CVE-2017-10784: Webrick Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-369m-2gv6-mw28
CVSS 8.8
CWE-287
Published
Advisory Summary

CVE-2017-10784 is a HIGH (CVSS 8.8) remote code execution vulnerability (CWE-287: Improper Authentication) affecting Webrick libraries in the RubyGems ecosystem. The issue involves webrick rce vulnerability. Remediation is available by upgrading affected packages to version 1.4.0.

CVE-2017-10784 at a Glance

CVE Identifier CVE-2017-10784
GHSA Identifier GHSA-369m-2gv6-mw28
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-287: Improper Authentication
Affected Product Webrick
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 8.8

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:H/I:H/A:H).

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 High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2017-10784

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

webrick fixed: 1.4.0
Upgrade webrick to 1.4.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 webrick

How to Check if You Are Affected

To determine whether your application is affected by CVE-2017-10784, inspect your project dependencies for Webrick:

inspect dependencies for webrick

Analyze the terminal output to locate any version of Webrick in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Webrick, 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 Basic authentication code in WEBrick library in Ruby before 2.2.8, 2.3.x before 2.3.5, and 2.4.x through 2.4.1 allows remote attackers to inject terminal emulator escape sequences into its log and possibly execute arbitrary commands via a crafted user name.

CVE-2017-10784 Affected Webrick Versions

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

References

NVD — CVE-2017-10784 NVD
https://nvd.nist.gov/vuln/detail/CVE-2017-10784
Security Fix Commit FIX COMMIT
https://github.com/ruby/ruby/commit/6617c41292
Security Fix Commit FIX COMMIT
https://github.com/ruby/webrick/commit/4ac0f3843ab82d1c31e1cfc719409208adef7813
hackerone.com/reports/223363 WEB
https://hackerone.com/reports/223363
www.ruby-lang.org/en/news/2017/09/14/... WEB
https://www.ruby-lang.org/en/news/2017/09/14/webrick-basic-auth-escape-sequence-injection-cve-2017-10784
www.ruby-lang.org/en/news/2017/09/14/... WEB
https://www.ruby-lang.org/en/news/2017/09/14/ruby-2-3-5-released
www.ruby-lang.org/en/news/2017/09/14/... WEB
https://www.ruby-lang.org/en/news/2017/09/14/ruby-2-2-8-released
Webrick Security Information SECURITY
https://www.debian.org/security/2017/dsa-4031
Webrick Security Information SECURITY
https://web.archive.org/web/20211025092552/http://www.securitytracker.com/id/1039363
Webrick Security Information SECURITY
https://web.archive.org/web/20210919031115/http://www.securitytracker.com/id/1042004
Webrick Security Information SECURITY
https://web.archive.org/web/20210621131814/http://www.securityfocus.com/bid/100853
usn.ubuntu.com/3685-1 WEB
https://usn.ubuntu.com/3685-1
usn.ubuntu.com/3528-1 WEB
https://usn.ubuntu.com/3528-1
Webrick Security Information SECURITY
https://security.gentoo.org/glsa/201710-18
lists.debian.org/debian-lts-announce... WEB
https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html
Webrick Source Repository REPOSITORY
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/webrick/CVE-2017-10784.yml
Webrick Source Repository REPOSITORY
https://github.com/ruby/webrick
access.redhat.com/errata/rhsa-2018:05... WEB
https://access.redhat.com/errata/RHSA-2018:0585
access.redhat.com/errata/rhsa-2018:05... WEB
https://access.redhat.com/errata/RHSA-2018:0583
access.redhat.com/errata/rhsa-2018:03... WEB
https://access.redhat.com/errata/RHSA-2018:0378
access.redhat.com/errata/rhsa-2017:34... WEB
https://access.redhat.com/errata/RHSA-2017:3485

Frequently Asked Questions

What is CVE-2017-10784?
CVE-2017-10784 is a security vulnerability in Webrick involving WEBrick RCE Vulnerability under CWE-287: Improper Authentication.
Which Webrick versions are affected?
Affected versions include releases prior to 1.4.0 across affected packages: webrick.
What version fixes CVE-2017-10784?
Upgrading to 1.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is webrick affected?
Yes, webrick is affected in releases prior to 1.4.0. Upgrade your dependency to 1.4.0 or later.
What is the CVSS score of CVE-2017-10784?
CVE-2017-10784 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2017-10784?
CVE-2017-10784 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check RubyGems dependencies for CVE-2017-10784?
Run the dependency tree command: 'inspect dependencies for webrick'. 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-369m-2gv6-mw28",
  "modified" : "2023-07-27T14:58:44Z",
  "published" : "2022-05-14T02:03:29Z",
  "aliases" : [ "CVE-2017-10784" ],
  "summary" : "WEBrick RCE Vulnerability",
  "details" : "The Basic authentication code in WEBrick library in Ruby before 2.2.8, 2.3.x before 2.3.5, and 2.4.x through 2.4.1 allows remote attackers to inject terminal emulator escape sequences into its log and possibly execute arbitrary commands via a crafted user name.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "webrick"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.4.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-10784"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ruby/ruby/commit/6617c41292"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ruby/webrick/commit/4ac0f3843ab82d1c31e1cfc719409208adef7813"
  }, {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/223363"
  }, {
    "type" : "WEB",
    "url" : "https://www.ruby-lang.org/en/news/2017/09/14/webrick-basic-auth-escape-sequence-injection-cve-2017-10784"
  }, {
    "type" : "WEB",
    "url" : "https://www.ruby-lang.org/en/news/2017/09/14/ruby-2-3-5-released"
  }, {
    "type" : "WEB",
    "url" : "https://www.ruby-lang.org/en/news/2017/09/14/ruby-2-2-8-released"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2017/dsa-4031"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20211025092552/http://www.securitytracker.com/id/1039363"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20210919031115/http://www.securitytracker.com/id/1042004"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20210621131814/http://www.securityfocus.com/bid/100853"
  }, {
    "type" : "WEB",
    "url" : "https://usn.ubuntu.com/3685-1"
  }, {
    "type" : "WEB",
    "url" : "https://usn.ubuntu.com/3528-1"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/201710-18"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/webrick/CVE-2017-10784.yml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ruby/webrick"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:0585"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:0583"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:0378"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2017:3485"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-26T20:26:17Z",
    "nvd_published_at" : "2017-09-19T17:29:00Z"
  }
}