René's URL Explorer Experiment


Title: Sensitive User Data and Storage Credentials Exposure in Baremetal PING PXE Resource Logs · Issue #13298 · apache/cloudstack · GitHub

Open Graph Title: Sensitive User Data and Storage Credentials Exposure in Baremetal PING PXE Resource Logs · Issue #13298 · apache/cloudstack

X Title: Sensitive User Data and Storage Credentials Exposure in Baremetal PING PXE Resource Logs · Issue #13298 · apache/cloudstack

Description: Advisory Details Title: Sensitive User Data and Storage Credentials Exposure in Baremetal PING PXE Resource Logs Description: A sensitive logging vulnerability exists in the Apache CloudStack PING PXE baremetal plugin. When orchestrating...

Open Graph Description: Advisory Details Title: Sensitive User Data and Storage Credentials Exposure in Baremetal PING PXE Resource Logs Description: A sensitive logging vulnerability exists in the Apache CloudStack PING ...

X Description: Advisory Details Title: Sensitive User Data and Storage Credentials Exposure in Baremetal PING PXE Resource Logs Description: A sensitive logging vulnerability exists in the Apache CloudStack PING ...

Opengraph URL: https://github.com/apache/cloudstack/issues/13298

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Sensitive User Data and Storage Credentials Exposure in Baremetal PING PXE Resource Logs","articleBody":"### Advisory Details\n\n**Title**: Sensitive User Data and Storage Credentials Exposure in Baremetal PING PXE Resource Logs\n\n**Description**:\n\nA sensitive logging vulnerability exists in the Apache CloudStack PING PXE baremetal plugin. When orchestrating resources or preparing booting files on baremetal hosts, the CloudStack Management Server constructs commands containing raw VM user-data (`userdata`), public keys, and CIFS storage password configurations, executing them over SSH.\nHowever, the underlying execution logging helper `SSHCmdHelper.sshExecuteCmdOneShot` only attempts to sanitize command arguments using a crude split logic targeted at `KeyStoreUtils.KS_FILENAME` (`\"cloud.jks\"`). Since baremetal orchestration commands never contain `\"cloud.jks\"`, the split fails to mask any characters, logging the entire command—including raw plaintext credentials and user configuration details—directly into standard system debug logs (e.g., `vmops.log` or `management-server.log`).\n\n### Summary\n\nAn information exposure vulnerability (CWE-532) in the Apache CloudStack Baremetal PING PXE plugin allows any local actor or system administrator with access to debug logs to read plaintext sensitive VM initialization secrets (user-data), SSH keys, and CIFS network storage passwords.\n\n### Details\n\nThe vulnerability manifest itself in two critical variants in `BaremetalPingPxeResource.java`:\n\n#### Variant 1: VM Metadata Exposure via VmDataCommand\nIn `BaremetalPingPxeResource.java` inside `execute(VmDataCommand cmd)`, VM custom metadata is assembled into a single string argument and formatted into a python script call:\n```java\n            String script = String.format(\"python /usr/bin/baremetal_user_data.py '%s'\", arg);\n            if (!SSHCmdHelper.sshExecuteCmd(sshConnection, script)) {\n                return new Answer(cmd, false, \"Failed to add user data, command:\" + script);\n            }\n```\nThe variable `arg` contains the plaintext custom user-data (which often holds database passwords, configuration keys, or startup secrets) and public SSH keys.\n\n#### Variant 2: Plaintext CIFS Storage Credential Leakage\nSimilarly, in `execute(PreparePxeServerCommand)` and `execute(PrepareCreateTemplateCommand)`, the resource's CIFS mount storage credential (`_cifsPassword`) is concatenated directly into the shell script format:\n```java\n            String script =\n                String.format(\"python /usr/bin/prepare_tftp_bootfile.py restore %1$s %2$s %3$s %4$s %5$s %6$s %7$s %8$s %9$s %10$s %11$s\", _tftpDir, cmd.getMac(),\n                    _storageServer, _share, _dir, cmd.getTemplate(), _cifsUserName, _cifsPassword, cmd.getIp(), cmd.getNetMask(), cmd.getGateWay());\n```\n\nBoth methods route their command execution through `SSHCmdHelper.sshExecuteCmd(sshConnection, script)`. This delegates to `SSHCmdHelper.sshExecuteCmdOneShot`, which implements the logging logic:\n```java\nLOGGER.debug(\"Executing cmd: \" + cmd.split(KeyStoreUtils.KS_FILENAME)[0]);\n```\nSince `KeyStoreUtils.KS_FILENAME` is defined as `\"cloud.jks\"` in `KeyStoreUtils.java`, commands without `\"cloud.jks\"` do not match, evaluating `cmd.split(\"cloud.jks\")[0]` to the original unsanitized string. Consequently, all custom user secrets, SSH public keys, and CIFS mount passwords flow directly into debug logs in plaintext.\n\n### PoC\n\n#### Prerequisites\n\n* Debug logging level enabled on Apache CloudStack Management Server or Agent.\n* PING PXE baremetal plugin configured and active.\n\n#### Reproduction Steps\n\n1. Download the isolated container configuration script from: [docker-compose.yml](https://gist.github.com/YLChen-007/16de890d60948928ff4388ceb06a1f5a)\n2. Download the defect verification script from: [verification_test.py](https://gist.github.com/YLChen-007/d8077c9d6caebf62296f42df517b2dfc)\n3. Download the scientific control test script from: [control-masked_output.py](https://gist.github.com/YLChen-007/32b3be9a34f4a4498bc7b43abcc6f711)\n4. Execute the defect verification script:\n   ```bash\n   python3 verification_test.py\n   ```\n5. Confirm that raw credentials (e.g., `PlaintextSuperSecretPassword123`, `StorageCIFSSuperSecurePassword789!`) are fully leaked under the logged commands section.\n\n### Log of Evidence\n\n```\n[*] Running Issue-cloudstack-12030-BaremetalPingPxe Sensitive Data Exposure Verification...\n[*] Defect Verification - Input Tracing:\n    - Sensitive VM User-Data: PlaintextSuperSecretPassword123\n    - Sensitive SSH Public Key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCuVariantPublicSSHKey\n    - Sensitive CIFS Storage Password: StorageCIFSSuperSecurePassword789!\n\n--- EXPERIMENT RESULTS (DEBUG LOGS) ---\n[*] Logged VmDataCommand: python /usr/bin/baremetal_user_data.py '10.0.0.10,metadata,userdata,PlaintextSuperSecretPassword123;10.0.0.10,metadata,sshkey,ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCuVariantPublicSSHKey'\n[*] Logged CIFS Command: python /usr/bin/prepare_tftp_bootfile.py restore /tftpboot 00:11:22:33:44:55 192.168.1.10 share dir template cifs_user StorageCIFSSuperSecurePassword789! 10.0.0.10 255.255.255.0 10.0.0.1\n---------------------------------------\n\n[+] SUCCESS: Plaintext sensitive credentials leaked successfully in standard debug logs!\n[+] Status: DEFECT-CONFIRMED\n```\n\n### Impact\n\nThis is a high-severity information exposure vulnerability (CWE-532).\nIf successfully triggered:\n* Attackers with system log access can hijack virtual/baremetal environments by reading raw tenant configurations (user-data, containing startup credentials, database secrets, or API keys).\n* Tenant SSH keys can be exposed, bypassing VM shell access constraints.\n* Core infrastructure CIFS storage network credentials will be exposed, potentially allowing unauthorized actors to compromise and modify base operating system template files.\n\n### Affected products\n\n- **Ecosystem**: maven\n- **Package name**: org.apache.cloudstack:cloudstack\n- **Affected versions**: \u003c= 4.22.1.0\n- **Patched versions**: \u003cNone\u003e\n\n### Severity\n\n- **Severity**: High\n- **Vector string**: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N\n\n### Weaknesses\n\n- **CWE**: CWE-532: Insertion of Sensitive Information into Log File\n\n### Occurrences\n\n| Permalink | Description |\n| :--- | :--- |\n| [https://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.java#L157-L162](https://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.java#L157-L162) | CIFS password exposure during `PreparePxeServerCommand` execution in `BaremetalPingPxeResource.java`. |\n| [https://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.java#L185-L190](https://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.java#L185-L190) | CIFS password exposure during `PrepareCreateTemplateCommand` execution in `BaremetalPingPxeResource.java`. |\n| [https://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.java#L217-L246](https://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.java#L217-L246) | VM custom user-data and SSH public key exposure during `VmDataCommand` execution in `BaremetalPingPxeResource.java`. |\n| [https://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/utils/src/main/java/com/cloud/utils/ssh/SSHCmdHelper.java#L167](https://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/utils/src/main/java/com/cloud/utils/ssh/SSHCmdHelper.java#L167) | Root cause split-based logging logic in `SSHCmdHelper.sshExecuteCmdOneShot` failing to sanitize commands lacking `\"cloud.jks\"`. |\n| [https://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/utils/src/main/java/com/cloud/utils/ssh/SSHCmdHelper.java#L230](https://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/utils/src/main/java/com/cloud/utils/ssh/SSHCmdHelper.java#L230) | Command output logging in `SSHCmdHelper.sshExecuteCmdOneShot` failing to sanitize logs for commands lacking `\"cloud.jks\"`. |","author":{"url":"https://github.com/YLChen-007","@type":"Person","name":"YLChen-007"},"datePublished":"2026-06-01T07:03:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/13298/cloudstack/issues/13298"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:ada0c78b-2906-77ec-9d49-00a5ad1afc86
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC4AA:6435C:D0A52E:12372B3:6A4E8BCA
html-safe-noncee3002b000cd6993a98cda504c23a06f5d18f442511ef1f87c8666a4101817863
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNEFBOjY0MzVDOkQwQTUyRToxMjM3MkIzOjZBNEU4QkNBIiwidmlzaXRvcl9pZCI6IjM3OTQwNTkyMjQ5ODk3MzE3ODYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac4e9f91938fffbe648eec5d84888c3c62355339f592447cc0d80b8916810e503a
hovercard-subject-tagissue:4561048061
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/apache/cloudstack/13298/issue_layout
twitter:imagehttps://opengraph.githubassets.com/065c5408bb68c32c56584dff06e313ab6d32700632134787c66dc7c28459dffd/apache/cloudstack/issues/13298
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/065c5408bb68c32c56584dff06e313ab6d32700632134787c66dc7c28459dffd/apache/cloudstack/issues/13298
og:image:altAdvisory Details Title: Sensitive User Data and Storage Credentials Exposure in Baremetal PING PXE Resource Logs Description: A sensitive logging vulnerability exists in the Apache CloudStack PING ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameYLChen-007
hostnamegithub.com
expected-hostnamegithub.com
None41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c
turbo-cache-controlno-preview
go-importgithub.com/apache/cloudstack git https://github.com/apache/cloudstack.git
octolytics-dimension-user_id47359
octolytics-dimension-user_loginapache
octolytics-dimension-repository_id9759448
octolytics-dimension-repository_nwoapache/cloudstack
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id9759448
octolytics-dimension-repository_network_root_nwoapache/cloudstack
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee6a744804e8e70f97b4d5a18a94dcc63db22f97a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/apache/cloudstack/issues/13298#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fcloudstack%2Fissues%2F13298
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fcloudstack%2Fissues%2F13298
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=apache%2Fcloudstack
Reloadhttps://github.com/apache/cloudstack/issues/13298
Reloadhttps://github.com/apache/cloudstack/issues/13298
Reloadhttps://github.com/apache/cloudstack/issues/13298
Please reload this pagehttps://github.com/apache/cloudstack/issues/13298
apache https://github.com/apache
cloudstackhttps://github.com/apache/cloudstack
Notifications https://github.com/login?return_to=%2Fapache%2Fcloudstack
Fork 1.3k https://github.com/login?return_to=%2Fapache%2Fcloudstack
Star 3k https://github.com/login?return_to=%2Fapache%2Fcloudstack
Code https://github.com/apache/cloudstack
Issues 536 https://github.com/apache/cloudstack/issues
Pull requests 265 https://github.com/apache/cloudstack/pulls
Discussions https://github.com/apache/cloudstack/discussions
Actions https://github.com/apache/cloudstack/actions
Projects https://github.com/apache/cloudstack/projects
Wiki https://github.com/apache/cloudstack/wiki
Security and quality 0 https://github.com/apache/cloudstack/security
Insights https://github.com/apache/cloudstack/pulse
Code https://github.com/apache/cloudstack
Issues https://github.com/apache/cloudstack/issues
Pull requests https://github.com/apache/cloudstack/pulls
Discussions https://github.com/apache/cloudstack/discussions
Actions https://github.com/apache/cloudstack/actions
Projects https://github.com/apache/cloudstack/projects
Wiki https://github.com/apache/cloudstack/wiki
Security and quality https://github.com/apache/cloudstack/security
Insights https://github.com/apache/cloudstack/pulse
Taskhttps://github.com/apache/cloudstack/issues?q=type:"Task"
Sensitive User Data and Storage Credentials Exposure in Baremetal PING PXE Resource Logshttps://github.com/apache/cloudstack/issues/13298#top
component:logginghttps://github.com/apache/cloudstack/issues?q=state%3Aopen%20label%3A%22component%3Alogging%22
https://github.com/YLChen-007
YLChen-007https://github.com/YLChen-007
on Jun 1, 2026https://github.com/apache/cloudstack/issues/13298#issue-4561048061
docker-compose.ymlhttps://gist.github.com/YLChen-007/16de890d60948928ff4388ceb06a1f5a
verification_test.pyhttps://gist.github.com/YLChen-007/d8077c9d6caebf62296f42df517b2dfc
control-masked_output.pyhttps://gist.github.com/YLChen-007/32b3be9a34f4a4498bc7b43abcc6f711
cloudstack/plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.javahttps://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.java#L157-L162
348ce95https://github.com/apache/cloudstack/commit/348ce953a99246a756b527994f7745a7be038234
cloudstack/plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.javahttps://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.java#L185-L190
348ce95https://github.com/apache/cloudstack/commit/348ce953a99246a756b527994f7745a7be038234
cloudstack/plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.javahttps://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.java#L217-L246
348ce95https://github.com/apache/cloudstack/commit/348ce953a99246a756b527994f7745a7be038234
cloudstack/utils/src/main/java/com/cloud/utils/ssh/SSHCmdHelper.javahttps://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/utils/src/main/java/com/cloud/utils/ssh/SSHCmdHelper.java#L167
348ce95https://github.com/apache/cloudstack/commit/348ce953a99246a756b527994f7745a7be038234
cloudstack/utils/src/main/java/com/cloud/utils/ssh/SSHCmdHelper.javahttps://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/utils/src/main/java/com/cloud/utils/ssh/SSHCmdHelper.java#L230
348ce95https://github.com/apache/cloudstack/commit/348ce953a99246a756b527994f7745a7be038234
component:logginghttps://github.com/apache/cloudstack/issues?q=state%3Aopen%20label%3A%22component%3Alogging%22
Taskhttps://github.com/apache/cloudstack/issues?q=type:"Task"
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.