GHSA-4v48-4q5m-8vx4: Github.com/prometheus/prometheus Authentication Bypass Vulnerability
HIGHGHSA-4v48-4q5m-8vx4 is a HIGH (CVSS 7.2) authentication bypass vulnerability (CWE-303: Incorrect Implementation of Authentication Algorithm) affecting Github.com/prometheus/prometheus libraries in the Go ecosystem. The issue involves prometheus vulnerable to basic authentication bypass. Remediation is available by upgrading affected packages to version 2.37.4, 2.40.4.
GHSA-4v48-4q5m-8vx4 at a Glance
Security Impact
CVSS: 7.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H).
How to Fix GHSA-4v48-4q5m-8vx4
To remediate this vulnerability, upgrade all affected Github.com/prometheus/prometheus dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/prometheus/prometheus to 2.37.4
Upgrade github.com/prometheus/prometheus to 2.40.4
Upgrade github.com/prometheus/prometheus/v2 to 2.37.4
Upgrade github.com/prometheus/prometheus/v2 to 2.40.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/prometheus/prometheus
How to Check if You Are Affected
To determine whether your application is affected by GHSA-4v48-4q5m-8vx4, inspect your project dependencies for Github.com/prometheus/prometheus:
inspect dependencies for github.com/prometheus/prometheus
Analyze the terminal output to locate any version of Github.com/prometheus/prometheus in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.37.4), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-303: Incorrect Implementation of Authentication Algorithm, where the requirements for the product dictate the use of an established authentication algorithm, but the implementation of the algorithm is incorrect. In Github.com/prometheus/prometheus, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-4v48-4q5m-8vx4 Affected Github.com/prometheus/prometheus Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/prometheus/prometheus
|
Go |
≥ 2.24.1
< 2.37.4
|
2.37.4
|
|
github.com/prometheus/prometheus
|
Go |
≥ 2.38.0
< 2.40.4
|
2.40.4
|
|
github.com/prometheus/prometheus/v2
|
Go |
≥ 2.24.1
< 2.37.4
|
2.37.4
|
|
github.com/prometheus/prometheus/v2
|
Go |
≥ 2.38.0
< 2.40.4
|
2.40.4
|
References
Frequently Asked Questions
What is GHSA-4v48-4q5m-8vx4?
Which Github.com/prometheus/prometheus versions are affected?
What version fixes GHSA-4v48-4q5m-8vx4?
Is github.com/prometheus/prometheus affected?
Is github.com/prometheus/prometheus/v2 affected?
What is the CVSS score of GHSA-4v48-4q5m-8vx4?
What CWE is associated with GHSA-4v48-4q5m-8vx4?
How can I check Go dependencies for GHSA-4v48-4q5m-8vx4?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4v48-4q5m-8vx4",
"modified" : "2026-04-15T20:59:32Z",
"published" : "2022-12-05T22:01:08Z",
"aliases" : [ ],
"summary" : "Prometheus vulnerable to basic authentication bypass",
"details" : "### Impact\n\nPrometheus can be secured by a web.yml file that specifies usernames and hashed passwords for basic authentication.\n\nPasswords 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.\n\nHowever, a flaw in the way this mechanism was implemented in the [exporter toolkit](https://github.com/prometheus/exporter-toolkit) makes it possible with people who know the hashed password to authenticate against Prometheus.\n\nA 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.\n\n### Patches\n\nPrometheus 2.37.4 ([LTS](https://prometheus.io/docs/introduction/release-cycle/)) and 2.40.4 have been released to address this issue.\n\n### Workarounds\n\nThere is no workaround but attacker must have access to the hashed password, stored in disk, to bypass the authentication.\n\n### Credit\n\nWe want to thank Lei Wan for reporting this security issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/prometheus/prometheus"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.24.1"
}, {
"fixed" : "2.37.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/prometheus/prometheus"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.38.0"
}, {
"fixed" : "2.40.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/prometheus/prometheus/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.24.1"
}, {
"fixed" : "2.37.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/prometheus/prometheus/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.38.0"
}, {
"fixed" : "2.40.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/prometheus/prometheus/security/advisories/GHSA-4v48-4q5m-8vx4"
}, {
"type" : "WEB",
"url" : "https://github.com/prometheus/prometheus/commit/31a2db3ae9c0f4b486b6895973beabc1d1beac93"
}, {
"type" : "WEB",
"url" : "https://github.com/prometheus/prometheus/releases/tag/v2.37.4"
}, {
"type" : "WEB",
"url" : "https://github.com/prometheus/prometheus/releases/tag/v2.40.4"
}, {
"type" : "PACKAGE",
"url" : "github.com/prometheus/prometheus"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-303" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-12-05T22:01:08Z",
"nvd_published_at" : null
}
}