Vulnerabilities in pkg:golang/github.com/prometheus/alertmanager
PACKAGECVE-2023-40577 is a MODERATE (CVSS 5.4) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Github.com/prometheus/alertmanager libraries in the Go ecosystem. The issue involves alertmanager ui is vulnerable to stored xss via the /api/v1/alerts endpoint. Remediation is available by upgrading affected packages to version 0.25.1.
pkg:golang/github.com/prometheus/alertmanager
Vulnerability advisories affecting package pkg:golang/github.com/prometheus/alertmanager. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-v86x-5fm3-5p7j | CVE-2023-40577 | MODERATE | Alertmanager UI is vulnerable to stored XSS via the /api/v1/alerts endpoint |
CVE-2023-40577 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2023-40577
To remediate this vulnerability, upgrade all affected Github.com/prometheus/alertmanager dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/prometheus/alertmanager to 0.25.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/prometheus/alertmanager
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-40577, inspect your project dependencies for Github.com/prometheus/alertmanager:
inspect dependencies for github.com/prometheus/alertmanager
Analyze the terminal output to locate any version of Github.com/prometheus/alertmanager in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.25.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Github.com/prometheus/alertmanager, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-40577 Affected Github.com/prometheus/alertmanager Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/prometheus/alertmanager
|
Go |
< 0.25.1
|
0.25.1
|
References
Frequently Asked Questions
What is CVE-2023-40577?
Which Github.com/prometheus/alertmanager versions are affected?
What version fixes CVE-2023-40577?
Is github.com/prometheus/alertmanager affected?
What is the CVSS score of CVE-2023-40577?
What CWE is associated with CVE-2023-40577?
How can I check Go dependencies for CVE-2023-40577?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v86x-5fm3-5p7j",
"modified" : "2023-09-01T17:34:29Z",
"published" : "2023-08-23T20:42:43Z",
"aliases" : [ "CVE-2023-40577" ],
"summary" : "Alertmanager UI is vulnerable to stored XSS via the /api/v1/alerts endpoint",
"details" : "### Impact\n\nAn 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.\n\n### Patches\n\nUsers can upgrade to Alertmanager v0.2.51.\n\n### Workarounds\n\nUsers can setup a reverse proxy in front of the Alertmanager web server to forbid access to the /api/v1/alerts endpoint.\n\n### References\n\nN/A\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/prometheus/alertmanager"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.25.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.25.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/prometheus/alertmanager/security/advisories/GHSA-v86x-5fm3-5p7j"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-40577"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/prometheus/alertmanager"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2023/10/msg00011.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-08-23T20:42:43Z",
"nvd_published_at" : "2023-08-25T01:15:09Z"
}
}