CVE-2024-28867
Un-sanitized metric name or labels can be used to take over exported metrics
Reported by github_m · Published March 29, 2024
github.com/swift-server/swift-prometheus is fixed in 2.0.0-alpha.2 (GitHub Packages)
Swift Prometheus is a Swift client for the Prometheus monitoring system, supporting counters, gauges and histograms. In code which applies _un-sanitized string values into metric names or labels_, an attacker could make use of this and send a `?lang` query parameter containing newlines, `}` or similar characters which can lead to the attacker taking over the exported format -- including creating unbounded numbers of stored metrics, inflating server memory usage, or causing "bogus" metrics. This vulnerability is fixed in2.0.0-alpha.2.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| github.com/swift-server/swift-prometheus | GitHub Packages | 2.0.0-alpha.2 |
| github.com/swift-server/swift-prometheus | swiftpackageindex.com | 2.0.0-alpha.2 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| swift-server | swift-prometheus | = 2.0.0-alpha.1 |
| swift-server | swift-prometheus | 2.0.0-alpha.1 |
| github.com | swift-server/swift-prometheus | 2.0.0-alpha.1, 2.0.0-alpha.1 |
Timeline
- Mar 29, 2024 CVE Published
- Mar 29, 2024 CVE Updated
- Mar 30, 2024 EPSS Score (30 in total, the first dated here)
- Oct 4, 2024 Coalition ESS Score (6 in total, the first dated here)
- Jan 14, 2026 Security Advisory
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-28867
vulnetix vdb fixes CVE-2024-28867
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-28867/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://github.com/swift-server/swift-prometheus/security/advisories/GHSA-x768-cvr2-345r x_refsource_CONFIRM
- https://github.com/swift-server/swift-prometheus/commit/bfcd4bbfabe11aae4b035424ee9724582e288501 x_refsource_MISC
- https://nvd.nist.gov/vuln/detail/CVE-2024-28867 advisory
- https://github.com/advisories/GHSA-x768-cvr2-345r advisory
- https://github.com/swift-server/swift-prometheus url