CVE-2023-40577Alertmanager UI is vulnerable to stored XSS via the /api/v1/alerts endpoint
Alertmanager handles alerts sent by client applications such as the Prometheus server. An attacker with the permission to perform POST requests on the /api/v1/alerts endpoint could be able to execute arbitrary JavaScript code on the users of Prometheus Alertmanager. This issue has been fixed in Alertmanager version 0.2.51.
What to do
Fixed builds are available from Alpine, Debian, Go, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 25.10 | prometheus-alertmanager | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | prometheus-alertmanager | Fix pending | 0.23.0-4ubuntu0.2+esm1 (Ubuntu Pro) | UBUNTU-CVE-2023-40577 |
| Ubuntu 20.04 | prometheus-alertmanager | Fixed | 0.15.3+ds-3ubuntu1.2 | UBUNTU-CVE-2023-40577 |
| Ubuntu 18.04 | prometheus-alertmanager | Fix pending | 0.6.2+ds-3ubuntu0.1+esm1 (Ubuntu Pro) | UBUNTU-CVE-2023-40577 |
| Debian 14 | prometheus-alertmanager | Fixed | 0.26.0+ds-1 | DEBIAN-CVE-2023-40577 |
| Debian 13 | prometheus-alertmanager | Fixed | 0.26.0+ds-1 | DEBIAN-CVE-2023-40577 |
| Debian 12 | prometheus-alertmanager | Will not fix Debian rates this unimportant for its packages (a minor issue, or one that doesn't affect Debian's build), so no security update is planned. | DEBIAN-CVE-2023-40577 | |
| Alpine Linux 3.24 | alertmanager | Fixed | 0.26.0-r0 | ALPINE-CVE-2023-40577 |
| Alpine Linux 3.23 | alertmanager | Fixed | 0.26.0-r0 | ALPINE-CVE-2023-40577 |
| Alpine Linux 3.22 | alertmanager | Fixed | 0.26.0-r0 | ALPINE-CVE-2023-40577 |
| Alpine Linux 3.21 | alertmanager | Fixed | 0.26.0-r0 | ALPINE-CVE-2023-40577 |
| Alpine Linux 3.20 | alertmanager | Fixed | 0.26.0-r0 | ALPINE-CVE-2023-40577 |
| Alpine Linux 3.19 | alertmanager | Fixed | 0.26.0-r0 | ALPINE-CVE-2023-40577 |
| Go library | github.com/prometheus/alertmanager | Fixed | 0.25.1 | GO-2023-2020 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- prometheus alertmanager: affected: <= 0.25.0
References
- https://github.com/prometheus/alertmanager/security/advisories/GHSA-v86x-5fm3-5p7j
- https://lists.debian.org/debian-lts-announce/2023/10/msg00011.html
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.