CVEfocus › CVE database › CVE-2023-40577

CVE-2023-40577Alertmanager UI is vulnerable to stored XSS via the /api/v1/alerts endpoint

CVSS 7.5 HighEPSS 0.7% (higher than 48% of CVEs)Published 2023-08-25Updated 2025-02-13Assigner: GitHub_M

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.

CWE-79

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

10Fixed
2Fix pending
1Will not fix
1Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 25.10prometheus-alertmanagerNot affected
vulnerable_code_not_present
Ubuntu 22.04prometheus-alertmanagerFix pending0.23.0-4ubuntu0.2+esm1 (Ubuntu Pro)UBUNTU-CVE-2023-40577
Ubuntu 20.04prometheus-alertmanagerFixed0.15.3+ds-3ubuntu1.2UBUNTU-CVE-2023-40577
Ubuntu 18.04prometheus-alertmanagerFix pending0.6.2+ds-3ubuntu0.1+esm1 (Ubuntu Pro)UBUNTU-CVE-2023-40577
Debian 14prometheus-alertmanagerFixed0.26.0+ds-1DEBIAN-CVE-2023-40577
Debian 13prometheus-alertmanagerFixed0.26.0+ds-1DEBIAN-CVE-2023-40577
Debian 12prometheus-alertmanagerWill 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.24alertmanagerFixed0.26.0-r0ALPINE-CVE-2023-40577
Alpine Linux 3.23alertmanagerFixed0.26.0-r0ALPINE-CVE-2023-40577
Alpine Linux 3.22alertmanagerFixed0.26.0-r0ALPINE-CVE-2023-40577
Alpine Linux 3.21alertmanagerFixed0.26.0-r0ALPINE-CVE-2023-40577
Alpine Linux 3.20alertmanagerFixed0.26.0-r0ALPINE-CVE-2023-40577
Alpine Linux 3.19alertmanagerFixed0.26.0-r0ALPINE-CVE-2023-40577
Go librarygithub.com/prometheus/alertmanagerFixed0.25.1GO-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.

References

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.