CVE-2022-46146: Prometheus Exporter Toolkit vulnerable to basic authentication bypass

Published Nov 29, 2022
·
Updated

Impact

Prometheus and its exporters 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

The exporter-toolkit v0.7.3 and v0.8.2 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.

Credit

We want to thank Lei Wan reporting this security issue.

Other sources

A flaw was found in exporter-toolkit. A request can be forged by an attacker to poison the internal cache used to cache hashes and make subsequent successful requests. This cache is used to limit side channel attacks that could tell an attacker if a user is present in the file or not. Prometheus and its exporters 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. However, due to the way this mechanism was implemented in the exporter toolkit, if the hashed password is known, it is possible to authenticate against Prometheus.

Prometheus Exporter Toolkit is a utility package to build exporters. Prior to versions 0.7.2 and 0.8.2, if someone has access to a Prometheus web.yml file and users' bcrypted passwords, they can bypass security by poisoning the built-in authentication cache. Versions 0.7.2 and 0.8.2 contain a fix for the issue. There is no workaround, but attacker must have access to the hashed password to use this functionality.

Affected Software

6 affected componentsFixes available
Prometheus Exporter Toolkit<0.7.2
Prometheus Exporter Toolkit>=0.8.0<0.8.2
go/github.com/prometheus/exporter-toolkit<0.7.2
0.7.2
go/github.com/prometheus/exporter-toolkit>=0.8.0<0.8.2
0.8.2
redhat/exporter-toolkit<0.7.2
0.7.2
redhat/exporter-toolkit<0.8.2
0.8.2

Event History

Nov 29, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via MITRE·12:00 AM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·09:52 PM
DescriptionSeverityAffected Software
Dec 2, 2022
Advisory Published
via GitHub·10:25 PM

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2022-46146?

CVE-2022-46146 is a vulnerability in the Prometheus Exporter Toolkit that allows an attacker to forge a request and poison the internal cache.

2

How does CVE-2022-46146 affect the software?

CVE-2022-46146 affects exporter-toolkit versions up to 0.7.2 and 0.8.2.

3

What is the severity of CVE-2022-46146?

CVE-2022-46146 has a severity score of 8.8 (high).

4

How can I fix CVE-2022-46146?

To fix CVE-2022-46146, update exporter-toolkit to version 0.7.2 or 0.8.2, depending on the affected version.

5

Where can I find more information about CVE-2022-46146?

You can find more information about CVE-2022-46146 in the following references: [Reference 1](https://bugzilla.redhat.com/show_bug.cgi/show_bug.cgi?id=2149437), [Reference 2](https://bugzilla.redhat.com/show_bug.cgi/show_bug.cgi?id=2149439), [Reference 3](https://bugzilla.redhat.com/show_bug.cgi/show_bug.cgi?id=2149440).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203