针对 CVE-2026-44848 的非破坏性检查工具:Portainer 在 Docker 插件端点缺少授权
针对 CVE-2026-44848 / GHSA-rrmm-9v76-h3p4 的非破坏性检查工具: Portainer 的 Docker 插件代理端点存在授权缺失问题。
该工具回答两个问题:
/plugins/* 操作?它刻意不会拉取、启用、禁用或修改任何插件。实时探测会调用
POST /plugins/<nonexistent>/disable;存在漏洞的实例会将该请求代理到 Docker,Docker 返回
404 plugin not found,而修复后的实例会在 Portainer 授权层以 403 拒绝该请求。
来自 GitHub 安全公告 / NVD:
| 受影响 | 已修复 |
|---|---|
>= 2.33.0, < 2.33.8 | 2.33.8 |
>= 2.39.0, < 2.39.2 | 2.39.2 |
>= 2.40.0, < 2.41.0 | 2.41.0 |
Portainer 管理员账户不能用于实时探测:即使在已修复的版本上,管理员也被允许管理插件, 因此两种版本的响应会完全相同。检查工具会检测到这种情况,并将结果报告为无法确定。
# Recommended: non-admin user with endpoint access
python3 check_portainer_cve_2026_44848.py \
--url https://portainer.example.com \
--username readonly-user \
--password 'secret'
# Self-signed TLS lab
python3 check_portainer_cve_2026_44848.py \
--url https://localhost:9444 --insecure \
--username readonly-user --password 'secret'
# Existing JWT / API credentials via environment (avoids shell history)
PORTAINER_TOKEN='...' python3 check_portainer_cve_2026_44848.py --url https://portainer.example.com
PORTAINER_PASSWORD='...' python3 check_portainer_cve_2026_44848.py --url https://portainer.example.com --username readonly-user
# Version check only (no credentials, no probe)
python3 check_portainer_cve_2026_44848.py --url https://portainer.example.com --version-only
# Machine-readable output
python3 check_portainer_cve_2026_44848.py ... --json
| 选项 | 描述 |
|---|---|
--url | Portainer 基础 URL(默认 https://localhost:9444) |
--username / --password | 非管理员凭据(或 PORTAINER_PASSWORD) |
--token | 现有 JWT(或 PORTAINER_TOKEN) |
--endpoint-id | 仅探测一个端点 ID |
--version-only | 跳过身份验证和实时探测 |
--insecure | 禁用 TLS 证书验证 |
--timeout | HTTP 超时时间(秒,默认 15) |
--json | 输出 JSON 报告 |
| 代码 | 含义 |
|---|---|
0 | 不受影响 |
1 | 存在漏洞(已确认授权绕过) |
2 | 不确定 / 错误(例如版本匹配但无可用的探测) |
GET /plugins 返回 200 还不够GET /plugins 被有意允许用于所有端点角色,包括只读角色,在存在漏洞和已修补的版本上都是如此。仅测试列表端点的检查器会在已修复版本上报告误报。
实际的缺陷在于,变更类插件路由未注册授权处理程序。在 2.33.8 中,修复为以下路由添加了 adminOnlyRoutes:
POST /plugins/pullPOST /plugins/{name}/enablePOST /plugins/{name}/disablePOST /plugins/{name}/pushPOST /plugins/{name}/upgradePOST /plugins/{name}/setPOST /plugins/createDELETE /plugins/{name}此检查器使用其中一个路由(disable),并传入一个不存在的插件名称,因此它可以在无副作用的情况下区分 403(被 Portainer 阻止)和 404(代理到 Docker)。
存在漏洞的 2.33.6,只读端点用户:
[*] Target: https://localhost:9444
[*] Portainer version: 2.33.6
[!] Version is in an affected range: >= 2.33.0, < 2.33.8
[*] Authenticated as: u_readonly (role 2)
[*] Probing endpoint 1 (primary)...
GET /plugins -> HTTP 200
POST /plugins/<probe>/disable -> HTTP 404
Result: bypass - Docker answered HTTP 404 for the probe plugin
[RESULT] VULNERABLE
A non-admin account reached a privileged Docker plugin operation.
Fixed release: 2.33.8
已修复 2.33.8,同一用户:
[*] Portainer version: 2.33.8
[+] Version is not in a known affected range.
POST /plugins/<probe>/disable -> HTTP 403
Result: blocked - Portainer denied the plugin operation
[RESULT] NOT VULNERABLE
2),因为厂商的向后移植补丁可能在不更改版本字符串的情况下阻止该路由。实时探测是更强的信号。api/http/proxy/factory/docker/transport.go 中的 adminOnlyRoutes仅可用于你拥有或已获授权测试的系统。