Summary
Scraparr, a Prometheus exporter for the *arr Suite, inadvertently exposed the configured Readarr API key in a metric label when the Readarr integration was enabled and no alias was configured.
If the /metrics endpoint was accessible to unauthorized users and the associated Readarr instance was reachable from the attacker's environment, the API key could be disclosed, enabling unauthorized interaction with the Readarr API.
Affected context
The vulnerability occurs in Scraparr deployments that:
- Run versions from 3.0.0-beta to before 3.0.2
- Have the Readarr scraping feature enabled
- Have no alias configured for the Readarr integration, causing the API key to be used as a metric label value
- Expose the
/metricsendpoint to external or untrusted networks - Operate a Readarr instance that is externally accessible (e.g., from the Internet or shared networks)
Under these conditions, Prometheus-style metrics output may inadvertently contain the Readarr API key.
Exploit preconditions
- Attack surface: HTTP access to the Scraparr
/metricsendpoint. - Required access: Network-layer ability to query
/metricswithout strong authentication or IP restrictions. - Configuration requirements:
- Scraparr version between 3.0.0-beta and before 3.0.2.
- Readarr integration enabled with no explicit alias set.
- Readarr instance accessible from the attacker's environment using the leaked API key.
- Trigger point: An HTTP GET request to
/metricswhile affected configuration is active. - Why exploitation is possible: Sensitive secret material (the Readarr API key) is reused as a metric label value, which is routinely exposed for scraping and monitoring and may be visible to parties beyond the original trust boundary.
Why this happens
This issue stems from treating sensitive configuration data as display-safe metadata in observability outputs.
Specifically, the Readarr API key was used directly as a Prometheus metric label (the alias label) when an alias was not explicitly configured.
Metric labels are designed to be low-sensitivity identifiers and are commonly exposed to multiple systems and operators; they are not an appropriate channel for secrets.
This maps to CWE-200: Information Exposure, where the application reveals confidential information (an API key) through an unintended output channel (metrics endpoint), due to missing separation between secrets and non-sensitive identifiers.
Potential impact
- Unauthorized access to the Readarr API using the leaked API key.
- Retrieval or manipulation of library, book, or media metadata in Readarr.
- Modification of Readarr configuration or automation workflows, depending on API permissions.
- Use of the compromised Readarr instance as an internal pivot point if it has access to additional internal services.
- Exposure of further secrets or personal information stored or processed by Readarr, depending on deployment.
General mitigation guidance
Effective mitigation focuses on separating secrets from observability data and reducing metrics exposure:
- Avoid using API keys, tokens, passwords, or other secrets as metric names, labels, or values; use non-sensitive aliases or identifiers instead.
- Implement a clear classification for metrics fields and ensure that only non-sensitive information appears in exported metrics.
- Restrict network access to
/metricsendpoints using firewalls, network policies, reverse proxies, or service meshes, limiting visibility to trusted monitoring systems. - Require authentication or strong access controls for observability endpoints located on shared or untrusted networks.
- Regularly review configuration defaults so that "secure by default" behavior avoids exposing secrets when optional fields (like aliases) are not set.
- Apply least-privilege principles to API keys used by exporters so that, if exposed, their capabilities are minimized.
How teams detect issues like this
Organizations can uncover similar issues by combining configuration review and observability pipeline inspection:
- Static configuration and code review:
- Look for usages where configuration secrets are passed into logging, metrics, traces, or error messages.
- Flag patterns where API keys, tokens, or passwords flow into label/field construction in telemetry libraries.
- Automated scanning and policy checks:
- Use secrets scanning tools against metric outputs, logs, and configuration repositories to detect accidentally exposed keys.
- Enforce policy rules (via linters or CI hooks) preventing secret-typed variables from being used in metrics or log formatting.
- Runtime monitoring:
- Periodically sample and review
/metricsoutput from services to ensure no sensitive values appear. - Track access logs for metrics endpoints to identify unexpectedly broad or unauthorized access.
- Access posture review:
- Inventory all externally visible metrics endpoints and validate that each is behind appropriate network and authentication controls.

