CVE-2013-2121: Code Injection

Published May 29, 2013
·
Updated

Eval injection vulnerability in the create method in the Bookmarks controller in Foreman before 1.2.0-RC2 allows remote authenticated users with permissions to create bookmarks to execute arbitrary code via a controller name attribute.

Other sources

Ramon de C Valle (rcvalle) reports:

There is a code injection vulnerability in the create method of the Bookmarks controller. The create method uses the (mass-assigned) controller attribute of the newly created bookmark in an eval statement without sanitizing it:

def create @bookmark = Bookmark.new(params[:bookmark])

respondto do |format| if @bookmark.save format.html { redirectto(eval(@bookmark.controller+"path"), :notice => ('Bookmark was successfully created.')) } else format.html { render :action => "new" } end end end

Any user with permissions to create a bookmark can execute arbitrary code and arbitrary system commands by sending a specially-crafted POST request. The controller attribute is validated with the regular expression /\A(\S+)\Z/, which prevents us from using code containing spaces. However, this can be easily circumvented (see example (a)). The following are some possible example attacks, including arbitrary command execution.

Red Hat

Affected Software

3 affected components
redhat Openstack=3.0
theforeman foreman<=1.2.0
theforeman foreman=1.1

Event History

May 29, 2013
Data Sourced
via Red Hat·07:08 AM
DescriptionSeverityAffected Software
Jul 31, 2013
CVE Published
via MITRE·10:00 AM
Data Sourced
via MITRE·10:00 AM
Description

Frequently Asked Questions

1

What is the severity of CVE-2013-2121?

CVE-2013-2121 has a severity rating that indicates it poses a significant risk due to potential remote code execution.

2

How do I fix CVE-2013-2121?

To fix CVE-2013-2121, update to Foreman version 1.2.0-RC2 or later, or apply any available security patches.

3

Who is affected by CVE-2013-2121?

CVE-2013-2121 affects users of Foreman versions up to 1.2.0 and Red Hat OpenStack version 3.0 who can create bookmarks.

4

What types of attacks are possible with CVE-2013-2121?

CVE-2013-2121 allows authenticated users to perform code injection attacks through the bookmarks feature.

5

Are there workarounds for CVE-2013-2121?

There are no official workarounds for CVE-2013-2121; upgrading to a secure version is recommended.

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