CVE-2013-2616: Mini magick MiniMagick Gem For Ruby URI Vulnerability
HIGHCVE-2013-2616 is a HIGH minimagick gem for ruby uri vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Mini magick libraries in the RubyGems ecosystem. The issue involves minimagick gem for ruby uri handling arbitrary command injection. Remediation is available by upgrading affected packages to version 3.6.0.
CVE-2013-2616 at a Glance
How to Fix CVE-2013-2616
To remediate this vulnerability, upgrade all affected Mini magick 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 mini_magick to 3.6.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for mini_magick
How to Check if You Are Affected
To determine whether your application is affected by CVE-2013-2616, inspect your project dependencies for Mini magick:
inspect dependencies for mini_magick
Analyze the terminal output to locate any version of Mini magick in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.6.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-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 Mini magick, 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-2616 Affected Mini magick Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mini_magick
|
RubyGems |
< 3.6.0
|
3.6.0
|
References
Frequently Asked Questions
What is CVE-2013-2616?
Which Mini magick versions are affected?
What version fixes CVE-2013-2616?
Is mini_magick affected?
What CWE is associated with CVE-2013-2616?
How can I check RubyGems dependencies for CVE-2013-2616?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w754-gq8r-pf5f",
"modified" : "2023-08-29T14:01:28Z",
"published" : "2017-10-24T18:33:37Z",
"aliases" : [ "CVE-2013-2616" ],
"summary" : "MiniMagick Gem for Ruby URI Handling Arbitrary Command Injection",
"details" : "`lib/mini_magick.rb` in the MiniMagick Gem 1.3.1 for Ruby allows remote attackers to execute arbitrary commands via shell metacharacters in a URL.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "mini_magick"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.6.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-2616"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/minimagick/minimagick"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/mini_magick/CVE-2013-2616.yml"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20130315095512/http://www.securityfocus.com/bid/58448"
}, {
"type" : "WEB",
"url" : "http://packetstormsecurity.com/files/120777/Ruby-Gem-Minimagic-Command-Execution.html"
}, {
"type" : "WEB",
"url" : "http://seclists.org/fulldisclosure/2013/Mar/123"
}, {
"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:59:55Z",
"nvd_published_at" : null
}
}