Vulnerabilities in pkg:gem/ruby_parser-legacy

PACKAGE
Advisory Identifier: GHSA-hhwc-8g49-j8jx
Advisory Summary

CVE-2019-18409 is a HIGH (CVSS 7.8) remote code execution vulnerability (CWE-732: Incorrect Permission Assignment for Critical Resource) affecting Ruby parser legacy libraries in the RubyGems ecosystem. The issue involves ruby_parser-legacy incorrect permission assignment for critical resource. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/ruby_parser-legacy

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:gem/ruby_parser-legacy. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-hhwc-8g49-j8jx CVE-2019-18409 HIGH Ruby_parser-legacy Incorrect Permission Assignment for Critical Resource

CVE-2019-18409 at a Glance

CVE Identifier CVE-2019-18409
GHSA Identifier GHSA-hhwc-8g49-j8jx
Severity HIGH
CVSS v3.1 Base Score 7.8
CWE Classification CWE-732: Incorrect Permission Assignment for Critical Resource
Affected Product Ruby parser legacy
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 7.8

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

Attack Vector Local (AV:L)
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-2019-18409

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

ruby_parser-legacy fixed: Latest secure release
Upgrade ruby_parser-legacy to Latest secure release
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 ruby_parser-legacy

How to Check if You Are Affected

To determine whether your application is affected by CVE-2019-18409, inspect your project dependencies for Ruby parser legacy:

inspect dependencies for ruby_parser-legacy

Analyze the terminal output to locate any version of Ruby parser legacy in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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-732: Incorrect Permission Assignment for Critical Resource, where the product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. In Ruby parser legacy, 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 ruby_parser-legacy (aka legacy) gem 1.0.0 for Ruby allows local privilege escalation because of world-writable files. For example, if the brakeman gem (which has a legacy dependency) 4.5.0 through 4.7.0 is used, a local user can insert malicious code into the `ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser.rb` file.

CVE-2019-18409 Affected Ruby parser legacy Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
ruby_parser-legacy
RubyGems
≤ 1.0.0

References

Frequently Asked Questions

What is CVE-2019-18409?
CVE-2019-18409 is a security vulnerability in Ruby parser legacy involving Ruby_parser-legacy Incorrect Permission Assignment for Critical Resource under CWE-732: Incorrect Permission Assignment for Critical Resource.
Which Ruby parser legacy versions are affected?
Affected versions include releases prior to current release patches across affected packages: ruby_parser-legacy.
What version fixes CVE-2019-18409?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is ruby_parser-legacy affected?
Yes, ruby_parser-legacy is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2019-18409?
CVE-2019-18409 has a CVSS v3.1 base score of 7.8 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2019-18409?
CVE-2019-18409 is classified under CWE-732: Incorrect Permission Assignment for Critical Resource (The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.).
How can I check RubyGems dependencies for CVE-2019-18409?
Run the dependency tree command: 'inspect dependencies for ruby_parser-legacy'. 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-hhwc-8g49-j8jx",
  "modified" : "2023-08-25T23:43:43Z",
  "published" : "2019-10-25T19:41:34Z",
  "aliases" : [ "CVE-2019-18409" ],
  "summary" : "Ruby_parser-legacy Incorrect Permission Assignment for Critical Resource",
  "details" : "The ruby_parser-legacy (aka legacy) gem 1.0.0 for Ruby allows local privilege escalation because of world-writable files. For example, if the brakeman gem (which has a legacy dependency) 4.5.0 through 4.7.0 is used, a local user can insert malicious code into the `ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser.rb` file.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "ruby_parser-legacy"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-18409"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/zenspider/ruby_parser-legacy/issues/1"
  }, {
    "type" : "WEB",
    "url" : "https://brakemanscanner.org/blog/2019/10/14/brakeman-4-dot-7-dot-1-released"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/brakeman/CVE-2019-18409.yml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/zenspider/ruby_parser-legacy"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-732" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2019-10-25T16:26:28Z",
    "nvd_published_at" : "2019-10-24T14:15:00Z"
  }
}