Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/prometheus/prometheus/v2
  4. ›
  5. GHSA-4v48-4q5m-8vx4

GHSA-4v48-4q5m-8vx4: Prometheus vulnerable to basic authentication bypass

December 5, 2022 (updated April 15, 2026)

Prometheus can be secured by a web.yml file that specifies usernames and hashed passwords for basic authentication.

Passwords are hashed with bcrypt, which means that even if you have access to the hash, it is very hard to find the original password back.

However, a flaw in the way this mechanism was implemented in the exporter toolkit makes it possible with people who know the hashed password to authenticate against Prometheus.

A request can be forged by an attacker to poison the internal cache used to cache the computation of hashes and make subsequent requests successful. This cache is used in both happy and unhappy scenarios in order to limit side channel attacks that could tell an attacker if a user is present in the file or not.

References

  • github.com/advisories/GHSA-4v48-4q5m-8vx4
  • github.com/prometheus/prometheus/commit/31a2db3ae9c0f4b486b6895973beabc1d1beac93
  • github.com/prometheus/prometheus/releases/tag/v2.37.4
  • github.com/prometheus/prometheus/releases/tag/v2.40.4
  • github.com/prometheus/prometheus/security/advisories/GHSA-4v48-4q5m-8vx4

Code Behaviors & Features

Detect and mitigate GHSA-4v48-4q5m-8vx4 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.24.1 before 2.37.4, all versions starting from 2.38.0 before 2.40.4

Fixed versions

  • 2.37.4
  • 2.40.4

Solution

Upgrade to versions 2.37.4, 2.40.4 or above.

Impact 7.2 HIGH

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-303: Incorrect Implementation of Authentication Algorithm

Source file

go/github.com/prometheus/prometheus/v2/GHSA-4v48-4q5m-8vx4.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 17 May 2026 00:21:03 +0000.