[Hardening] F-21: Base64-Encoded User Data Containing Plain Text Passwords in DB.
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
调研方向
从 server/src/main/java/com/cloud/api/ApiServer.java 第 825 行附近开始,issue 在这里链接到了 toJson(params) 序列化。阅读相关的 F-18 和 F-19 发现以了解背景,然后追踪 DeployVMCmd 参数如何到达 job_cmd_info。完成标准是存储的命令信息省略或遮蔽完整的 userdata 值;添加或运行针对序列化命令参数的相关测试。
由索引模型根据 Issue 内容生成。
描述
The required feature described as a wish
Description: The userdata parameter supplied to DeployVMCmd is stored base64-encoded (not encrypted) in DB. Base64 does not offer adequate protection for sensitive information, and in practice the decoded cloud-init frequently contains plaintext passwords (plain_text_passwd, passwd, chpasswd). Because user data is opaque to the platform, its contents cannot be selectively filtered. The field must be treated as sensitive in its entirety.
Affected Components: Management API / DB (cloud.async_job, column job_cmd_info).
Impact: Anyone with read access to the database can base64-decode the stored user data and recover any plaintext credentials the user set in their cloud-init, including passwords for accounts configured with passwordless sudo, thereby granting effective root on the guest.
Steps to Reproduce:
- Deploy an instance with cloud-init userdata that sets a user password (e.g.,
plain_text_passwdor achpasswdblock). - Query the database:
- mysql>
SELECT job_cmd_info FROM async_job WHERE job_cmd LIKE '%DeployVMCmd%' AND job_cmd_info LIKE '%"userdata":%';
- mysql>
- Base64-decode the
userdatavalue and observe the embedded credentials in cleartext.
Recommended Remediation: Redact or omit the userdata attribute from params before the toJson(params) serialization (this is the same code site that F-18 identifies for the top-level password parameter). It is recommended to treat the whole cloud-init field as sensitive, like in F-19.
See more examples:
- 主要语言
- Java
- 星标
- 3.1k
- 派生
- 1.4k
- 平均合并
- 10 天 6 小时
- 30 天内合并 PR
- 22
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/cloudstack 的其他 Issue
-
bug status:has-work-around
难度 2/5 1-3 小时 新手友好度 78/100
apache/cloudstack#14465 · 1 条评论 ·
维护者通常 1 天内回复
-
4.23.0.0: restartVPC cleanup=true with public IPs on two VLANs fails with UnsupportedOperationException and leaves the VPC without a backup router可能已有人在做 @bernardodemarco 于 3 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
apache/cloudstack#14430 · 4 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 77/100
apache/cloudstack#14427 · 1 条评论 ·
维护者通常 1 天内回复
-
[UI] "canceled - Unable to reach the management server" notification when switching from project to default view on Instances page (4.20.3)可能已有人在做 @Damans227 于 18 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 65/100
apache/cloudstack#14381 · 1 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
-
Routed network ACL rules with a protocol number are not applied on the VR (ip nexthdr instead of ip protocol)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭component:virtual-router
难度 2/5 1-3 小时 新手友好度 82/100
apache/cloudstack#14351 ·
维护者通常 1 天内回复
查看 apache/cloudstack 的全部 Issue
相似的 Issue
-
Documentation
难度 1/5 1 小时以内 新手友好度 88/100
OWASP/SecurityShepherd#1097 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
Dans-Plugins/Medieval-Roleplay-Engine#392 · 1 条评论 ·
维护者通常 1 天内回复
-
Invalid If-Modified-Since or If-Unmodified-Since header results in 500 with Request.evaluatePreconditions()可能已有人在做 @pschaub 今天认领。 未关闭kind/bug triage/needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 62/100
Vakore/ZappierGames#236 ·