Skip to content
XSS Disclosed report Beginner

XSS with Time-of-Day Format

A time-of-day format preference was not sanitised, allowing HTML injection that shows an XSS popup in the repository file overview. The report notes malicious use is difficult because it is the user's own preference.

candux Follow

Originally disclosed on HackerOne

  • Fixed in under an hour
  • Paid in under an hour
  • Disclosed after 30 days
  • Go to your user preferences
  • Put the following into Time-of-Day Format (with the quote): '<\i\m\g \s\r\c=x \o\n\e\r\r\o\r=\a\l\e\r\t(\'X\S\S\')\>'
  • Open a repository (diffusion) -> XSS-Popup

The repository file-overview is the only place where I could see the XSS so far.

Because it's a user own preference, it is not easy to actually do something malicious in a real-world scenario. But it's definitely possible if you think hard enough about it :)

Cheers, David

mongoose

The original report as published on HackerOne, by candux. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 time-of-day format preference was inserted into the repository file overview without HTML escaping or sanitisation.

Impact

An attacker could execute script in the victim's browser, but only if the victim first sets the malicious preference themselves, so real-world malicious use is limited.

What the attacker needed

Victim sets their own time format preference; victim views a repository file overview

How it was found

  1. Open user preferences.
  2. Enter a crafted time-of-day format containing HTML markup.
  3. Open a repository and view the file overview to trigger the script.

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 you type a custom time format into your settings, and it put that text directly into the page without cleaning it. If the text contains HTML tags, the browser treats them as real code and runs any script inside. This is called cross-site scripting (XSS): an attacker makes a page run their code in someone else's browser.

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 Phabricator

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.