[Hardening] F-21: Base64-Encoded User Data Containing Plain Text Passwords in DB.
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 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
- 平均マージ
- 9日 23時間
- マージ済み PR(30日)
- 19
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/cloudstack のほかの issue
-
Remote access VPN users are disconnected on every LB, ACL, port forward or firewall change (xl2tpd restarted on every iptables pass)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/cloudstack#14545 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
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 が 6 日前に担当しました。 オープン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 が 21 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
apache/cloudstack#14381 · コメント 1 件 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
apache/cloudstack の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
a2aproject/a2a-java#1275 ·
メンテナーはふだん 1 日以内に返信
-
module/ftp Type/Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ballerina-platform/ballerina-library#9476 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
HMCL-dev/HMCL#7175 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
anwilli5/coin-collection-android-US#515 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
FasterXML/jackson-databind#6398 ·
メンテナーはふだん 1 日以内に返信