Vulnerabilities in pkg:gem/cocaine

PACKAGE
Advisory Identifier: GHSA-c43v-hrmg-56r4
Advisory Summary

CVE-2013-4457 is a MODERATE cocaine gem os command injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Cocaine libraries in the RubyGems ecosystem. The issue involves cocaine gem os command injection vulnerability. Remediation is available by upgrading affected packages to version 0.5.3.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/cocaine

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-c43v-hrmg-56r4 CVE-2013-4457 MODERATE Cocaine Gem OS Command Injection vulnerability

CVE-2013-4457 at a Glance

CVE Identifier CVE-2013-4457
GHSA Identifier GHSA-c43v-hrmg-56r4
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Cocaine
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2013-4457

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

cocaine fixed: 0.5.3
Upgrade cocaine to 0.5.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 cocaine

How to Check if You Are Affected

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

inspect dependencies for cocaine

Analyze the terminal output to locate any version of Cocaine in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.5.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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Cocaine, 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 Cocaine gem 0.4.0 through 0.5.2 for Ruby allows context-dependent attackers to execute arbitrary commands via a crafted has object, related to recursive variable interpolation.

CVE-2013-4457 Affected Cocaine Versions

1 component(s)
Fixed Versions:
0.5.3
Product / Package Ecosystem Affected Versions Fixed Version
cocaine
RubyGems
≥ 0.4.0
< 0.5.3
0.5.3

References

Frequently Asked Questions

What is CVE-2013-4457?
CVE-2013-4457 is a security vulnerability in Cocaine involving Cocaine Gem OS Command Injection vulnerability under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Cocaine versions are affected?
Affected versions include releases prior to 0.5.3 across affected packages: cocaine.
What version fixes CVE-2013-4457?
Upgrading to 0.5.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cocaine affected?
Yes, cocaine is affected in releases prior to 0.5.3. Upgrade your dependency to 0.5.3 or later.
What CWE is associated with CVE-2013-4457?
CVE-2013-4457 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check RubyGems dependencies for CVE-2013-4457?
Run the dependency tree command: 'inspect dependencies for cocaine'. 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-c43v-hrmg-56r4",
  "modified" : "2023-09-05T21:12:28Z",
  "published" : "2017-10-24T18:33:37Z",
  "aliases" : [ "CVE-2013-4457" ],
  "summary" : "Cocaine Gem OS Command Injection vulnerability",
  "details" : "The Cocaine gem 0.4.0 through 0.5.2 for Ruby allows context-dependent attackers to execute arbitrary commands via a crafted has object, related to recursive variable interpolation.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "cocaine"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.4.0"
      }, {
        "fixed" : "0.5.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-4457"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/thoughtbot/cocaine"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/thoughtbot/cocaine/blob/master/NEWS.md"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2013/10/22/10"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:30:11Z",
    "nvd_published_at" : "2013-11-02T18:55:03Z"
  }
}