Skip to content
XSS Disclosed report Beginner CVE-2021-3780

Cross-site Scripting in peertube

PeerTube allowed an uploaded SVG image to execute JavaScript when opened, letting an attacker steal a victim's session keys stored in local storage. An attacker could send the URL of the malicious SVG to other users and obtain their complete session keys.

chocobozzz/peertube

Originally disclosed on huntr

peertube is vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). It was found that one could upload a SVG image and then send the url of that to other users and when they open the link we can get their complete session keys as the session keys stored in local storage and with Javascript easily can be stolen by attackers.

From the GitHub Advisory Database (GHSA-f2c5-997w-7f5c, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

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 application served user-uploaded SVG files inline without sanitising or restricting their active content, so embedded JavaScript executed in the site's origin.

Impact

An attacker could steal a victim's complete session keys and likely take over their account, though the text does not state any mitigating factors.

What the attacker needed

Ability to upload an SVG image; victim opens the SVG URL

How it was found

  1. Upload an SVG image to PeerTube.
  2. Send the URL of the uploaded SVG to other users.
  3. When a user opens the link, JavaScript in the SVG runs and reads session keys from local storage.

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.

A website let people upload pictures, including a type called SVG that can contain code. When another user opened that picture's link, the code ran in their browser and could read their login information. The attacker could then use that information to act as the victim.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More from chocobozzz/peertube

View all

The newest disclosed reports for this program.

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.