VYPR
High severity7.5NVD Advisory· Published May 4, 2026· Updated May 11, 2026

CVE-2026-42151

CVE-2026-42151

Description

Prometheus is an open-source monitoring system and time series database. Prior to versions 3.5.3 and 3.11.3, the client_secret field in the Azure AD remote write OAuth configuration (storage/remote/azuread) was typed as string instead of Secret. Prometheus redacts fields of type Secret when serving the configuration via the /-/config HTTP API endpoint. Because the field was a plain string, the Azure OAuth client secret was exposed in plaintext to any user or process with access to that endpoint. This issue has been patched in versions 3.5.3 and 3.11.3.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
github.com/prometheus/prometheusGo
>= 0.45.2, < 0.311.30.311.3

Affected products

1

Patches

2
26dae7f06b6a

Merge pull request #18590 from roidelapluie/roidelapluie/azadsecret

https://github.com/prometheus/prometheusJulienApr 27, 2026via nvd-ref
2 files changed · +9 7
  • storage/remote/azuread/azuread.go+3 2 modified
    @@ -27,6 +27,7 @@ import (
     	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
     	"github.com/google/uuid"
     	"github.com/grafana/regexp"
    +	config_util "github.com/prometheus/common/config"
     )
     
     // Clouds.
    @@ -75,7 +76,7 @@ type OAuthConfig struct {
     	ClientID string `yaml:"client_id,omitempty"`
     
     	// ClientSecret is the clientSecret of the azure active directory application that is being used to authenticate.
    -	ClientSecret string `yaml:"client_secret,omitempty"`
    +	ClientSecret config_util.Secret `yaml:"client_secret,omitempty"`
     
     	// TenantID is the tenantId of the azure active directory application that is being used to authenticate.
     	TenantID string `yaml:"tenant_id,omitempty"`
    @@ -357,7 +358,7 @@ func newWorkloadIdentityTokenCredential(clientOpts *azcore.ClientOptions, worklo
     // newOAuthTokenCredential returns new OAuth token credential.
     func newOAuthTokenCredential(clientOpts *azcore.ClientOptions, oAuthConfig *OAuthConfig) (azcore.TokenCredential, error) {
     	opts := &azidentity.ClientSecretCredentialOptions{ClientOptions: *clientOpts}
    -	return azidentity.NewClientSecretCredential(oAuthConfig.TenantID, oAuthConfig.ClientID, oAuthConfig.ClientSecret, opts)
    +	return azidentity.NewClientSecretCredential(oAuthConfig.TenantID, oAuthConfig.ClientID, string(oAuthConfig.ClientSecret), opts)
     }
     
     // newSDKTokenCredential returns new SDK token credential.
    
  • storage/remote/azuread/azuread_test.go+6 5 modified
    @@ -25,18 +25,19 @@ import (
     	"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
     	"github.com/google/uuid"
     	"github.com/prometheus/client_golang/prometheus/promhttp"
    +	config_util "github.com/prometheus/common/config"
     	"github.com/stretchr/testify/mock"
     	"github.com/stretchr/testify/require"
     	"github.com/stretchr/testify/suite"
     	"go.yaml.in/yaml/v2"
     )
     
     const (
    -	dummyAudience     = "dummyAudience"
    -	dummyClientID     = "00000000-0000-0000-0000-000000000000"
    -	dummyClientSecret = "Cl1ent$ecret!"
    -	dummyTenantID     = "00000000-a12b-3cd4-e56f-000000000000"
    -	testTokenString   = "testTokenString"
    +	dummyAudience                        = "dummyAudience"
    +	dummyClientID                        = "00000000-0000-0000-0000-000000000000"
    +	dummyClientSecret config_util.Secret = "Cl1ent$ecret!"
    +	dummyTenantID                        = "00000000-a12b-3cd4-e56f-000000000000"
    +	testTokenString                      = "testTokenString"
     )
     
     func testTokenExpiry() time.Time { return time.Now().Add(5 * time.Second) }
    
cb493a437bea

Merge pull request #18587 from roidelapluie/roidelapluie/azadsecret-lts

https://github.com/prometheus/prometheusJulienApr 27, 2026via nvd-ref
2 files changed · +9 7
  • storage/remote/azuread/azuread.go+3 2 modified
    @@ -27,6 +27,7 @@ import (
     	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
     	"github.com/google/uuid"
     	"github.com/grafana/regexp"
    +	config_util "github.com/prometheus/common/config"
     )
     
     // Clouds.
    @@ -55,7 +56,7 @@ type OAuthConfig struct {
     	ClientID string `yaml:"client_id,omitempty"`
     
     	// ClientSecret is the clientSecret of the azure active directory application that is being used to authenticate.
    -	ClientSecret string `yaml:"client_secret,omitempty"`
    +	ClientSecret config_util.Secret `yaml:"client_secret,omitempty"`
     
     	// TenantID is the tenantId of the azure active directory application that is being used to authenticate.
     	TenantID string `yaml:"tenant_id,omitempty"`
    @@ -279,7 +280,7 @@ func newManagedIdentityTokenCredential(clientOpts *azcore.ClientOptions, managed
     // newOAuthTokenCredential returns new OAuth token credential.
     func newOAuthTokenCredential(clientOpts *azcore.ClientOptions, oAuthConfig *OAuthConfig) (azcore.TokenCredential, error) {
     	opts := &azidentity.ClientSecretCredentialOptions{ClientOptions: *clientOpts}
    -	return azidentity.NewClientSecretCredential(oAuthConfig.TenantID, oAuthConfig.ClientID, oAuthConfig.ClientSecret, opts)
    +	return azidentity.NewClientSecretCredential(oAuthConfig.TenantID, oAuthConfig.ClientID, string(oAuthConfig.ClientSecret), opts)
     }
     
     // newSDKTokenCredential returns new SDK token credential.
    
  • storage/remote/azuread/azuread_test.go+6 5 modified
    @@ -25,18 +25,19 @@ import (
     	"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
     	"github.com/google/uuid"
     	"github.com/prometheus/client_golang/prometheus/promhttp"
    +	config_util "github.com/prometheus/common/config"
     	"github.com/stretchr/testify/mock"
     	"github.com/stretchr/testify/require"
     	"github.com/stretchr/testify/suite"
     	"gopkg.in/yaml.v2"
     )
     
     const (
    -	dummyAudience     = "dummyAudience"
    -	dummyClientID     = "00000000-0000-0000-0000-000000000000"
    -	dummyClientSecret = "Cl1ent$ecret!"
    -	dummyTenantID     = "00000000-a12b-3cd4-e56f-000000000000"
    -	testTokenString   = "testTokenString"
    +	dummyAudience                        = "dummyAudience"
    +	dummyClientID                        = "00000000-0000-0000-0000-000000000000"
    +	dummyClientSecret config_util.Secret = "Cl1ent$ecret!"
    +	dummyTenantID                        = "00000000-a12b-3cd4-e56f-000000000000"
    +	testTokenString                      = "testTokenString"
     )
     
     func testTokenExpiry() time.Time { return time.Now().Add(5 * time.Second) }
    

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

7

News mentions

4