Skip to content
OpenAdvisories
Medium · 5.9 CVE-2024-28867 EUVD-2024-1036GHSA-x768-cvr2-345r

Swift Prometheus un-sanitized metric name or labels can be used to take over exported metrics

Published Mar 29, 2024 · Updated Mar 25, 2025 · Assigned by GitHub_M

Description

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.

Affected products

VendorProductAffectedFixed
swift-server swift-prometheus = 2.0.0-alpha.1 —

Affected packages

EcosystemPackageAffectedFixedRecord
SwiftURL github.com/swift-server/swift-prometheus >= 2.0.0-alpha.1, < 2.0.0-alpha.2 2.0.0-alpha.2 GHSA-x768-cvr2-345r

References