SSD Advisory – IP-Board Stored XSS to RCE Chain
IP-Board's attachment filename randomisation used a predictable pseudo-random generator, allowing an attacker to predict the filename of an uploaded file without an extension. That file was served as HTML, enabling reflected XSS, which could be turned into stored XSS via an iframe and then escalated to RCE by stealing admin credentials or session ID.
ssd-disclosure.com
Published on ssd-disclosure.com
An independent security researcher, Simon Scannell, has reported this vulnerability to the SSD Secure Disclosure program.
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 filename randomisation relied on PHP's mt_rand(), which is not cryptographically secure and can be predicted if one output is known.
Impact
An attacker could read private messages, access restricted forums, perform actions as any user including administrators, and potentially achieve remote code execution by stealing admin credentials or session ID.
What the attacker needed
A normal forum user account; victim views the malicious post or message; admin interaction for RCE escalation
The fix
The vulnerability was fixed in IP-Board version 4.6.5.1.
How it was found
- Upload two files in a single request: one image and one file without an extension.
- Retrieve the MD5 hash from the image's filename.
- Crack the hash to find the mt_rand() value, then calculate the seed.
- Predict the filename of the file without an extension.
- Access that file directly; it is served as text/html.
- Embed the file in an iframe in a private message or post to achieve stored 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 write-up has not been written yet. The Original tab links to the source.
The forum software gave uploaded files random-looking names, but the randomness was predictable. An attacker could work out the name of a file they uploaded, make the forum show it as a web page, and run their own code in other users' browsers. That could let them take over an administrator account and run commands on the server.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.