Vulnerabilities in pkg:gem/command_wrap

PACKAGE
Advisory Identifier: GHSA-p673-hjf2-pwfr
Advisory Summary

CVE-2013-1875 is a HIGH shell command injection vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Command wrap libraries in the RubyGems ecosystem. The issue involves shell command injection in command_wrap. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/command_wrap

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-p673-hjf2-pwfr CVE-2013-1875 HIGH Shell command injection in command_wrap

CVE-2013-1875 at a Glance

CVE Identifier CVE-2013-1875
GHSA Identifier GHSA-p673-hjf2-pwfr
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Command wrap
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2013-1875

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

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

How to Check if You Are Affected

To determine whether your application is affected by CVE-2013-1875, inspect your project dependencies for Command wrap:

inspect dependencies for command_wrap

Analyze the terminal output to locate any version of Command wrap 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 Command wrap, 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

command_wrap.rb in the command_wrap Gem for Ruby allows remote attackers to execute arbitrary commands via shell metacharacters in a URL or filename.

CVE-2013-1875 Affected Command wrap Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
command_wrap
RubyGems
≤ 0.6.2

References

Frequently Asked Questions

What is CVE-2013-1875?
CVE-2013-1875 is a security vulnerability in Command wrap involving Shell command injection in command_wrap under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Command wrap versions are affected?
Affected versions include releases prior to current release patches across affected packages: command_wrap.
What version fixes CVE-2013-1875?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is command_wrap affected?
Yes, command_wrap 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-1875?
CVE-2013-1875 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-1875?
Run the dependency tree command: 'inspect dependencies for command_wrap'. 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-p673-hjf2-pwfr",
  "modified" : "2023-07-03T23:38:02Z",
  "published" : "2017-10-24T18:33:37Z",
  "aliases" : [ "CVE-2013-1875" ],
  "summary" : "Shell command injection in command_wrap",
  "details" : "command_wrap.rb in the command_wrap Gem for Ruby allows remote attackers to execute arbitrary commands via shell metacharacters in a URL or filename.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "command_wrap"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.6.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-1875"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-p673-hjf2-pwfr"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/command_wrap/CVE-2013-1875.yml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/slicertje/commandwrap"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/120847/Ruby-Gem-Command-Wrap-Command-Execution.html"
  }, {
    "type" : "WEB",
    "url" : "http://seclists.org/fulldisclosure/2013/Mar/175"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2013/03/19/9"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:48:11Z",
    "nvd_published_at" : "2013-03-20T22:55:00Z"
  }
}