Skip to content
XSS Disclosed report Beginner

Stored XSS in wordpress.com

A stored cross-site scripting flaw let an attacker inject a crafted iframe with a javascript link into comments or post bodies and titles on wordpress.com and hosted blogs. When a victim clicked the injected link, script ran in the context of the wordpress.com domain or the victim's blog subdomain, allowing actions and data access as that user.

adhamsadaqah Follow

Originally disclosed on HackerOne

  • Paid in 11 days
  • Disclosed after 3 months

Summary:

Stored XSS as a comment or as a post (body or title) at https://wordpress.com/read/feeds/{blog_id}/posts/{post_id} https://yoursubdomain.wordpress.com using the payload:

<iframe <><a href=javascript&colon;alert(document.cookie)>Click Here</a>=&gt;&lt;/iframe&gt;

Steps To Reproduce:

  • As a comment
    1. Log in to wordpress.com
    2. Choose a post from the feeds
    3. Add a comment with the payload: <iframe <><a href=javascript&colon;alert(document.cookie)>Click Here</a>=&gt;&lt;/iframe&gt;
  1. By clicking on Click Here, an alert will fire with cookies of the domain wordpress.com
  • As a post
    1. Log in to wordpress.com
    2. Create a new post or site.
    3. Add the payload <iframe <><a href=javascript&colon;alert(document.cookie)>Click Here</a>=&gt;&lt;/iframe&gt; to the body or the title of the blog post
    4. preview or publish your new blog post
    5. By clicking on Click Here, an alert will fire with cookies of the domain yoursubdomain.wordpress.com or wordpress.com if the post is previewed from the WordPress feed.
  1. If you add comments to your blog post and using the payload mentioned above as a comment an Stored XSS alert will fire when you click on the link.

Impact

  • Perform arbitrary requests on the behalf of other users with security context of wordpress.com or blogsubdomain.wordpress.com
  • Read any data the attacked user has access to.

Attachments

POC2.png
POC2.png From the original on HackerOne
POC1.png
POC1.png

The original report as published on HackerOne, by adhamsadaqah. 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 perform arbitrary requests on behalf of other users with the security context of wordpress.com or a blog subdomain, and could read any data the attacked user has access to.

What the attacker needed

A wordpress.com account; victim clicks the injected link

How it was found

  1. Log in to wordpress.com and pick a post from the feeds.
  2. Add a comment containing the crafted iframe link.
  3. Click the injected link and observe the alert showing the wordpress.com cookies.
  4. Alternatively, create a new post or site and put the same crafted link in the body or title.
  5. Preview or publish the post, then click the link to see the alert fire for the blog subdomain or wordpress.com.
  6. Add the crafted link as a comment on the blog post and click it to trigger the stored alert.

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 (XSS) is when a site lets someone else's code run in your browser as if the site itself wrote it. Here, a comment or post could contain a disguised link that runs code when clicked. Because the code runs under the site's own name, it can act as the logged-in user, for example reading their data or making requests for them.

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 adhamsadaqah

View all

1 more disclosed report, best first.

More from Automattic

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.