cbcvebase.
CVE-2013-2121
published 2013-07-31

CVE-2013-2121: 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…

PriorityP351medium6CVSS 2.0
AVNACMAuSCPIPAP
EXPLOIT
EPSS
24.78%
97.7th percentile
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.

Affected

3 ranges
VendorProductVersion rangeFixed in
redhatopenstack
theforemanforeman<= 1.2.0
theforemanforeman

Detection & IOCsextracted from sources · hover to see the quote

url/users/login
url/bookmarks
cookie_session_id=[0-9a-f]*
command'bookmark[controller]' => "eval(params[:#{payload_param}])#"
pathapp/controllers/bookmarks_controller.rb
  • Monitor POST requests to /bookmarks endpoint where the 'bookmark[controller]' parameter contains 'eval(' — this is the injection vector used to achieve remote code execution.
  • The vulnerable code path is in the create method of BookmarksController: it passes the user-supplied controller attribute directly into an eval() call — flag any bookmark creation where the controller field contains Ruby code constructs.
  • The controller attribute is validated with regex /\A(\S+)\Z/ (no spaces allowed), but attackers circumvent this — look for non-space Ruby expressions in the bookmark[controller] POST parameter.
  • Exploit flow involves: (1) POST login to /users/login, (2) GET to harvest CSRF token, (3) POST to /bookmarks with injected controller parameter — correlate this 3-step sequence from a single source IP.
  • The exploit targets Foreman 1.2.0-RC1 and earlier; alert on Foreman versions prior to 1.2.0-RC2 receiving POST requests to /bookmarks.
  • ·Exploitation requires the attacker to be authenticated and have permissions to create bookmarks — this is not an unauthenticated attack vector.
  • ·The Metasploit module defaults to SSL on port 443; detection rules should cover both HTTP (80) and HTTPS (443) traffic to the /bookmarks endpoint.
  • ·The fix was committed as ef4b97d177c58c9532730d53dca0517bc869a0ce and cherry-picked to 1.2-stable and 1.1-stable branches; patched instances are not vulnerable.

CVSS provenance

nvdv2.06.0MEDIUMAV:N/AC:M/Au:S/C:P/I:P/A:P
vendor_redhat6.0MEDIUM
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.