NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Go

CVE-2026-107840: yopass Prometheus metrics middleware allows remote memory exhaustion through unbounded method labels

highCVSS 3.1 7.5GHSA-6r69-c6wg-7g8m

The Prometheus metrics middleware in pkg/server/server.go used r.Method directly as a label value on request counter and duration histogram metrics. Since the mux catch-all route matches any HTTP method, an unauthenticated attacker can send requests with arbitrary method strings (e.g. curl -X "M1" http://host/), each creating new counter and histogram time series in the Prometheus registry.

Published Oct 9, 2026

Affected packages

github.com/jhaals/yopass

Ecosystem
Go
Affected
< 0.0.0-20260727191436-61e31ead04a4
Fixed in
0.0.0-20260727191436-61e31ead04a4
Check
go list -m github.com/jhaals/yopass

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

The Prometheus metrics middleware in pkg/server/server.go used r.Method directly as a label value on request counter and duration histogram metrics. Since the mux catch-all route matches any HTTP method, an unauthenticated attacker can send requests with arbitrary method strings (e.g. curl -X "M1" http://host/), each creating new counter and histogram time series in the Prometheus registry. The registry's internal maps never evict entries.

An attacker issuing requests with unique method values causes monotonic memory growth until the process is OOM-killed. Additionally, /metrics scrape latency degrades proportionally, eventually timing out and blinding monitoring.

Remediation: Upgrade to 14.7.0 or later, which clamps the method label to a fixed allowlist (GET, POST, PUT, DELETE, OPTIONS, HEAD, CONNECT, TRACE) and maps everything else to other.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology