{"answers":{"affected":"2 open source packages ship an affected version, including github.com/swift-server/swift-prometheus. It affects 1 product.","exploited":"There is no known exploitation of CVE-2024-28867 in the wild and no public exploit code.","fix":"Upgrade github.com/swift-server/swift-prometheus to 2.0.0-alpha.2 or later.","what":"CVE-2024-28867 is a medium-severity vulnerability in swift-server swift-prometheus, published on 29 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-28867 and fix it if it is affected.\n\nWhat it is: CVE-2024-28867 is a medium-severity vulnerability in swift-server swift-prometheus, published on 29 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-28867 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/swift-server/swift-prometheus (SwiftURL): affected from 2.0.0-alpha.1; fixed in 2.0.0-alpha.2\n- github.com/swift-server/swift-prometheus (SwiftURL): affected from 2.0.0-alpha.1; fixed in 2.0.0-alpha.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-28867/ (Markdown: https://insights.sbomify.com/CVE-2024-28867/index.md)","id":"CVE-2024-28867","markdown":"https://insights.sbomify.com/CVE-2024-28867/index.md","name":"CVE-2024-28867","record":{"aliases":["GHSA-x768-cvr2-345r"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Swift Prometheus client","requires_auth":"none","summary":"Attackers can inject malicious characters into metric names or labels to corrupt exported metrics and cause memory exhaustion in Swift Prometheus clients.","user_interaction":"not_required","vuln_class":"other"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"swift_prometheus","vendor":"apple"}],"cvss":{"score":5.9,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component"}],"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.","ecosystems":["SwiftURL"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Swift Prometheus un-sanitized metric name or labels can be used to take over exported metrics","id":"CVE-2024-28867","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"SwiftURL","product":null,"products":[],"type":"other","year":"2024"},"n_packages":2,"n_references":2,"next":{"headline":"Umbraco possible user enumeration vulnerability","id":"CVE-2024-28868"},"packages":[{"ecosystem":"SwiftURL","fixed":["2.0.0-alpha.2"],"introduced":["2.0.0-alpha.1"],"last_affected":[],"package":"github.com/swift-server/swift-prometheus","purl":null,"source":"GHSA-x768-cvr2-345r"},{"ecosystem":"SwiftURL","fixed":["2.0.0-alpha.2"],"introduced":["2.0.0-alpha.1"],"last_affected":[],"package":"github.com/swift-server/swift-prometheus","purl":"pkg:swift/github.com/swift-server/swift-prometheus","source":"GHSA-x768-cvr2-345r"}],"prev":{"headline":"GoCD vulnerable to reflected Cross-site Scripting possible on server loading page during start-up","id":"CVE-2024-28866"},"products":["swift-prometheus"],"published":"2024-03-29","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-03-25","vendors":["swift-server"]},"summary":"Attackers can inject malicious characters into metric names or labels to corrupt exported metrics and cause memory exhaustion in Swift Prometheus clients.","url":"https://insights.sbomify.com/CVE-2024-28867/"}