Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS00djQ4LTRxNW0tOHZ4NM4AAwJ2

Prometheus vulnerable to basic authentication bypass

Impact

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.

Patches

Prometheus 2.37.4 (LTS) and 2.40.4 have been released to address this issue.

Workarounds

There is no workaround but attacker must have access to the hashed password, stored in disk, to bypass the authentication.

Permalink: https://github.com/advisories/GHSA-4v48-4q5m-8vx4
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS00djQ4LTRxNW0tOHZ4NM4AAwJ2
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: over 1 year ago
Updated: over 1 year ago


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

Identifiers: GHSA-4v48-4q5m-8vx4
References: Repository: https://github.com/prometheus/prometheus
Blast Radius: 26.9

Affected Packages

go:github.com/prometheus/prometheus/v2
Dependent packages: 0
Dependent repositories: 0
Downloads:
Affected Version Ranges: >= 2.38.0, < 2.40.4, >= 2.24.1, < 2.37.4
Fixed in: 2.40.4, 2.37.4
All affected versions:
All unaffected versions:
go:github.com/prometheus/prometheus
Dependent packages: 1,778
Dependent repositories: 5,467
Downloads:
Affected Version Ranges: >= 2.38.0, < 2.40.4, >= 2.24.1, < 2.37.4
Fixed in: 2.40.4, 2.37.4
All affected versions:
All unaffected versions: 0.35.0, 0.36.0, 0.36.1, 0.36.2, 0.37.0, 0.37.1, 0.37.2, 0.37.3, 0.37.4, 0.37.5, 0.37.6, 0.37.7, 0.37.8, 0.37.9, 0.38.0, 0.39.0, 0.39.1, 0.39.2, 0.40.0, 0.40.1, 0.40.2, 0.40.3, 0.40.4, 0.40.5, 0.40.6, 0.40.7, 0.41.0, 0.42.0, 0.43.0, 0.43.1, 0.44.0, 0.45.0, 0.45.1, 0.45.2, 0.45.3, 0.46.0, 0.47.0, 0.47.1, 0.47.2, 0.48.0, 0.48.1, 0.49.0, 0.49.1, 1.0.0, 1.0.1, 1.0.2, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.3.0, 1.3.1, 1.4.0, 1.4.1, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.99.0, 2.0.0, 2.1.0, 2.2.0, 2.2.1, 2.3.0, 2.3.1, 2.3.2, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.5.0