{"id":"CVE-2026-107840","kind":"vulnerability","aliases":["CVE-2026-107840","GHSA-6r69-c6wg-7g8m","GO-2026-6720"],"related":[],"title":"yopass Prometheus metrics middleware allows remote memory exhaustion through unbounded method labels in github.com/jhaals/yopass","description":"yopass is a service for securely sharing secrets, passwords, and files. Prior to version 14.7.0, the Prometheus metrics middleware in pkg/server/server.go uses the attacker-controlled r.Method value directly as the method label for yopass_http_requests_total and yopass_http_request_duration_seconds. Because the catch-all route accepts arbitrary HTTP method tokens, an unauthenticated remote attacker can submit many unique methods and create metric series that the Prometheus registry never evicts. The resulting monotonic memory growth can OOM-kill the process, while the expanding registry also degrades /metrics scrape latency and can blind monitoring. This issue is fixed in version 14.7.0.","summary":"yopass, a service for sharing secrets, lets any unauthenticated client send requests with arbitrary HTTP method names, and its metrics middleware stores each one as a new Prometheus label. An attacker can flood the server with unique methods so memory grows until the process is OOM-killed, and /metrics slows or stops being useful.","severity":"high","cvss":7.5,"epss":0.00444,"exploited":false,"exploited_at":null,"products":[{"name":"github.com/jhaals/yopass","fixed":["0.0.0-20260727191436-61e31ead04a4"],"affected":"< 0.0.0-20260727191436-61e31ead04a4","ecosystem":"go"}],"ecosystems":["go"],"tags":["go","package","prometheus","self-hosted","yopass"],"not_affected_if":["metrics-disabled","version-14.7.0-or-later"],"how_to_check":"Check the module version in go.mod for github.com/jhaals/yopass; anything before 0.0.0-20260727191436-61e31ead04a4 (upstream release 14.7.0) is affected.\nWatch yopass_http_requests_total label cardinality on /metrics for a growing number of distinct method values.","fix":"Upgrade github.com/jhaals/yopass to 0.0.0-20260727191436-61e31ead04a4 or later (release 14.7.0).\nUntil upgraded, put a reverse proxy in front that rejects non-standard HTTP methods.","status":"open","published_at":"2026-10-09T18:17:05+00:00","first_seen_at":"2026-10-23T19:13:08+00:00","triaged_at":"2026-10-23T19:55:58+00:00","updated_at":"2026-10-23T19:55:58+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-23T19:55:58Z","model":"claude-haiku-5-5","output":{"fix":"Upgrade github.com/jhaals/yopass to 0.0.0-20260727191436-61e31ead04a4 or later (release 14.7.0).\nUntil upgraded, put a reverse proxy in front that rejects non-standard HTTP methods.","summary":"yopass, a service for sharing secrets, lets any unauthenticated client send requests with arbitrary HTTP method names, and its metrics middleware stores each one as a new Prometheus label. An attacker can flood the server with unique methods so memory grows until the process is OOM-killed, and /metrics slows or stops being useful.","category":"package","who_cares":["go","self-hosted","yopass","prometheus"],"confidence":0.8,"analyst_note":"","how_to_check":"Check the module version in go.mod for github.com/jhaals/yopass; anything before 0.0.0-20260727191436-61e31ead04a4 (upstream release 14.7.0) is affected.\nWatch yopass_http_requests_total label cardinality on /metrics for a growing number of distinct method values.\nunknown","needs_analyst":false,"not_affected_if":["version-14.7.0-or-later","metrics-disabled"],"severity_if_unknown":"high"},"cost_usd":0.000442,"input_tokens":2320,"output_tokens":420,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-107840':19A,30A '-2026':18A,26A,29A '-6720':27A '/jhaals/yopass':16A,33A '/metrics':90B,187C '14.7.0':110C,200C '6r69':22A '7g8m':24A 'accept':146C 'allow':5A 'also':185C 'arbitrari':54B,147C 'attack':71B,120C,154C 'attacker-control':119C 'blind':192C 'c6wg':23A 'catch':143C 'catch-al':142C 'client':50B 'control':121C 'creat':161C 'cve':17A,28A 'degrad':186C 'direct':124C 'durat':138C 'evict':169C 'exhaust':8A 'expand':183C 'file':106C 'fix':197C 'flood':73B 'ghsa':21A 'ghsa-6r69-c6wg-7g8m':20A 'github.com':15A,32A 'github.com/jhaals/yopass':14A,31A 'go':25A,34B 'grow':81B 'growth':174C 'host':39B 'http':55B,131C,136C,148C 'issu':195C 'kill':88B,178C 'label':12A,69B,128C 'latenc':189C 'let':47B 'mani':157C 'memori':7A,80B,173C 'method':11A,56B,78B,127C,149C,159C 'metric':3A,60B,113C,162C 'middlewar':4A,61B,114C 'monitor':193C 'monoton':172C 'name':57B 'never':168C 'new':67B 'one':64B 'oom':87B,177C 'oom-kil':86B,176C 'packag':35B 'password':104C 'pkg/server/server.go':116C 'prior':107C 'process':84B,180C 'prometheus':2A,36B,68B,112C,166C 'r.method':122C 'registri':167C,184C 'remot':6A,153C 'request':52B,132C,137C 'result':171C 'rout':145C 'scrape':188C 'second':139C 'secret':46B,103C 'secur':101C 'self':38B 'self-host':37B 'send':51B 'seri':163C 'server':75B 'servic':43B,99C 'share':45B,102C 'slow':91B 'stop':93B 'store':62B 'submit':156C 'token':150C 'total':133C 'unauthent':49B,152C 'unbound':10A 'uniqu':77B,158C 'use':95B,117C 'valu':123C 'version':109C,199C 'yopass':1A,40B,41B,96C,130C,135C","nicknames":[],"mitigations":[],"who_affected":null,"tier":null,"verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-09T18:17:05+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"govuln","external_id":"GO-2026-6720","url":"https://pkg.go.dev/vuln/GO-2026-6720","severity":null,"published_at":"2026-10-19T21:08:26+00:00","modified_at":"2026-10-19T21:08:26+00:00","first_seen_at":"2026-10-23T19:13:08+00:00","fetched_at":"2026-10-23T19:13:08+00:00","note":null},{"source":"epss","external_id":"CVE-2026-107840","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-107840","severity":null,"published_at":null,"modified_at":null,"first_seen_at":"2026-10-23T19:13:43+00:00","fetched_at":"2026-10-23T19:13:43+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-107840","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-107840","severity":null,"published_at":"2026-10-09T18:17:05+00:00","modified_at":"2026-10-16T17:17:04+00:00","first_seen_at":"2026-10-23T19:35:23+00:00","fetched_at":"2026-10-23T19:35:23+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}