Skip to content
XSS Advisory Beginner CVE-2017-12098

rails_admin rails gem XSS vulnerability

The rails_admin gem version 1.2.0 reflects user-supplied filter values without proper neutralisation, allowing an attacker to craft a URL that executes arbitrary JavaScript in an authenticated user's browser. An attacker can phish an authenticated user to trigger the XSS.

Zachary Sanchez Follow

Originally disclosed on Cisco Talos

Medium 6.1 View original

An exploitable XSS vulnerability exists in the add filter functionality of the railsadmin rails gem version 1.2.0. A specially crafted URL can cause an XSS flaw resulting in an attacker being able to execute arbitrary javascript on the victim’s browser.

Zachary Sanchez, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application failed to properly encode or sanitise user-supplied filter values before reflecting them in the admin interface page.

Impact

An attacker could execute arbitrary JavaScript in an authenticated user's browser, potentially leading to actions performed on their behalf.

What the attacker needed

Victim is authenticated; victim clicks a crafted link

How it was found

  1. Create a new filter using the admin UI.
  2. Observe the redirect to a URL containing the filter information.
  3. Craft a URL with a malicious filter value.
  4. Send the crafted URL to an authenticated user to trigger the XSS.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Cross-site scripting (XSS) is a flaw where a website inserts user input into a page without making it safe, so the input runs as code in the visitor's browser. Here, the admin filter feature put the filter value straight into the page, so a link containing a script could run when an admin opened it. The attacker just needs to trick a logged-in admin into clicking a crafted link.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by Zachary Sanchez

View all

1 more disclosed report, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.