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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2025-62506 — Verification script for CVE-2025-62506, a privilege escalation vulnerability in MinIO service accounts, testing if restricted accounts can bypass inline policies to create unrestricted accounts. | Kitploit
工具/GitHubGitHub/yoshino-s/cve-2025-62506
Privilege EscalationVulnerability AnalysisExploitationPenetration TestingCloud Security
GitHubyoshino-s/cve-2025-62506

CVE-2025-62506

Verification script for CVE-2025-62506, a privilege escalation vulnerability in MinIO service accounts, testing if restricted accounts can bypass inline policies to create unrestricted accounts.

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

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2025-62506 漏洞验证脚本

English

概述

此仓库包含CVE-2025-62506的验证脚本,这是一个MinIO服务账户和STS(安全令牌服务)账户中的权限提升漏洞。

漏洞描述

CVE-2025-62506 是一个权限提升漏洞,允许受限的服务账户和STS账户在执行"自己的"账户操作时绕过其内联策略限制,特别是创建新服务账户时。

技术细节

漏洞存在于cmd/iam.go中的IAM策略验证逻辑。当验证受限账户的会话策略执行自己账户的操作(如创建服务账户)时,代码错误地依赖DenyOnly参数。

DenyOnly标志用于允许账户执行与其自己账户相关的操作,只检查操作是否被明确拒绝。但是,当存在会话策略(子策略)时,系统应该验证操作是否被会话策略实际允许,而不仅仅是没有被拒绝。

攻击场景

  1. 管理员创建一个具有受限内联策略的服务账户或STS账户(例如,只允许访问bucket1和bucket2)
  2. 受限账户尝试为自己创建一个新的服务账户,而不指定任何策略限制
  3. 由于绕过,新创建的服务账户获得了完整的父权限,而不是被内联策略限制
  4. 攻击者现在获得了超出预期限制的权限提升

影响

  • 攻击复杂度:低 - 利用只需要受限服务/STS账户的有效凭据
  • 机密性:高 - 攻击者可以访问超出其预期限制的存储桶和对象
  • 完整性:高 - 攻击者可以在其授权范围之外修改、删除或创建对象
  • 可用性:无 - 不直接影响服务可用性

CVSS评分

8.1 (高危) - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

受影响版本

RELEASE.2025-10-15T17-29-55Z之前的所有版本

修复版本

RELEASE.2025-10-15T17-29-55Z

参考资料

  • GitHub安全公告
  • 修复提交
  • 修复PR

验证脚本

verify_cve_2025_62506.py脚本测试您的MinIO安装是否易受CVE-2025-62506攻击。

先决条件

  • Python 3.7+
  • 运行中的MinIO服务器(可以使用提供的docker-compose.yml启动)
  • 必需的Python包:minio

安装

  1. 启动MinIO服务器:
root@kitploit:~
docker-compose up -d
  1. 安装依赖:
root@kitploit:~
pip install minio

脚本工作流程

验证脚本遵循以下步骤:

步骤1:创建测试存储桶

  • 创建三个测试存储桶:bucket1、bucket2、bucket3
  • 这些存储桶用于测试账户访问权限限制

