GitHub Advisoryadvisory · Go

GHSA-6r69-c6wg-7g8m yopass Prometheus metrics middleware allows remote memory exhaustion through unbounded method labels

HIGH Published 2026-10-09 Modified 2026-10-09 Official page ↗
Aliases
CVE-2026-107840
Ecosystem
Go
Packages
github.com/jhaals/yopass
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weaknesses
CWE-400
Reviewed
2026-10-09

Affected packages

• Go github.com/jhaals/yopass: < 0.0.0-20260727191436-61e31ead04a4 → fixed in 0.0.0-20260727191436-61e31ead04a4

Description

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.

Related

Alias · CVE (1)

  • CVE-2026-107840 yopass is a service for securely sharing secrets, passwords, and files. vulnerability

Weakness · CWE (1)

  • CWE-400 Uncontrolled Resource Consumption weakness

References