CVE-2013-2060: OS Command Injection

Published May 7, 2013
·
Updated

Clayton Coleman reports:

Never use the form in ruby when the variables aren't known to be safe values

def self.downloadfromurl(url) maxdltime = (Rails.application.config.downloadedcartridges[:maxdownloadtime] rescue 10) || 10 maxfilesize = (Rails.application.config.downloadedcartridges[:maxcartsize] rescue 20480) || 20480 maxredirs = (Rails.application.config.downloadedcartridges[:maxdownloadredirects] rescue 2) || 2 curl --max-time #{maxdltime} --connect-timeout 2 --location --max-redirs #{maxredirs} --max-filesize #{maxfilesize} -k #{url} end

If 'URL' is not properly validated, then someone could inject " ; rm -rf /"

In this method, URL needs to be a properly formatted URI with a known whitelist of parameters.

In addition, we should only accept URI's that are of the following whitelisted criteria:

Parses URI successfully Protocol is 'http', 'https', 'git', 'ftp' (I can't think of others that are really safe). 'file' should NOT be allowed Host must be specified, and be non localhost (otherwise you allow a local injection attack). We need to be very careful here not to allow probing of the internal network, so we should only allow addresses that resolve outside of the exsrvs. Port should be valid Path should be valid

If the URI does not meet these criteria an error message should be returned to the user.

Other sources

The downloadfromurl function in OpenShift Origin allows remote attackers to execute arbitrary commands via shell metacharacters in the URL of a request to download a cart.

MITRE

Affected Software

1 affected component
redhat Openshift=1.0

Event History

May 7, 2013
Data Sourced
via Red Hat·06:06 AM
DescriptionSeverityAffected Software
Jan 28, 2020
CVE Published
via MITRE·03:57 PM
Data Sourced
via MITRE·03:57 PM
DescriptionWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2013-2060?

The severity of CVE-2013-2060 is classified as medium, as it can lead to potential data exposure.

2

How do I fix CVE-2013-2060?

To fix CVE-2013-2060, avoid using the ` form in Ruby unless you can ensure that the variables are safe values.

3

Which software versions are affected by CVE-2013-2060?

CVE-2013-2060 affects Red Hat OpenShift version 1.0.

4

What type of vulnerability is CVE-2013-2060?

CVE-2013-2060 is a security vulnerability related to unsafe variable handling in Ruby.

5

Who reported CVE-2013-2060?

CVE-2013-2060 was reported by Clayton Coleman.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203