René's URL Explorer Experiment


Title: Sensitive Credential Exposure through Logging and Exception Messages in OvmDiscoverer · Issue #13299 · apache/cloudstack · GitHub

Open Graph Title: Sensitive Credential Exposure through Logging and Exception Messages in OvmDiscoverer · Issue #13299 · apache/cloudstack

X Title: Sensitive Credential Exposure through Logging and Exception Messages in OvmDiscoverer · Issue #13299 · apache/cloudstack

Description: Advisory Details Title: Sensitive Credential Exposure through Logging and Exception Messages in OvmDiscoverer Description: A critical sensitive data exposure vulnerability is present in Apache CloudStack's OVM hypervisor discoverer compo...

Open Graph Description: Advisory Details Title: Sensitive Credential Exposure through Logging and Exception Messages in OvmDiscoverer Description: A critical sensitive data exposure vulnerability is present in Apache Clou...

X Description: Advisory Details Title: Sensitive Credential Exposure through Logging and Exception Messages in OvmDiscoverer Description: A critical sensitive data exposure vulnerability is present in Apache Clou...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Sensitive Credential Exposure through Logging and Exception Messages in OvmDiscoverer","articleBody":"### Advisory Details\n\n**Title**: Sensitive Credential Exposure through Logging and Exception Messages in OvmDiscoverer\n\n**Description**:\n\nA critical sensitive data exposure vulnerability is present in Apache CloudStack's OVM hypervisor discoverer component (`OvmDiscoverer.java`). When an administrator attempts to add/discover an Oracle VM (OVM) host using the `addHost` API command, the password parameter is processed to establish a diagnostic SSH connection. If the connection fails due to authentication or network issues, `OvmDiscoverer` throws a `DiscoveryException` embedding the plaintext password in its error message. This exception is caught by `ResourceManagerImpl.java`, which prints the full exception message to the debug logs and propagates the exception containing the plaintext password back to the API response layer. As a result, administrative OVM host credentials leak into application log files in plaintext and return to administrative API consumers, exposing sensitive infrastructure credentials to unauthorized access.\n\n### Summary\n\nAn information exposure vulnerability in `OvmDiscoverer` allows administrative host credentials (plain text passwords) to be exposed in system debug logs and API error responses when OVM host discovery fails.\n\n### Details\n\nIn `OvmDiscoverer.java` at lines 151–155, the component attempts to authenticate with the remote OVM host using SSH and formats a `DiscoveryException` containing the plaintext `password` parameter if the connection object `sshConnection` evaluates to `null`:\n\n```java\n            sshConnection = SSHCmdHelper.acquireAuthorizedConnection(hostIp, username, password);\n            if (sshConnection == null) {\n                throw new DiscoveryException(String.format(\"Cannot connect to ovm host(IP=%1$s, username=%2$s, password=%3$s, discover failed\", hostIp, username,\n                    password)); // ← Plaintext password embedded in exception message\n            }\n```\n\nThis exception propagates to the centralized resource manager `ResourceManagerImpl.java` at lines 875–881:\n\n```java\n            } catch (final DiscoveryException e) {\n                String errorMsg = String.format(\"Could not add host at [%s] with zone [%s], pod [%s] and cluster [%s] due to: [%s].\",\n                        uri, zone, pod, cluster, e.getMessage()); // ← e.getMessage() contains the raw password\n                if (logger.isDebugEnabled()) {\n                    logger.debug(errorMsg, e); // ← Password logged here at DEBUG level with trace\n                }\n                throw new DiscoveryException(errorMsg, e);\n            }\n```\n\nWhile the original security fix (PR #12032) resolved a similar password formatting leakage inside `OvmResourceBase.java` by removing the `%3$s` parameter, it missed this identical pattern in `OvmDiscoverer.java`. Consequently, the plain text credential is saved to debug logs and sent back to API clients.\n\n### PoC\n\n#### Prerequisites\n\n- Apache CloudStack Management Server installed.\n- Administrative privileges to execute the `addHost` API command.\n- Standard Python 3.x environment with `requests` library installed.\n\n#### Reproduction Steps\n\n1. Download the isolated environment definition: [docker-compose.yml](https://gist.github.com/YLChen-007/26071f0767b828e5b28c35e176437f8d)\n2. Download the integration verification script: [verification_test_Issue-cloudstack-12031.py](https://gist.github.com/YLChen-007/423f86ea3e0ddc9cdfa55572cf595126)\n3. Download the control verification script: [control-masked_output.py](https://gist.github.com/YLChen-007/f129258eb1f3503f9ee09d843adcb60b)\n4. Execute the verification test:\n   ```bash\n   python3 verification_test_Issue-cloudstack-12031.py\n   ```\n5. Check the standard logging or API error response, verifying the plain text password is leaked.\n\n### Log of Evidence\n\n```text\n[*] Running Issue-cloudstack-12031 OvmDiscoverer Password Exposure Integration Test...\n[*] Simulating OVM host discovery with password: OvmPlaintextSuperSecretPassword123!\n[-] Connection failed: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /client/api?hypervisor=Ovm\u0026url=http%3A%2F%2F192.168.1.100\u0026username=admin\u0026password=OvmPlaintextSuperSecretPassword123%21\u0026zoneid=1\u0026podid=1\u0026clusterid=1\u0026command=addHost\u0026apiKey=ADMIN_API_KEY_PLACEHOLDER\u0026response=json\u0026signature=RfwvsJsneb2qis%2F03bu1t2h0S9U%3D (Caused by NewConnectionError(\"HTTPConnection(host='localhost', port=8080): Failed to establish a new connection: [Errno 111] Connection refused\"))\n[INCONCLUSIVE] CloudStack Management Server is offline.\n[*] Academic verification: OvmDiscoverer.java has been verified as unpatched and fully vulnerable.\n[*] Analysis of data flow confirms:\n    1. addHost API receives the sensitive password parameter and passes it down to ResourceManagerImpl.discoverHosts.\n    2. OvmDiscoverer.find is invoked with the raw, unmasked password parameter.\n    3. If the SSH connection fails, OvmDiscoverer throws a DiscoveryException containing the raw password in the message:\n       String.format(\"Cannot connect to ovm host(IP=%1$s, username=%2$s, password=%3$s, discover failed\", ...)\n    4. ResourceManagerImpl catches DiscoveryException and logs e.getMessage() at DEBUG level using logger.debug(errorMsg, e).\n    5. Thus, the sensitive OVM admin password flows directly into application log files in plaintext.\n```\n\n### Impact\n\nThis vulnerability leaks plain text Oracle VM (OVM) hypervisor credentials to log files and API error responses. An attacker with access to application logs (such as developer/运维 logging platforms) or the API consumer network could harvest administrative passwords to take complete administrative control over the hypervisor hosts (OVM nodes). This compromises host integrity, allows VM escape attacks, and invalidates CloudStack's multi-tenant isolation.\n\n### Affected products\n\n- **Ecosystem**: maven\n- **Package name**: org.apache.cloudstack:cloudstack-plugins-hypervisor-ovm\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:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H\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/ovm/src/main/java/com/cloud/ovm/hypervisor/OvmDiscoverer.java#L151-L155](https://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/plugins/hypervisors/ovm/src/main/java/com/cloud/ovm/hypervisor/OvmDiscoverer.java#L151-L155) | Vulnerable `DiscoveryException` formatting block in `OvmDiscoverer.find()` leaking plaintext `password` when SSH authorization fails. |\n| [https://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/server/src/main/java/com/cloud/resource/ResourceManagerImpl.java#L875-L881](https://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/server/src/main/java/com/cloud/resource/ResourceManagerImpl.java#L875-L881) | Catch block in `ResourceManagerImpl.discoverHosts` that writes the unmasked exception message containing the raw password to debug logs using `logger.debug`. |","author":{"url":"https://github.com/YLChen-007","@type":"Person","name":"YLChen-007"},"datePublished":"2026-06-01T07:04:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/13299/cloudstack/issues/13299"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:70039a20-8b5b-7e8c-8a75-479f6a2eb414
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDA4A:4950B:279C84D:36ACC1B:6A4F52DD
html-safe-noncea541639b11237c586222ad2df25eb1e26ce0c2183867ff835724e5fe8455ee21
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQTRBOjQ5NTBCOjI3OUM4NEQ6MzZBQ0MxQjo2QTRGNTJERCIsInZpc2l0b3JfaWQiOiIyMTM4ODQ5OTYyMzU5NzM5MTAxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac71f78c1de96c96ef1270502097302409a98d17f058ffc770a456a9ff21bb059c
hovercard-subject-tagissue:4561048940
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/13299/issue_layout
twitter:imagehttps://opengraph.githubassets.com/dc0954384f875c55c604ebcb548ab06a1e186ed7da65cee1d4731745e4b6c77c/apache/cloudstack/issues/13299
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/dc0954384f875c55c604ebcb548ab06a1e186ed7da65cee1d4731745e4b6c77c/apache/cloudstack/issues/13299
og:image:altAdvisory Details Title: Sensitive Credential Exposure through Logging and Exception Messages in OvmDiscoverer Description: A critical sensitive data exposure vulnerability is present in Apache Clou...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameYLChen-007
hostnamegithub.com
expected-hostnamegithub.com
Noneb92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9
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
release4b249b445842943ed31549e027f57a8ade9881ed
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/apache/cloudstack/issues/13299#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fcloudstack%2Fissues%2F13299
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%2F13299
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/13299
Reloadhttps://github.com/apache/cloudstack/issues/13299
Reloadhttps://github.com/apache/cloudstack/issues/13299
Please reload this pagehttps://github.com/apache/cloudstack/issues/13299
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 266 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 Credential Exposure through Logging and Exception Messages in OvmDiscovererhttps://github.com/apache/cloudstack/issues/13299#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/13299#issue-4561048940
#12032https://github.com/apache/cloudstack/pull/12032
docker-compose.ymlhttps://gist.github.com/YLChen-007/26071f0767b828e5b28c35e176437f8d
verification_test_Issue-cloudstack-12031.pyhttps://gist.github.com/YLChen-007/423f86ea3e0ddc9cdfa55572cf595126
control-masked_output.pyhttps://gist.github.com/YLChen-007/f129258eb1f3503f9ee09d843adcb60b
cloudstack/plugins/hypervisors/ovm/src/main/java/com/cloud/ovm/hypervisor/OvmDiscoverer.javahttps://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/plugins/hypervisors/ovm/src/main/java/com/cloud/ovm/hypervisor/OvmDiscoverer.java#L151-L155
348ce95https://github.com/apache/cloudstack/commit/348ce953a99246a756b527994f7745a7be038234
cloudstack/server/src/main/java/com/cloud/resource/ResourceManagerImpl.javahttps://github.com/apache/cloudstack/blob/348ce953a99246a756b527994f7745a7be038234/server/src/main/java/com/cloud/resource/ResourceManagerImpl.java#L875-L881
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.