CVE-2013-6421: Sprout Sprout Arbitrary Code Execution Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-229r-pqp6-8w6g
CWE-94
Published
Advisory Summary

CVE-2013-6421 is a HIGH sprout arbitrary code execution vulnerability vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Sprout libraries in the RubyGems ecosystem. The issue involves sprout arbitrary code execution vulnerability. Remediation is available in the latest vendor maintenance releases.

CVE-2013-6421 at a Glance

CVE Identifier CVE-2013-6421
GHSA Identifier GHSA-229r-pqp6-8w6g
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Sprout
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2013-6421

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

sprout fixed: Latest secure release
Upgrade sprout 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 sprout

How to Check if You Are Affected

To determine whether your application is affected by CVE-2013-6421, inspect your project dependencies for Sprout:

inspect dependencies for sprout

Analyze the terminal output to locate any version of Sprout 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-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 Sprout, 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 `unpack_zip` function in `archive_unpacker.rb` in the sprout gem 0.7.246 for Ruby allows context-dependent attackers to execute arbitrary commands via shell metacharacters in a (1) filename or (2) path.

CVE-2013-6421 Affected Sprout Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
sprout
RubyGems
0.7.246
All 1 versions
0.7.246
None specified

References

Frequently Asked Questions

What is CVE-2013-6421?
CVE-2013-6421 is a security vulnerability in Sprout involving sprout Arbitrary Code Execution vulnerability under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Sprout versions are affected?
Affected versions include releases prior to current release patches across affected packages: sprout.
What version fixes CVE-2013-6421?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is sprout affected?
Yes, sprout is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2013-6421?
CVE-2013-6421 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-2013-6421?
Run the dependency tree command: 'inspect dependencies for sprout'. 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-229r-pqp6-8w6g",
  "modified" : "2023-08-29T15:58:19Z",
  "published" : "2017-10-24T18:33:36Z",
  "aliases" : [ "CVE-2013-6421" ],
  "summary" : "sprout Arbitrary Code Execution vulnerability",
  "details" : "The `unpack_zip` function in `archive_unpacker.rb` in the sprout gem 0.7.246 for Ruby allows context-dependent attackers to execute arbitrary commands via shell metacharacters in a (1) filename or (2) path.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "sprout"
    },
    "versions" : [ "0.7.246" ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-6421"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/lukebayes/project-sprouts"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sprout/CVE-2013-6421.yml"
  }, {
    "type" : "WEB",
    "url" : "http://archives.neohapsis.com/archives/bugtraq/2013-12/0077.html"
  }, {
    "type" : "WEB",
    "url" : "http://vapid.dhs.org/advisories/sprout-0.7.246-command-inj.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2013/12/03/1"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2013/12/03/6"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T20:50:49Z",
    "nvd_published_at" : "2013-12-12T18:55:16Z"
  }
}