CVE-2021-29622: Arbitrary redirects under /new endpoint

Published May 18, 2021
·
Updated

Impact

In 2.23.0, Prometheus changed its default UI to the New ui. To ensure a seamless transition, the URL's prefixed by /new redirect to /. Due to a bug in the code, it is possible for an attacker to craft an URL that can redirect to any other URL, in the /new endpoint.

If a user visits a prometheus server with a specially crafted address (e.g.: http://127.0.0.1:9090/new/new<url>), they can be redirected to an arbitrary URL.

e.g. if a user visits http://127.0.0.1:9090/new/newhttp://www.google.com/, they will be redirected to http://google.com.

Patches

The issue will be patched in 2.26.1 and 2.27.1 releases. In 2.28.0, the /new endpoint will be removed completely.

Workarounds

The workaround is to disable access to /new via a reverse proxy in front of Prometheus.

Note: Users who use a --web.external-url= flag with a path (e.g. --web.external-url=http://example.com/prometheus) are not affected.

For more information

If you have any questions or comments about this advisory, please use our community channels (https://prometheus.io/community). Our security policy is available at https://prometheus.io/docs/operating/security/

Other sources

An open redirect vulnerability was found in Prometheus. By specially crafted URL and a /new endpoint, an attacker can redirect user to any other URL.

Prometheus is an open-source monitoring system and time series database. In 2.23.0, Prometheus changed its default UI to the New ui. To ensure a seamless transition, the URL's prefixed by /new redirect to /. Due to a bug in the code, it is possible for an attacker to craft an URL that can redirect to any other URL, in the /new endpoint. If a user visits a prometheus server with a specially crafted address, they can be redirected to an arbitrary URL. The issue was patched in the 2.26.1 and 2.27.1 releases. In 2.28.0, the /new endpoint will be removed completely. The workaround is to disable access to /new via a reverse proxy in front of Prometheus.

Affected Software

8 affected componentsFixes available
redhat/prometheus<2.26.1
2.26.1
redhat/prometheus<2.27.1
2.27.1
Prometheus Prometheus>=2.23.0<2.26.1
Prometheus Prometheus=2.27.0
Prometheus Prometheus=2.27.0-rc0
go/github.com/prometheus/prometheus>0.0.0-20201116123734-de1c1243f4dd<0.0.0-20210518124745-db7f0bcec27b
0.0.0-20210518124745-db7f0bcec27b
go/github.com/prometheus/prometheus=2.27.0
2.27.1
go/github.com/prometheus/prometheus>=2.23.0<2.26.1
2.26.1

Event History

May 18, 2021
CVE Published
12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverityWeaknessAffected Software
May 19, 2021
CVE Published
via MITRE·08:00 PM
Data Sourced
via MITRE·08:00 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:15 PM
DescriptionSeverityWeaknessAffected Software
Feb 15, 2022
Advisory Published
via GitHub·01:57 AM
Data Sourced
via GitHub·01:57 AM
DescriptionSeverityWeaknessAffected Software

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 the severity of CVE-2021-29622?

The severity of CVE-2021-29622 is classified as medium due to the potential for open redirect attacks.

2

How do I fix CVE-2021-29622?

To fix CVE-2021-29622, upgrade Prometheus to version 2.27.1 or later.

3

Which versions of Prometheus are affected by CVE-2021-29622?

Prometheus versions from 2.23.0 to 2.26.1 are affected by CVE-2021-29622.

4

What is an open redirect vulnerability like CVE-2021-29622?

An open redirect vulnerability allows an attacker to redirect users to malicious URLs when they click on specially crafted links.

5

Are there any known exploits for CVE-2021-29622?

As of the current information available, there are no specific known exploits actively targeting CVE-2021-29622.

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