Prometheus Vulnerable to Basic Authentication Bypass

Summary

05/12/2022
HIGH
Yes i
High
7.2

GHSA-4v48-4q5m-8vx4: Prometheus vulnerable to basic authentication bypass. Affects github.com/prometheus/prometheus across 2 version ranges.

>= 2.24.1, < 2.37.4 >= 2.38.0, < 2.40.4

Fixed in 2.37.4 or 2.40.4, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Prometheus is an open-source monitoring and alerting toolkit designed for large-scale distributed systems. It collects metrics from configured targets, stores them, and provides a query language to analyze and visualize the data. The toolkit is written in Go and widely used in various industries to monitor and manage their systems. However, a vulnerability has been discovered in Prometheus that allows for basic authentication bypass.

Vulnerability Detail

The vulnerability in Prometheus lies in the way basic authentication is implemented using the exporter toolkit. While passwords are hashed with bcrypt, making it difficult to retrieve the original password, a flaw in the implementation allows attackers with knowledge of the hashed password to forge a request and poison the internal cache used for hash computation. This enables them to bypass authentication and gain unauthorized access to Prometheus. The cache is used to limit side-channel attacks and is utilized in both successful and unsuccessful authentication scenarios.

How To Fix

Latest published version: v0.315.1 as of 23 Oct 2026

go get github.com/prometheus/prometheus@v0.315.1

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 2.24.1, < 2.37.4 2.37.4
    go get github.com/prometheus/prometheus@v2.37.4
  • >= 2.38.0, < 2.40.4 2.40.4
    go get github.com/prometheus/prometheus@v2.40.4

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

There is no specific workaround for this vulnerability. However, it is important to ensure that the hashed passwords stored on disk are adequately protected. Access to the hashed passwords should be restricted to authorized personnel only.

Conclusion

Prometheus is vulnerable to a basic authentication bypass, which can be exploited by attackers with knowledge of the hashed password. It is crucial to update Prometheus to versions 2.37.4 (LTS) or 2.40.4 to mitigate this vulnerability. Ensure that the hashed passwords stored on disk are adequately protected. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for github.com/prometheus/prometheus →

Share this vulnerability

FAQ

Prometheus is an open-source monitoring and alerting toolkit used for large-scale distributed systems.

The vulnerability allows attackers with knowledge of the hashed password to bypass authentication and gain unauthorized access to Prometheus.

Update Prometheus to versions 2.37.4 (LTS) or 2.40.4, which include patches to address the authentication bypass vulnerability.

There is no specific workaround for this vulnerability. However, ensure that the hashed passwords stored on disk are adequately protected.

Related vulnerabilities

Recent vulnerabilities recorded for github.com/prometheus/prometheus.

How To Fix

Latest published version: v0.315.1 as of 23 Oct 2026

go get github.com/prometheus/prometheus@v0.315.1

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 2.24.1, < 2.37.4 2.37.4
    go get github.com/prometheus/prometheus@v2.37.4
  • >= 2.38.0, < 2.40.4 2.40.4
    go get github.com/prometheus/prometheus@v2.40.4

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback