[public-api.wordpress.com] Stored XSS via Crafted Developer App Description
- Triaged in under an hour
- Fixed in 46 hours
- Paid in 46 hours
- Disclosed after 46 hours
Summary by the researcher
A crafted third-party app description could be leveraged to execute arbitrary JavaScript on the WordPress.com Public API endpoint through an OAuth authorize link. Thanks again to @xknown for the highly impressive response and remediation time.
The report
Hi,
An injection in the "App Description" field within the WordPress Developers platform can be used to store and reflect JavaScript in the public-api.wordpress.com context.
Steps to reproduce
-
As the "adversary" user, please visit the WordPress.com My Apps page and select "Create New Application"
-
Populate the "Name" and "Website URL" fields with generic data, and set the Redirect URL to
https://google.comfor the purposes of this demonstration -
Next, please copy the below proof of concept payload into the "Description" field, save your App, and take note of the client ID
-
Substitute the client ID into the following URL (which can be accessed by any user to reproduce this vulnerability)
https://public-api.wordpress.com/oauth2/authorize?client_id=YourID&redirect_uri=https://google.com&response_type=code&blog=
- Finally, mouse over the
TESTLINKtext to execute the JavaScript payload.
Proof of concept payload
'"><div id="test"><head><base href="javascript://"/></head><body><a href="/. /, /' onmouseover=confirm(document.domain); abc=abc">TESTLINK
Supporting evidence

Verified conditions
At the time of testing, I have successfully confirmed exploitability in the following environments:
- Chrome OS 63.0.3239.50 (Official Build) beta (64-bit)
- Firefox 55.0.3 stable (32-bit) on Ubuntu 16.04.3 LTS
Thanks,
Yasin
Impact
An adversary can leverage this vulnerability in a crafted API authorisation request that, if issued by another WordPress.com user, will cause arbitrary JavaScript code to execute within the target's browser in the context of their WordPress session.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A medium-severity XSS bug in Automattic. HackerOne made it public on 1 December 2017.
About XSS
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.