Skip to content

Alertmanager: reject file-based http_headers in tenant configs - #7767

Merged
friedrichg merged 3 commits into
masterfrom
reject-http-headers-files
Aug 15, 2026
Merged

Alertmanager: reject file-based http_headers in tenant configs#7767
friedrichg merged 3 commits into
masterfrom
reject-http-headers-files

Conversation

@friedrichg

Copy link
Copy Markdown
Member

What this PR does: Rejects http_config.http_headers.<NAME>.files in per-tenant Alertmanager configs.

prometheus/common's headersRoundTripper reads those paths at notification time and injects the contents into a request whose URL the tenant also controls, so a tenant with Alertmanager API access could disclose files readable by the Alertmanager process. http_headers was the one setting missing from the *_file denylist that validateReceiverHTTPConfig already applies.

Only Files is rejected. Values and Secrets are inline literals and keep working.

Affects v1.18.0 through v1.21.1. Only deployments with -alertmanager.enable-api=true are exposed.

Tracked in GHSA-hq3h-j634-grmc.

Draft until the advisory is published. The CHANGELOG entry is intentionally non-specific and should be expanded with the CVE id at that point.

Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
@friedrichg
friedrichg marked this pull request as ready for review August 14, 2026 21:23
Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
@friedrichg
friedrichg force-pushed the reject-http-headers-files branch from 7b5a013 to 7b493c1 Compare August 14, 2026 22:41
…-files

Signed-off-by: Friedrich Gonzalez <1517449+friedrichg@users.noreply.github.com>
@friedrichg
friedrichg force-pushed the reject-http-headers-files branch from 23bb7b8 to c24022b Compare August 15, 2026 06:47
@friedrichg
friedrichg requested a review from SungJin1212 August 15, 2026 07:24

@SungJin1212 SungJin1212 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Aug 15, 2026
@friedrichg
friedrichg merged commit 0363900 into master Aug 15, 2026
74 of 75 checks passed
@friedrichg
friedrichg deleted the reject-http-headers-files branch August 15, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/alertmanager lgtm This PR has been approved by a maintainer size/L type/security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants