CVE-2013-5671: Dragonfly Code Injection Vulnerability

HIGH
Advisory Identifier: GHSA-qrgf-jqqm-x7xv
CWE-74
Published
Advisory Summary

CVE-2013-5671 is a HIGH code injection vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Dragonfly libraries in the RubyGems ecosystem. The issue involves code injection in dragonfly gem. Remediation is available by upgrading affected packages to version 1.0.0.

CVE-2013-5671 at a Glance

CVE Identifier CVE-2013-5671
GHSA Identifier GHSA-qrgf-jqqm-x7xv
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Affected Product Dragonfly
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2013-5671

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

dragonfly fixed: 1.0.0
Upgrade dragonfly to 1.0.0
fog-dragonfly fixed: Latest secure release
Upgrade fog-dragonfly 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 dragonfly

How to Check if You Are Affected

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

inspect dependencies for dragonfly

Analyze the terminal output to locate any version of Dragonfly in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.0), 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-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Dragonfly, 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

`lib/dragonfly/imagemagickutils.rb` in the fog-dragonfly gem 0.8.2 for Ruby allows remote attackers to execute arbitrary commands via unspecified vectors.

CVE-2013-5671 Affected Dragonfly Versions

2 component(s)
Fixed Versions:
1.0.0
Product / Package Ecosystem Affected Versions Fixed Version
dragonfly
RubyGems
< 1.0.0
1.0.0
fog-dragonfly
RubyGems
≤ 0.9.15

References

Frequently Asked Questions

What is CVE-2013-5671?
CVE-2013-5671 is a security vulnerability in Dragonfly involving Code injection in dragonfly gem under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Which Dragonfly versions are affected?
Affected versions include releases prior to 1.0.0 across affected packages: dragonfly, fog-dragonfly.
What version fixes CVE-2013-5671?
Upgrading to 1.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is dragonfly affected?
Yes, dragonfly is affected in releases prior to 1.0.0. Upgrade your dependency to 1.0.0 or later.
Is fog-dragonfly affected?
Yes, fog-dragonfly 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-5671?
CVE-2013-5671 is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.).
How can I check RubyGems dependencies for CVE-2013-5671?
Run the dependency tree command: 'inspect dependencies for dragonfly'. 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-qrgf-jqqm-x7xv",
  "modified" : "2023-01-24T14:54:19Z",
  "published" : "2017-10-24T18:33:37Z",
  "aliases" : [ "CVE-2013-5671" ],
  "summary" : "Code injection in dragonfly gem",
  "details" : "`lib/dragonfly/imagemagickutils.rb` in the fog-dragonfly gem 0.8.2 for Ruby allows remote attackers to execute arbitrary commands via unspecified vectors.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "dragonfly"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "fog-dragonfly"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.9.15"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-5671"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/markevans/dragonfly/issues/520"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/github/advisory-database/pull/486"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/markevans/dragonfly"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20201208033320/http://www.vapid.dhs.org/advisories/fog-dragonfly-0.8.2-cmd-inj.html"
  }, {
    "type" : "WEB",
    "url" : "http://seclists.org/fulldisclosure/2013/Sep/18"
  }, {
    "type" : "WEB",
    "url" : "http://seclists.org/oss-sec/2013/q3/526"
  }, {
    "type" : "WEB",
    "url" : "http://seclists.org/oss-sec/2013/q3/528"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:52:41Z",
    "nvd_published_at" : "2014-05-12T14:55:05Z"
  }
}