步骤2:创建受限策略

  • 创建一个只允许访问bucket1和bucket2的IAM策略
  • 策略详情:
    • 允许操作:s3:*(所有S3操作)
    • 允许资源:bucket1/*、bucket2/*
    • 拒绝资源:所有其他存储桶(包括bucket3)

步骤3:创建受限服务账户

  • 使用上述受限策略作为内联策略创建服务账户
  • 账户详情:
    • 访问密钥:restricted
    • 秘密密钥:restricted123
    • 策略:内联受限策略(仅bucket1和bucket2)
    • 预期行为:只能访问指定存储桶

步骤4:测试受限账户访问

  • 使用受限账户列出存储桶
  • 验证权限是否正确限制
  • 预期结果:只能看到bucket1和bucket2

步骤5:尝试权限提升(漏洞测试)

  • 使用受限账户尝试创建新的服务账户
  • 新账户创建时不指定策略(应该继承父限制)
  • 漏洞测试:如果创建成功,尝试使用新账户访问未经授权的资源(bucket3)
  • 安全行为:创建应该失败并显示权限被拒绝错误

清理

  • 删除所有测试服务账户
  • 删除测试策略
  • 删除所有测试存储桶及其内容

使用方法

  1. 确保MinIO正在运行:
root@kitploit:~
docker-compose up -d
  1. 运行验证脚本:
root@kitploit:~
python verify_cve_2025_62506.py

预期输出

易受攻击的系统

root@kitploit:~
🚀 CVE-2025-62506 Vulnerability Verification Script
============================================================
📋 Script Description:
   This script tests for the MinIO service account privilege escalation vulnerability (CVE-2025-62506)
   The vulnerability allows restricted service accounts to bypass inline policies when creating new accounts
============================================================

📦 Step 1: Create Test Buckets
   Creating three test buckets: bucket1, bucket2, bucket3
   Used to test account access permission restrictions
----------------------------------------
   ✅ Created bucket: bucket1
   ✅ Created bucket: bucket2
   ✅ Created bucket: bucket3

🔒 Step 2: Create Restricted Policy
   Creating a policy that only allows access to bucket1 and bucket2
   This policy will be applied to the restricted service account
----------------------------------------
   ✅ Created policy: restricted-policy
   📋 Policy Permissions:
      - Allowed Actions: s3:* (all S3 operations)
      - Allowed Resources: bucket1/*, bucket2/*
      - Denied Resources: All other buckets

👤 Step 3: Create Restricted Service Account
   Creating a service account with the restricted policy above
   This account can only access bucket1 and bucket2
----------------------------------------
   ✅ Created service account: restricted
   📋 Account Permissions:
      - Access Key: restricted
      - Policy: Inline restricted policy (bucket1 and bucket2 only)
      - Expected Behavior: Can only access specified buckets

🧪 Step 4: Test Restricted Account Access
   Using the restricted account to list buckets, verifying permissions are properly restricted
   Expected Result: Can only see bucket1 and bucket2
----------------------------------------
   ✅ Restricted account correctly limited to allowed buckets
      Accessible buckets: ['bucket1', 'bucket2']

⚡ Step 5: Attempt Privilege Escalation (Vulnerability Test)
   Using the restricted account to attempt creating a new service account
   New account without specified policy should inherit parent restrictions
   Vulnerability: Restricted account may bypass policy to create unrestricted new accounts
----------------------------------------
   ✅ Created service account: newroot
   📋 Attempting to use new service account to access unauthorized bucket3
   ⬆️ Attempting to upload object to bucket3 to verify permissions
   ⬇️ Attempting to list objects to verify permissions
      Found object: test-object
   ❌ VULNERABLE: Restricted account successfully created new service account
      New account permissions: Unrestricted (inherited full parent permissions)
      This indicates CVE-2025-62506 vulnerability is present!

🧹 Cleaning up test resources...
----------------------------------------
   ✅ Removed service account: restricted
   ✅ Removed service account: newroot
   ✅ Removed policy: restricted-policy
   ✅ Removed bucket: bucket1
   ✅ Removed bucket: bucket2
   ✅ Removed bucket: bucket3

============================================================
📊 Verification Results
============================================================
❌ RESULT: VULNERABLE - CVE-2025-62506 is present
💡 Recommendation: Upgrade immediately to patched version RELEASE.2025-10-15T17-29-55Z or higher
🔗 Reference: https://github.com/minio/minio/security/advisories/GHSA-jjjj-jwhf-8rgr
============================================================

安全系统

root@kitploit:~
🚀 CVE-2025-62506 Vulnerability Verification Script
============================================================
📋 Script Description:
   This script tests for the MinIO service account privilege escalation vulnerability (CVE-2025-62506)
   The vulnerability allows restricted service accounts to bypass inline policies when creating new accounts
============================================================

📦 Step 1: Create Test Buckets
   Creating three test buckets: bucket1, bucket2, bucket3
   Used to test account access permission restrictions
----------------------------------------
   ✅ Created bucket: bucket1
   ✅ Created bucket: bucket2
   ✅ Created bucket: bucket3

🔒 Step 2: Create Restricted Policy
   Creating a policy that only allows access to bucket1 and bucket2
   This policy will be applied to the restricted service account
----------------------------------------
   ✅ Created policy: restricted-policy
   📋 Policy Permissions:
      - Allowed Actions: s3:* (all S3 operations)
      - Allowed Resources: bucket1/*, bucket2/*
      - Denied Resources: All other buckets

👤 Step 3: Create Restricted Service Account
   Creating a service account with the restricted policy above
   This account can only access bucket1 and bucket2
----------------------------------------
   ✅ Created service account: restricted
   📋 Account Permissions:
      - Access Key: restricted
      - Policy: Inline restricted policy (bucket1 and bucket2 only)
      - Expected Behavior: Can only access specified buckets

🧪 Step 4: Test Restricted Account Access
   Using the restricted account to list buckets, verifying permissions are properly restricted
   Expected Result: Can only see bucket1 and bucket2
----------------------------------------
   ✅ Restricted account correctly limited to allowed buckets
      Accessible buckets: ['bucket1', 'bucket2']

⚡ Step 5: Attempt Privilege Escalation (Vulnerability Test)
   Using the restricted account to attempt creating a new service account
   New account without specified policy should inherit parent restrictions
   Vulnerability: Restricted account may bypass policy to create unrestricted new accounts
----------------------------------------
   ✅ SECURE: Restricted account failed to create new service account
      Error: Permission correctly denied
      Details: Access Denied.

🧹 Cleaning up test resources...
----------------------------------------
   ✅ Removed service account: restricted
   ✅ Removed policy: restricted-policy
   ✅ Removed bucket: bucket1
   ✅ Removed bucket: bucket2
   ✅ Removed bucket: bucket3

============================================================
📊 Verification Results
============================================================
✅ RESULT: SECURE - CVE-2025-62506 is patched
🎉 Your MinIO version has this vulnerability patched
============================================================

缓解措施

  1. 升级MinIO:更新到RELEASE.2025-10-15T17-29-55Z或更高版本
  2. 审计服务账户:检查所有由非管理员账户创建的服务账户
  3. 撤销可疑账户:删除任何可能通过利用创建的服务账户
  4. 检查访问日志:检查对敏感存储桶的未授权访问

许可证

此验证脚本按原样提供,仅用于安全测试目的。

下载工具