Skip to content
XSS Write-up Intermediate

Mass Assignment + JSON Validation Bypass: From Zero Access to Full Admin Takeover

An unprotected resource-creation endpoint accepted JSON bodies that bypassed ASP.NET request validation, allowing stored cross-site scripting in the admin panel. A separate unprotected registration endpoint could be abused by supplying a role identifier, granting a new account full organisational access.

0RedX_ Follow

Published on medium.com

الح� دُ للهِ الذي � َنَّ علينا فهدانا، الح� دُ للهِ ح� دًا كثيرًا طيبًا � باركًا فيه، ح� دًا ك� ا ينبغي لجلال وجهك وعظي� سلطانك.الله� َّ أعِزَّ الإسلا� َ وال� سل� ين، وانصرنا على أعدائك أعداءِ الدين

Red-X, on medium.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 JSON model binder skipped ASP.NET's request validation, and the registration endpoint trusted a client-supplied role identifier without authorisation checks.

Impact

An attacker could run script in an administrator's session and could register an account with full access to employee PII, HR documents, vendor data and client records.

What the attacker needed

No account needed; victim (admin) views the resource page; knowledge of a role identifier value

How it was found

  1. Fuzz the site and find the /resource listing page
  2. Read the JavaScript files to find the /Resource/Create endpoint
  3. Send a form-encoded request with a script in the name field and observe the 500 error
  4. Resend the same data as JSON with the script in the name field
  5. Visit the resource page and see the script execute
  6. Fuzz /Account/ to find /Account/Register and submit a sign-up with a role identifier

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 site had a hidden page for creating folders and files that anyone could reach. When the author sent the name field as a normal form, the server blocked dangerous characters, but sending the same data as JSON slipped past that check, so a script got saved and ran for admins. Separately, a hidden sign-up page let anyone create an account, and adding an extra field for the role gave the new account full admin rights.

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.