Stored XSS in report date selection
A stored cross-site scripting flaw existed in the date-selection controls of standard reports, where a crafted period preset value was saved in the victim's session and inserted into JavaScript without proper encoding. An attacker could supply a report URL that survived normal reauthentication, allowing the payload to run on the initial report and later report views that used the stored defaults.
- Fixed in 19 hours
- Disclosed after 27 days
Summary by the program
Description
HackerOne community member Matías López Pereira (HackerOne: @mlopez01) has reported stored XSS in the date-selection controls of standard reports. A crafted period_preset value could be saved in the victim's session and inserted into JavaScript without appropriate encoding. An attacker could supply a report URL retained through normal reauthentication; the payload could then execute on the initial report and subsequent report views using the stored defaults.
Resolution
Date-selection values are now encoded with JSON encoding appropriate for their JavaScript context. The same encoding has also been applied to the audit date-selection field.
Security advisory
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 period preset value taken from the request was stored in the session and then written into a JavaScript context without context-appropriate encoding.
Impact
Script of the attacker's choosing could execute in the victim's session on the initial report view and on subsequent views using the stored defaults, though the text does not state which actions that script could perform.
What the attacker needed
Victim opens an attacker-supplied report URL; victim reauthenticates normally
The fix
Date-selection values are now encoded with JSON encoding suited to their JavaScript context, and the same encoding was applied to the audit date-selection field.
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.
Cross-site scripting, or XSS, is when an attacker gets their own code to run inside someone else's browser session on a trusted site. Here the site saved a value from a report link into the user's session and later placed it into a script without making it safe, so the code ran whenever that report was opened. The stored version is worse because it keeps firing on later visits rather than only once.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.