CVE-2020-8163: Actionview Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-cr3x-7m39-c6jq
CVSS 8.8
CWE-94
Published
Advisory Summary

CVE-2020-8163 is a HIGH (CVSS 8.8) remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Actionview libraries in the RubyGems ecosystem. The issue involves remote code execution via user-provided local names in actionview. Remediation is available by upgrading affected packages to version 4.2.11.3.

CVE-2020-8163 at a Glance

CVE Identifier CVE-2020-8163
GHSA Identifier GHSA-cr3x-7m39-c6jq
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Actionview
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.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

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

How to Fix CVE-2020-8163

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

actionview fixed: 4.2.11.3
Upgrade actionview to 4.2.11.3
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 actionview

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-8163, inspect your project dependencies for Actionview:

inspect dependencies for actionview

Analyze the terminal output to locate any version of Actionview in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.2.11.3), 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Actionview, 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 is a code injection vulnerability in versions of Rails prior to 5.0.1 that would allow an attacker who controlled the `locals` argument of a `render` call to perform a RCE.

CVE-2020-8163 Affected Actionview Versions

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

References

Frequently Asked Questions

What is CVE-2020-8163?
CVE-2020-8163 is a security vulnerability in Actionview involving Remote code execution via user-provided local names in ActionView under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Actionview versions are affected?
Affected versions include releases prior to 4.2.11.3 across affected packages: actionview.
What version fixes CVE-2020-8163?
Upgrading to 4.2.11.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is actionview affected?
Yes, actionview is affected in releases prior to 4.2.11.3. Upgrade your dependency to 4.2.11.3 or later.
What is the CVSS score of CVE-2020-8163?
CVE-2020-8163 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2020-8163?
CVE-2020-8163 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check RubyGems dependencies for CVE-2020-8163?
Run the dependency tree command: 'inspect dependencies for actionview'. 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-cr3x-7m39-c6jq",
  "modified" : "2023-07-05T20:22:39Z",
  "published" : "2020-07-07T16:34:27Z",
  "aliases" : [ "CVE-2020-8163" ],
  "summary" : "Remote code execution via user-provided local names in ActionView",
  "details" : "The is a code injection vulnerability in versions of Rails prior to 5.0.1 that would allow an attacker who controlled the `locals` argument of a `render` call to perform a RCE.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "actionview"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.2.11.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.2.11.1"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-8163"
  }, {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/304805"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionview/CVE-2020-8163.yml"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/forum/#!topic/rubyonrails-security/hWuKcHyoKh0"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/g/rubyonrails-security/c/hWuKcHyoKh0"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2020/07/msg00013.html"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/158604/Ruby-On-Rails-5.0.1-Remote-Code-Execution.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-07-07T15:44:56Z",
    "nvd_published_at" : "2020-07-02T19:15:00Z"
  }
}