Site Defacement And Denial Of Service Via Cross Site Scripting
A few legacy functionalities in an Oracle cloud application filtered user input with a regex blacklist instead of output encoding, allowing stored cross-site scripting. An attacker could inject a payload that executed for every group user on login, causing site defacement and denial of service.
Published on infosecwriteups.com
The ideal remediation for such client-side injection attacks is to perform output encoding, but some developers prefer fixing the issue by using a regex that filters certain keywords and/or special characters popularly used as part of an XSS payload. This definitely does work in cases where the developer understands…
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 application relied on a regex blacklist to filter user input instead of properly encoding output, allowing a crafted payload to bypass the filter and be stored.
Impact
The stored XSS could deface the site and deny access to all users, including administrators, until the payload was removed from the database.
What the attacker needed
Access to a vulnerable functionality; ability to submit a form shared with a group
The fix
The issues were fixed in Oracle's October 2020 and January 2021 patch releases.
How it was found
- Identify functionalities that filter special characters and keywords instead of encoding output.
- Study the regex pattern used for filtering.
- Craft a payload that bypasses the filter and triggers JavaScript execution.
- Submit the payload through a form that is shared with a group of users.
- Observe that the payload executes when any group user logs in.
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 shows user input without making it safe, so an attacker can make the site run their own JavaScript in other users' browsers. Here, the site tried to block bad input with a filter, but the filter could be bypassed, so a malicious script was saved and ran for everyone who logged in.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.