[Disclosure] DOM-based XSS on BadApe NFT website
An outdated Elementor plugin on the BadApe NFT website allowed a DOM-based cross-site scripting attack via a crafted URL fragment. An attacker could execute arbitrary JavaScript in a victim's browser by tricking them into visiting a malicious link.
Recently, one of our wizards came across BadApe NFT. The BadApe NFT project is a collection of 10,000 bad apes with proof of ownership stored on the Binance Smart Chain.
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 Elementor plugin decoded base64-encoded JSON from the URL fragment and inserted its HTML content into the page without proper sanitisation.
Impact
An attacker could execute arbitrary JavaScript in a victim's browser, potentially leading to data theft or other malicious actions, though the report only demonstrates an alert box.
What the attacker needed
Victim clicks a crafted link
The fix
The issue was fixed by the BadApe NFT team, as confirmed by the reporter.
How it was found
- Enumerate subdomains of the target domain.
- Identify the main website and note it runs an outdated WordPress version.
- Scan for outdated plugins and find Elementor is vulnerable to DOM-based XSS.
- Craft a URL with a base64-encoded JSON payload in the fragment that triggers an alert box.
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 a flaw where a website runs harmful code in a visitor's browser. Here, a plugin took a hidden part of the web address, decoded it, and inserted it into the page without checking it, so a specially crafted link could run a script. The attacker only needed to get someone to click that link.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.