Skip to content
XSS Write-up Advanced

From XSS to Reverse PHP Shell

A persistent cross-site scripting flaw in vBSEO's linkback handling let an attacker store script that ran in the administrator and moderator panels. The author chained this with a script that read the admin's CSRF token and created a PHP plugin, giving a reverse shell on the forum server.

exploit-db.com

Published on exploit-db.com

XSS is not a big deal, or is it? On many occasions, I’ve seen this vulnerability being classified as useless, not serious, and being a low threat.

The author, on exploit-db.com

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 linkback title was stored unsanitised and rendered without encoding in the admin and moderator panels, unlike the public thread view.

Impact

An attacker could run code on the forum server once an administrator viewed the linkback page, though the author notes the script may leave traces and the admin might notice a broken lock icon over HTTPS.

What the attacker needed

VBSEO installed with RefBacks enabled; attacker hosts a page online; admin views the linkback panel

How it was found

  1. The attacker publishes a malicious HTML page online with RefBacks enabled on the target.
  2. The attacker clicks a link to the target forum, which makes vBSEO fetch the attacker's page.
  3. The page title is saved into the database and shown unsanitised in the admin and mod panels.
  4. An administrator opens the linkback page and the stored script runs.
  5. The script reads the adminhash and securitytoken from a hidden iframe and submits a form creating a PHP plugin.
  6. The plugin connects back to the attacker as a reverse shell.

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.

A forum plugin called vBSEO took the title of a page that linked back to the forum and saved it without cleaning it. When an administrator opened the linkback page, hidden JavaScript ran in their logged-in browser and quietly used their permissions to install a PHP plugin, which let the attacker 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.

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.