XSS vulnerabilities via various embeds in outline/outline

Valid

Reported on

Jul 5th 2023


Description

JSFiddle, Gliffy, Otter and Tldraw embeds lack sufficient input validation. Every one of them can be abused to achieve a stored XSS on a main application domain. This XSS triggers for everyone viewing the document.

Proof of Concept

PoC file is different for each vulnerable embed. See PoCs in Occurrences section

Steps to reproduce

  • Save PoC content to a file
  • Upload this file to Outline via import document

XSS triggers for everyone viewing this document

Technical details

These vulnerabilities are possible due to a combination of two factors:

  1. RegExps are missing ^ at the beginning.
  2. Components use props.attrs.href as src for resulting iframe

For example, a line

javascript:...//https://jsfiddle.net/a/b

would be processed by JSFiddle embed and result in

<iframe src="javascript:...//https://jsfiddle.net/a/b" ... >

which leads to payload being executed in the context of the main domain.

Mitigation recommendations

  • Add ^ in the beginning of the RegExps
  • Do not reflect props.attrs.href in the responses

Impact

Anyone with permissions to create new documents is able to run arbitrary javascript code in other users' browsers within application's main domain.

Attacker is able to do everything a victim has rights to do within the app. The most straightforward way to abuse it would be to:

  • Steal victim's users session
  • Issue a new API token for victim and exfiltrate it

If attacker has Editor role, this XSS could be used against a user with administrative permissions to escalate to the Admin role.

We are processing your report and will contact the outline team within 24 hours. 3 months ago
alexeypetrenko submitted a
3 months ago
alexeypetrenko
3 months ago

Researcher


I found three more XSS vulnerabilities in other embeds and would like to report them to you. Vulnerable embeds are: Gliffy, Otter and Tldraw.

For some weird reason, huntr.dev does not let me create multiple reports with the same type of vulnerability. It forces me to report other vulnerabilities here as Occurrences.

It does not feel right to me. I feel that these are four separate XSS vulnerabilities in different components. Not for occurences of the same XSS vulnerability.

What is your position on this?

We have contacted a member of the outline team and are waiting to hear back 2 months ago
Tom Moor
2 months ago

Maintainer


What is your position on this?

These are clearly the same bug in the same component 👍

alexeypetrenko
2 months ago

Researcher


same bug in the same component

Ok, I'll add them here in the Occurences

alexeypetrenko modified the report
2 months ago
alexeypetrenko submitted a
2 months ago
alexeypetrenko
2 months ago

Researcher


Tom, I changed wording of the report a little bit, so that it describes all four embeds at once. PoCs for each individual embed are in Occurrences. Also, I updated patch to fix all four embeds.

Tom Moor modified the Severity from Critical (9.6) to High (8.5) 2 months ago
Tom Moor
2 months ago

Maintainer


I'm reserving critical for vulnerabilities that extend outside of the team scope, considering you have to be an editor on the team you're basically attacking your own workspace.

The researcher has received a minor penalty to their credibility for miscalculating the severity: -1
Tom Moor validated this vulnerability 2 months ago
alexeypetrenko has been awarded the disclosure bounty
The fix bounty is now up for grabs
The researcher's credibility has increased: +7
Tom Moor marked this as fixed in 0.70.1 with commit 9431df 2 months ago
The fix bounty has been dropped
This vulnerability has been assigned a CVE
Tom Moor published this vulnerability 2 months ago
alexeypetrenko
2 months ago

Researcher


Thank you for the bounty!


Tom Moor modified the Severity from Critical (9.6) to High (8.5)

I agree that these XSS do not feel like critical. It just happened that CVSS calculations lead to it.


Also, what happened to the Occurrences? I've got paid as for one single vulnerability.

Tom Moor
2 months ago

Maintainer


I don't know, but this is one vulnerability – it was fixed by adding a missing sanitize call.

to join this conversation