CVE-2014-3496: Code Injection

Published Jun 17, 2014
·
Updated

cartridgerepository.rb in OpenShift Origin and Enterprise 1.2.8 through 2.1.1 allows remote attackers to execute arbitrary commands via shell metacharacters in a Source-Url ending with a (1) .tar.gz, (2) .zip, (3) .tgz, or (4) .tar file extension in a cartridge manifest file.

Other sources

Jeremy Choi of Red Hat reports:

OpenShift Origin does not properly validated 'Source-Url' of cartridge manifest files to create applications and so commands injected like below in it will be executed in the node.

Source-Url: http://name-app.example.com/test/test;reboot;.tar.gz

Attacks can also succeed when the source-URL ends with .zip, .tgz and .tar. The file specified in Source-Url must be available from the URL for the successful attack.

In cartridgerepository.rb:

498 temporary = PathUtils.join(File.dirname(target), File.basename(cartridge.sourceurl)) (deleted for brevity) 519 when uri.scheme =~ /^https/ && cartridge.sourceurl =~ /(\.tar\.gz|\.tgz)$/ 520 begin 521 uricopy(URI(cartridge.sourceurl), temporary, cartridge.sourcemd5) 522 extract(:tgz, temporary, target) 523 ensure 524 FileUtils.rm(temporary) 525 end (deleted for brevity) 617 def self.extract(method, source, target) 618 case method 622 when :tgz 623 Utils.oospawn("/bin/tar -C #{target} -zxpf #{source}", 624 expectedexitstatus: 0)

The system command execution in line 623 will run #{source} which is comprised of cartridge.sourceurl. While the source url is validated in manifest.rb, still ';' can be injected.

370 if @manifest.haskey?('Source-Url') 371 raise InvalidElementError.new('Source-Url') unless @manifest['Source-Url'] =~ URI::ABSURI 372 @sourceurl = @manifest['Source-Url']

The PoC below has been shown in Online devenv4873

1. Create a devenv. 2. Place a malformed manifest file with Source-Url modified in a host the devenv can access. Source-Url: http://<host>/test;reboot;.tar.gz

3. Create "test;reboot;.tar.gz" at the path of Source-Url in the host. 4. Try to create a cartridge with the malformed manifest. $ rhc app create app1 http://<host>/manifest.yml --no-git

The devenv will reboot.

Red Hat

Affected Software

13 affected components
redhat Openshift=1.2.8
redhat Openshift=2.0
redhat Openshift=2.0.1
redhat Openshift=2.0.2
redhat Openshift=2.0.3
redhat Openshift=2.0.4
redhat Openshift=2.0.5
redhat Openshift=2.0.6
redhat Openshift=2.1
redhat Openshift=2.1.1
redhat OpenShift Origin=1.2.8
redhat OpenShift Origin=2.1
redhat OpenShift Origin=2.1.1

Event History

Jun 17, 2014
Data Sourced
via Red Hat·06:36 PM
DescriptionSeverityAffected Software
Jun 20, 2014
CVE Published
via MITRE·02:00 PM
Data Sourced
via MITRE·02:00 PM
Description
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-2014-3496?

CVE-2014-3496 has been assigned a high severity rating due to the potential for remote command execution.

2

How do I fix CVE-2014-3496?

To fix CVE-2014-3496, upgrade to a patched version of OpenShift Origin or Enterprise that addresses this vulnerability.

3

What systems are affected by CVE-2014-3496?

CVE-2014-3496 affects OpenShift Origin and Enterprise versions 1.2.8 through 2.1.1.

4

What type of vulnerability is CVE-2014-3496?

CVE-2014-3496 is a remote command execution vulnerability caused by improper handling of shell metacharacters in source URLs.

5

Who reported CVE-2014-3496?

CVE-2014-3496 was reported by Jeremy Choi from Red Hat.

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