Vulnerabilities in pkg:gem/ruby_parser
PACKAGECVE-2013-0162 is a LOW ruby_parser allows local users to vulnerability (CWE-377: Insecure Temporary File) affecting Ruby parser libraries in the RubyGems ecosystem. The issue involves ruby_parser allows local users to overwrite arbitrary files via symlink attack on temporary file with predictable name. Remediation is available by upgrading affected packages to version 3.1.2.
pkg:gem/ruby_parser
Vulnerability advisories affecting package pkg:gem/ruby_parser. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-8mvw-22r7-w6fq | CVE-2013-0162 | LOW | ruby_parser allows local users to overwrite arbitrary files via symlink attack on temporary file with predictable name |
CVE-2013-0162 at a Glance
How to Fix CVE-2013-0162
To remediate this vulnerability, upgrade all affected Ruby parser dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade ruby_parser to 3.1.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for ruby_parser
How to Check if You Are Affected
To determine whether your application is affected by CVE-2013-0162, inspect your project dependencies for Ruby parser:
inspect dependencies for ruby_parser
Analyze the terminal output to locate any version of Ruby parser in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.2), 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-377: Insecure Temporary File, where creating and using insecure temporary files can leave application and system data vulnerable to attack. In Ruby parser, 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
CVE-2013-0162 Affected Ruby parser Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ruby_parser
|
RubyGems |
≥ 2.0.2
< 3.1.2
|
3.1.2
|
References
Frequently Asked Questions
What is CVE-2013-0162?
Which Ruby parser versions are affected?
What version fixes CVE-2013-0162?
Is ruby_parser affected?
What CWE is associated with CVE-2013-0162?
How can I check RubyGems dependencies for CVE-2013-0162?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8mvw-22r7-w6fq",
"modified" : "2023-03-08T19:28:01Z",
"published" : "2022-05-05T02:48:30Z",
"aliases" : [ "CVE-2013-0162" ],
"summary" : "ruby_parser allows local users to overwrite arbitrary files via symlink attack on temporary file with predictable name",
"details" : "The `diff_pp` function in `lib/gauntlet_rubyparser.rb` in the ruby_parser gem 3.1.1 and earlier for Ruby allows local users to overwrite arbitrary files via a symlink attack on a temporary file with a predictable name in `/tmp`.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "ruby_parser"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.2"
}, {
"fixed" : "3.1.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-0162"
}, {
"type" : "WEB",
"url" : "https://github.com/seattlerb/ruby_parser/commit/506c7e13cff6f8715385fa8488b621028b4ad280"
}, {
"type" : "WEB",
"url" : "https://github.com/seattlerb/ruby_parser/commit/c35acd878d50a8e4ea35933e3fbdc493421d422c"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2013:0544"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2013:0582"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/security/cve/CVE-2013-0162"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=892806"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/ruby_parser/CVE-2013-0162.yml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/seattlerb/ruby_parser"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2013-0544.html"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2013-0548.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-377" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2023-03-08T19:28:01Z",
"nvd_published_at" : "2013-03-01T05:40:00Z"
}
}