VulnWatch by ve1ve2
medium 5.2

GHSA-qjxc-h5jf-c7rj: GCP and selected cloud providers provide metadata endpoints to the local network which can be queried to extract sensitive information via authentificated accounts in uptime kuma

Source:
Uptime Kuma releases + advisories (GitHub louislam/uptime-kuma)
Published:
Fetched:
Updated:
Affects:
louislam uptime-kuma

https://github.com/louislam/uptime-kuma/security/advisories/GHSA-qjxc-h5jf-c7rj ↗

repo-advisorydockernpmCWE-291CWE-306CWE-862CWE-918securityrepo:louislam/uptime-kuma

GCP and selected cloud providers provide metadata endpoints to the local network which can be queried to extract sensitive information via authentificated accounts in uptime kuma > [!NOTE] > This advisory is not classified as an issue in uptime kuma, but rather the deployment platform. > Since we don't have the resources to work around the implementations of google/... we will not fix this issue in uptime-kuma. > Users of said cloud platforms are asked to enact tighter security if their security profile requires it. ### Summary Authenticated Arbitrary Data Exposure via SSRF ### Details It was discovered that the "Add New Monitor" feature is vulnerable to authenticated arbitrary data exposure via SSRF, using "HTTP(s) - keyword" mode, an authenticated attacker can fuzz the "Keyword" field and analyze the response errors. An attacker could potentially leak sensitive arbitrary information on an internal endpoint that exposes sensitive information ### PoC In this PoC, we will exfiltrate cloud metadata since major cloud providers, including Google Cloud Platform (GCP), Amazon Web Services (AWS), and Microsoft Azure, expose instance metadata services (IMDS) via an internal IP (169.254.169.254) or designated internal domains (metadata.google.internal, 169.254.169.253 for AWS, etc.). These endpoints provide sensitive information, such as OAuth tokens, SSH keys, IAM credentials, and internal networking details, for cloud-based instances. In our case, Uptime Kuma was deployed in Google Cloud Platform, to test this PoC it need to be deployed in some cloud environment. GCP PoC (click to expand) 1. Authenticate 2. Add new Monitor 3. Set Monitor Type to HTTP(S) - Keyword 4. Set Headers to ```json { "Metadata-Flavor": "Google" } ``` 5. Set URL to for example `http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token` 6. Set keyword to any random data ![image](https://github.com/user-attachments/assets/d071430e-6ae6-4f27-89a3-eac04dc01010) Notice in response it return the first 50 char length as mentioned in code 7. Now we can bruteforce for data that is long, although I'm showing PoC from the UI Case if a character is incorrect ![image](https://github.com/user-attachments/assets/4076ae93-0a02-4289-bdc5-9298e7acbae0) Case if a character is correct ![image](https://github.com/user-attachments/assets/d189bb39-604f-40ef-a849-2b6c4e626b24) But for data that is short, you can read the response, which in our case its the paths where you can check more data.. ![image](https://github.com/user-attachments/assets/00d66d56-3d8f-44a8-96c9-7377e38c8473) ### Impact Data exposure through SSRF Vulnerability, the affected are the ones who hosts at a cloud provider 1. Attackers can extract temporary cloud access tokens (AWS IAM roles, GCP service accounts, Azure Managed Identity) from the metadata API, allowing unauthorized access to cloud services and infrastructure. 2. Attackers can retrieve sensitive metadata information, including: - Instance & Project Details - Networking Information Affected packages: docker:uptime-kuma, npm:uptime-kuma

Linked vulnerabilities (1)

CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H

GCP and selected cloud providers provide metadata endpoints to the local network which can be queried to extract sensitive information via authentificated accounts in uptime kuma