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.
Originally disclosed on Cisco Talos
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.
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
- Create a new filter using the admin UI.
- Observe the redirect to a URL containing the filter information.
- Craft a URL with a malicious filter value.
- 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.