Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-107840 Overview
Yopass is an open-source service for securely sharing secrets, passwords, and files. A denial of service vulnerability affects versions prior to 14.7.0. The Prometheus metrics middleware in pkg/server/server.go uses the attacker-controlled r.Method value directly as a label value for the yopass_http_requests_total and yopass_http_request_duration_seconds metrics. Because the catch-all route accepts arbitrary HTTP method tokens, an unauthenticated remote attacker can submit many unique method strings to create metric series that the Prometheus registry never evicts. The issue is tracked as [CWE-400] Uncontrolled Resource Consumption and is fixed in version 14.7.0.
Critical Impact
An unauthenticated remote attacker can trigger unbounded memory growth, causing the yopass process to be OOM-killed and degrading /metrics scrape latency to blind monitoring systems.
Affected Products
- Yopass versions prior to 14.7.0
- Deployments exposing the HTTP server with Prometheus metrics enabled
- Any downstream distribution bundling yopass server code before the patched release
Discovery Timeline
- 2026-10-09 - CVE-2026-107840 published to NVD
- 2026-10-16 - Last updated in NVD database
Technical Details for CVE-2026-107840
Vulnerability Analysis
The yopass server exposes Prometheus metrics instrumented through a middleware that records HTTP request counts and latency. The middleware labels each observation with the request method, path, and status code. The middleware passed the raw r.Method string into requests.WithLabelValues(...) and duration.WithLabelValues(...) without validation. Prometheus client libraries create a new time series for every unique label combination and retain those series for the lifetime of the process. An attacker sending requests with arbitrary method tokens, such as random strings, forces the registry to allocate new series indefinitely. This produces monotonic memory growth that eventually triggers the kernel OOM killer. The expanding registry also inflates /metrics scrape response size and latency, which can cause scrape timeouts and gaps in observability.
Root Cause
The root cause is missing input validation on a label value that originates from attacker-controlled data. The catch-all mux route allowed arbitrary HTTP verbs to reach the middleware. The code did not clamp the method string to a known-safe allow list before using it as a Prometheus label.
Attack Vector
An unauthenticated remote attacker sends HTTP requests to the yopass server using unique, non-standard method tokens. Each request creates a new time series inside the Prometheus registry. Repeated requests over time exhaust process memory and degrade metrics endpoint performance.
// Patched middleware in pkg/server/server.go
rec := statusCodeRecorder{ResponseWriter: w, statusCode: http.StatusOK}
handler.ServeHTTP(&rec, r)
path := normalizedPath(r)
method := normalizedMethod(r.Method)
requests.WithLabelValues(method, path, strconv.Itoa(rec.statusCode)).Inc()
duration.WithLabelValues(method, path).Observe(time.Since(start).Seconds())
// normalizedMethod clamps the request method to a fixed set so a client
// cannot inflate Prometheus label cardinality with arbitrary method tokens.
func normalizedMethod(method string) string {
switch method {
case http.MethodGet, http.MethodHead, http.MethodPost, http.MethodPut,
http.MethodPatch, http.MethodDelete, http.MethodConnect,
http.MethodOptions, http.MethodTrace:
return method
}
return "<other>"
}
Source: GitHub Commit 78d0c14 and GitHub Commit 61e31ea
Detection Methods for CVE-2026-107840
Indicators of Compromise
- Access logs showing HTTP requests with non-standard method tokens such as random alphanumeric strings or unusually long verbs.
- Steady increase in resident memory of the yopass server process without a corresponding increase in legitimate traffic.
- Rapidly growing response size and scrape duration for the /metrics endpoint.
- Prometheus series count for yopass_http_requests_total and yopass_http_request_duration_seconds expanding beyond expected method values.
Detection Strategies
- Query the Prometheus registry for distinct method label values on yopass metrics and alert when the cardinality exceeds the standard HTTP verb set.
- Parse HTTP access logs for request methods outside the set GET, HEAD, POST, PUT, PATCH, DELETE, CONNECT, OPTIONS, TRACE.
- Correlate spikes in /metrics payload size with inbound request method diversity from a single source.
Monitoring Recommendations
- Track process RSS and heap allocations for the yopass server with alert thresholds based on steady-state baselines.
- Monitor Prometheus scrape duration and failure rate for yopass targets to detect scrape timeouts.
- Enable rate limiting metrics on the reverse proxy fronting yopass to identify high-volume method enumeration.
How to Mitigate CVE-2026-107840
Immediate Actions Required
- Upgrade yopass to version 14.7.0 or later, which clamps the HTTP method label to a fixed set.
- Restart the yopass process after upgrade to clear accumulated metric series from memory.
- If upgrade is delayed, place a reverse proxy in front of yopass that rejects non-standard HTTP methods.
Patch Information
The fix is included in yopass release 14.7.0 and introduced in Pull Request #3773. The patch adds a normalizedMethod helper that returns <other> for any method outside the standard HTTP verb set, bounding the label cardinality. Full advisory details are published at GHSA-6r69-c6wg-7g8m.
Workarounds
- Configure the reverse proxy or ingress controller to allow only the standard HTTP method set and return 405 for others.
- Restrict access to the yopass /metrics endpoint to trusted monitoring networks only.
- Deploy a periodic process restart or memory limit via container orchestration to bound the impact of unbounded growth.
# Example NGINX configuration restricting HTTP methods upstream of yopass
location / {
limit_except GET HEAD POST PUT PATCH DELETE OPTIONS {
deny all;
}
proxy_pass http://yopass_backend;
}
# Example Kubernetes resource limit to cap process memory
resources:
limits:
memory: "256Mi"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

