Skip to content
XSS Disclosed report Beginner

Stored XSS in comments

The comment author's website field was inserted into a link's href without filtering, allowing a javascript: URL that could execute script when clicked. The default CSP blocked the attack, but clients without CSP or with modified CSP could be affected.

kelunik Follow

Originally disclosed on HackerOne

  • Fixed in under an hour
  • Paid in under an hour
  • Disclosed after 2 hours

Summary by the program

This one was a grey area. One one hand, it's literally stored and it's literally a Javascript payload that a user could accidentally execute. On the other hand, it pushes the envelope of what counts as a vulnerability or not. (We decided to award a bounty as per our stated policy to err on the side of generosity when in doubt.) That being said, there's no real world use-case for a guest to share a non-HTTP(S) URL in their attribution for blog comments.

The report

Comments can contain an author's website. This website is used in the href attribute of link elements and isn't filtered. Thus it allows URLs like javascript:alert(1) to be used. These URLs must be filtered by protocol, e.g. only allow http and https.

These attacks are blocked by the default CSP, but clients not supporting CSP or changed CSPs may be affected.

This issue affects Airship Version 1.1.2 and lower.

Attachments

Airship_Stored_Comment_XSS.png
Airship_Stored_Comment_XSS.png From the original on HackerOne

The original report as published on HackerOne, by kelunik. 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

Impact

An attacker could execute script in a victim's browser if the victim clicked the malicious link, but the default CSP blocked this and only clients without CSP or with changed CSPs may be affected.

What the attacker needed

Ability to post a comment; victim clicks the link; CSP absent or modified

The fix

The application should filter URLs by protocol, allowing only http and https.

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.

When you leave a comment, you can add a website address. The site put that address directly into a clickable link without checking it. An attacker could put a special address starting with 'javascript:' that runs code when someone clicks the link, but the site's default security policy (CSP) stopped it from working in most cases.

What is XSS?

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

More by kelunik

View all

1 more disclosed report, best first.

More from Paragon Initiative Enterprises

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.