Prometheus Information Disclosure
Prometheus is a monitoring and alerting system that runs on port 9090 by default. It scrapes metrics from configured targets and stores them in a time-series database. Prometheus has no built-in authentication by default, so any network access to port 9090 exposes the full web UI, API, configuration, and scraped metrics. Metrics often contain internal hostnames, service endpoints, and sometimes credentials passed as labels.
Web UI and API Access
Check whether the Prometheus web UI is accessible without credentials.
{
"status": "success",
"data": {
"version": "2.47.0",
"revision": "abc123",
"branch": "HEAD",
"buildUser": "root@builder",
"buildDate": "20231015",
"goVersion": "go1.21.1"
}
}
A success response confirms open access. The version and build info help fingerprint the installation.
Configuration Exposure
The configuration endpoint reveals all scrape targets, including internal hostnames, ports, and authentication tokens used for scraping.
The YAML config contains scrape_configs with target addresses, bearer_token or basic_auth credentials for authenticated targets, TLS settings, and relabeling rules. Check for plaintext credentials in authorization headers.
Target Discovery
List all monitored targets and their current status. Reveals the internal network topology.
node-exporter http://10.10.10.51:9100/metrics up kube-state-metrics http://10.10.10.52:8080/metrics up mysql-exporter http://10.10.10.53:9104/metrics up blackbox-exporter http://10.10.10.50:9115/metrics up
Each target reveals an internal IP, port, and what service is being monitored. These endpoints (/metrics) are often unauthenticated too and expose their own sensitive data.
Metric-Based Information Disclosure
Scraped metrics can contain sensitive information in labels and values.
Metric names sometimes include credential-related keywords from misconfigured exporters. Check process_* metrics for environment info and custom metrics for business data.
PromQL queries run against the time-series database. Labels on results reveal instance names, job names, and sometimes deployment metadata.
Alerting Rules
Alert rules reveal what the team considers critical, which can guide attack priorities.
Alert rules expose thresholds (when does disk fill up, what CPU triggers autoscale), notification targets (Slack webhooks, PagerDuty keys), and PromQL expressions that map internal service dependencies.
SSRF via Blackbox Exporter
If a Blackbox exporter target is configured, the Prometheus server itself can be used for SSRF by querying internal endpoints through the exporter's probe mechanism. Check the targets list for a blackbox-exporter instance.
Notice
Prometheus has no direct exploitation path to RCE. Focus on the data it exposes: internal network topology, credentials in configs and metrics, and exporter endpoints that may have their own vulnerabilities.
References
-
Prometheus: HTTP APIDOCS: Prometheus: HTTP API, prometheus.io/docs/prometheus/latest/querying/api (opens in new tab)
Official API documentation for queries, targets, and config endpoints.
-
HackTricks: 9090 Pentesting PrometheusTOOL: HackTricks: 9090 Pentesting Prometheus, hacktricks.wiki/en/network-services-pentesting/9090-pentesting-prometheus.html (opens in new tab)
Prometheus enumeration and information disclosure techniques.