GO-2022-0322

Source
https://pkg.go.dev/vuln/GO-2022-0322
Import Source
https://vuln.go.dev/ID/GO-2022-0322.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2022-0322
Aliases
Related
Published
2022-07-15T23:29:02Z
Modified
2024-10-15T05:56:54.657204Z
Summary
Uncontrolled resource consumption in github.com/prometheus/client_golang
Details

The Prometheus client_golang HTTP server is vulnerable to a denial of service attack when handling requests with non-standard HTTP methods.

In order to be affected, an instrumented software must use any of the promhttp.InstrumentHandler* middleware except RequestsInFlight; not filter any specific methods (e.g GET) before middleware; pass a metric with a "method" label name to a middleware; and not have any firewall/LB/proxy that filters away requests with unknown "method".

References

Affected packages

Go / github.com/prometheus/client_golang

Package

Name
github.com/prometheus/client_golang
View open source insights on deps.dev
Purl
pkg:golang/github.com/prometheus/client_golang

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.11.1

Ecosystem specific

{
    "imports": [
        {
            "path": "github.com/prometheus/client_golang/prometheus/promhttp",
            "symbols": [
                "Handler",
                "HandlerFor",
                "InstrumentHandlerCounter",
                "InstrumentHandlerDuration",
                "InstrumentHandlerRequestSize",
                "InstrumentHandlerResponseSize",
                "InstrumentHandlerTimeToWriteHeader",
                "InstrumentMetricHandler",
                "InstrumentRoundTripperCounter",
                "InstrumentRoundTripperDuration",
                "flusherDelegator.Flush",
                "readerFromDelegator.ReadFrom",
                "responseWriterDelegator.Write",
                "responseWriterDelegator.WriteHeader",
                "sanitizeMethod"
            ]
        }
    ]
}