Advisory Database
  • Advisories
  • Dependency Scanning
  1. swift
  2. ›
  3. github.com/swift-server/swift-prometheus
  4. ›
  5. CVE-2024-28867

CVE-2024-28867: Un-sanitized metric name or labels can be used to take over exported metrics

March 29, 2024

In code which applies un-sanitized string values into metric names or labels, like this:

let lang = try? request.query-get(String.self, at: "lang")
Counter (
label: "language",
dimensions: [("lang", lang ?? "unknown" )]
)

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.

References

  • github.com/advisories/GHSA-x768-cvr2-345r
  • github.com/swift-server/swift-prometheus
  • github.com/swift-server/swift-prometheus/commit/bfcd4bbfabe11aae4b035424ee9724582e288501
  • github.com/swift-server/swift-prometheus/security/advisories/GHSA-x768-cvr2-345r
  • nvd.nist.gov/vuln/detail/CVE-2024-28867

Detect and mitigate CVE-2024-28867 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 2.0.0-alpha.1 before 2.0.0-alpha.2, version 2.0.0-alpha.1

Fixed versions

  • 2.0.0-alpha.2

Solution

Upgrade to version 2.0.0-alpha.2 or above.

Impact 5.9 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

Source file

swift/github.com/swift-server/swift-prometheus/CVE-2024-28867.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:17:22 +0000.