Junglewise Threat Intelligence

Prometheus basic authentication bypass in exporter-toolkit

Severity: high · CVSS 7.2 · Published 2022-12-05

Technologies: Prometheus. Vendors: Prometheus.

Executive brief

Prometheus, a popular monitoring and alerting toolkit, contains a vulnerability in its basic authentication mechanism. An attacker who has obtained a user's hashed password can bypass the authentication process to gain unauthorized access to the monitoring data. This could lead to the exposure of sensitive operational metrics or unauthorized configuration changes.

Technical details

A vulnerability exists in the Prometheus exporter-toolkit where the internal cache used for bcrypt hash computations can be poisoned. While Prometheus uses bcrypt to secure passwords in the web.yml file, an attacker who already possesses the hashed password (e.g., via disk access) can forge a request to poison this cache. This allows subsequent authentication attempts using the hash to succeed without knowing the original plaintext password. The cache is intended to mitigate side-channel attacks by normalizing response times for both valid and invalid users, but its implementation allows for this bypass. The issue is resolved in Prometheus versions 2.37.4 (LTS) and 2.40.4.

Affected products

  • Prometheus Prometheus >= 2.24.1, < 2.37.4; >= 2.38.0, < 2.40.4
  • Prometheus exporter-toolkit All versions prior to fixes in Prometheus 2.37.4/2.40.4

Timeline

  • 2022-11-29: disclosed: Advisory published by Prometheus maintainers
  • 2022-12-05: advisory: GitHub Advisory published

References

Related threats