I Asked Shodan, It Gave Me a Bounty Says ‘Sure, Why Not?’”
A reflected cross-site scripting flaw in Liferay Portal's marketplace app manager allowed an unauthenticated attacker to inject JavaScript through a crafted icon URL parameter. The author found exposed Liferay instances via Shodan and confirmed script execution in the victim's browser.
Hello Hunters! I’m Abdelrahman (A0xtrojan), and I’m excited to share my write-up with you, found in a public program on in intigriti.
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the iconURL parameter was reflected into the page without proper output encoding or sanitisation.
Impact
An attacker could steal cookies, redirect users to phishing pages, or hijack sessions on public-facing portals.
What the attacker needed
Internet-exposed Liferay Portal instance; victim clicks a crafted link
How it was found
- Search Shodan for exposed Liferay instances using a dork based on the portal's CSS marker.
- Pick a target from the results.
- Send a crafted request to the marketplace app manager icon endpoint with a malicious iconURL value.
- Observe that the JavaScript executes in the browser.
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 write-up has not been written yet. The Original tab links to the source.
Cross-site scripting (XSS) is when a website puts user-supplied text into a page without cleaning it, so an attacker can make the page run their own JavaScript. Here the 'iconURL' value was reflected into the page, letting a crafted link execute code in the visitor's browser. The author used Shodan, a search engine for internet-connected devices, to find Liferay portals that were exposed online.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.