CRITICAL: HTML injection - redirect - CSRF
A code block macro in Confluence allowed HTML injection, enabling an attacker to redirect users from search results to an arbitrary webpage. This could be used for CSRF, credential phishing, or browser hijacking.
Atlassian
Originally disclosed on Bugcrowd
- Accepted in 19 hours
- Fixed in 34 days
- Disclosed after 3.1 years
Summary by Atlassian
HTML injection vulnerability in Confluence
Summary by beerbrain
Vulnerability
Redirect confluence searches to any webpage you want.
- To create make a code block macro with the contents as follows: <meta http-equiv = "refresh" content = "2; url = <insert url>" />
- Add text in the body of the document with keywords to pick up on a search.
- Search for keywords and be redirected to any webpage you have chosen.
Possible exploits:
- The webpage you choose can have any javascript you wish, for instance a browser hijack that gives you full network access of the client's browser session (e.g. internal corporate networks).
- You can utilize the redirect as a CSRF attack.
- You can be fancy and clone the confluence search page in your redirect and add malicious code (e.g. browsjer hijack).
- You can redirect to a login screen for confluence or corporate SSO to gain user credentials
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the code block macro did not properly sanitise or escape HTML, allowing a meta refresh tag to be injected and executed.
Impact
An attacker could redirect users to a malicious page, potentially leading to CSRF, browser hijacking, or credential theft via a fake login screen.
What the attacker needed
Ability to create or edit a Confluence page; victim searches for specific keywords
How it was found
- Create a code block macro containing a meta refresh tag with the target URL.
- Add text with keywords to the document body.
- Search for those keywords to trigger the redirect.
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 report has not been written yet. The Original tab links to the source.
Confluence lets users add 'macros' like code blocks. The report says a code block could contain a special HTML tag that makes the browser automatically go to another website after a short delay. So when someone searched for certain words, they were sent to a page the attacker chose, which could be used to steal data or trick them.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.