-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 NEFARIOUSPLAN-CANONICAL-V1 {"body_md":"## The route was public\n\n`src/app/api/providers/route.ts` is forty lines split across a `GET` and a `POST` handler. The POST handler is the one the CVE description names. The narrator wants to walk it from input to network.\n\n```typescript\nexport const POST = async (req: NextRequest) => {\n try {\n const body = await req.json();\n const { type, name, config } = body;\n\n if (!type || !name || !config) {\n return Response.json(\n { message: 'Missing required fields.' },\n { status: 400 },\n );\n }\n\n const registry = new ModelRegistry();\n const newProvider = await registry.addProvider(type, name, config);\n\n return Response.json(\n { provider: newProvider },\n { status: 200 },\n );\n } catch (err) {\n console.error('An error occurred while creating provider', err);\n return Response.json(\n { message: 'An error has occurred.' },\n { status: 500 },\n );\n }\n};\n```\n\nThe only check is whether the JSON body parsed and whether three top-level keys are present. There is no `if (!await verifySession(req))` ahead of the registry call. There is no API-key header read. There is no rate limit. The Next.js App Router contract is that any file named `route.ts` under `src/app/api/` is mounted as a public HTTP handler with no enforcement other than what the file itself runs. This file runs none. The other fifteen files under `src/app/api/` answer the same description, by inspection and by the second issue August829 filed the same morning.\n\n## baseURL is forwarded by design\n\n`addProvider` in `src/lib/models/registry.ts` looks up the provider class by `type`, constructs an instance with the attacker's `config`, then immediately calls `getModelList()` on it. The contract of \"add a provider\" is \"test the provider's reachability before persisting it.\" The reachability test is the SSRF.\n\n```typescript\nasync addProvider(type, name, config): Promise {\n const provider = providers[type];\n if (!provider) throw new Error('Invalid provider type');\n\n const newProvider = configManager.addModelProvider(type, name, config);\n const instance = createProviderInstance(\n provider, newProvider.id, newProvider.name, newProvider.config,\n );\n\n let m: ModelList = { chat: [], embedding: [] };\n try {\n m = await instance.getModelList();\n } catch (err: any) {\n m = {\n chat: [{ key: 'error', name: err.message }],\n embedding: [],\n };\n }\n ...\n}\n```\n\nFor `type: \"ollama\"`, `getModelList` calls `getDefaultModels` in `src/lib/models/providers/ollama/index.ts`:\n\n```typescript\nasync getDefaultModels(): Promise {\n try {\n const res = await fetch(`${this.config.baseURL}/api/tags`, {\n method: 'GET',\n headers: { 'Content-type': 'application/json' },\n });\n const data = await res.json();\n ...\n } catch (err) {\n if (err instanceof TypeError) {\n throw new Error(\n 'Error connecting to Ollama API. Please ensure the base URL is correct and the Ollama server is running.',\n );\n }\n throw err;\n }\n}\n```\n\nThe `fetch` is the sink. The Ollama provider's UI configuration field describes `baseURL` as \"The base URL for the Ollama,\" with a placeholder of `http://host.docker.internal:11434` inside the container and `http://localhost:11434` outside. The framing is local-facing. The convention says the only thing on the other end of this fetch is the operator's own Ollama daemon, running on the same machine as the Vane server. The convention is documentation. The `String(raw.baseURL)` cast in `parseAndValidate` is the entire validator: any string is a baseURL.\n\nThe LM Studio provider has the same shape, `fetch(${baseURL}/v1/models)` with a placeholder of `http://localhost:1234`. The Lemonade provider has the same shape with one extra:\n\n```typescript\nconst res = await fetch(`${this.config.baseURL}/models`, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n ...(this.config.apiKey\n ? { Authorization: `Bearer ${this.config.apiKey}` }\n : {}),\n },\n});\n```\n\nAn attacker who can write the `baseURL` can also write a bearer token the target receives. Three of Vane's seven provider types take a `baseURL` and call `fetch` on it during registration. The CVE description names one parameter; the parameter has three sinks, and one of them is also a request-forgery primitive that can deliver attacker-chosen Authorization headers to attacker-chosen hostnames.\n\n## The error message echoes the response\n\nThe `catch` in `addProvider` ships `err.message` back to the client through the JSON response. When the fetch target returns HTML and the Ollama provider tries to JSON-parse it, Node's `JSON.parse` throws `SyntaxError: Unexpected token '<', \" Well, this works on version 1.12.2, but until basic authentication gets added (which I've seen is planned), this issue or #1123 won't be fixed.\n\n`package.json` on the current master branch reports `\"version\": \"1.12.2\"`. The route handler shown above is from that branch. The \"planned\" fix the comment alludes to is not in the tree.\n\nThe CVE record covers #1124. It does not cover #1122 or #1123, both of which were filed first. MITRE assigned a CVE number for the manipulation of `baseURL`. The manipulation is possible because of #1123. The CVE picked the argument. The issue picked the architecture. The maintainer picked neither.\n\n## The README is the gate\n\nVane's README opens with: \"a privacy-focused AI answering engine that runs entirely on your own hardware.\" The `docker-compose.yaml` shipped at the repository root binds the container's port 3000 to the host's port 3000 without an `address` qualifier, which means `0.0.0.0:3000` by default. The Docker installation is the recommended path. The Docker Hub page lists the image as `itzcrazykns1337/vane`, with public pulls. The phrase \"runs entirely on your own hardware\" is doing the work of an authentication middleware everywhere except at the network boundary.\n\nThis is internal-only-by-convention applied to the entire HTTP surface of a Next.js application. Prior exhibits of the pattern have surfaced it at the granularity of one header ([`x-middleware-subrequest` in CVE-2025-29927](/posts/next-middleware-cve-2025-29927-recursion-guard-was-the-bypass)), one socket bind ([KTransformers' all-interfaces ZeroMQ in CVE-2026-26210](/posts/ktransformers-cve-2026-26210-only-caller-was-on-localhost)), one route group (free5GC's UPI bus mounted on the SBI listener), one transport scheme (ActiveMQ's `vm://` in the JMX scheme registry). Vane's is the same shape applied flat to every `route.ts` under `src/app/api/`. Sixteen handlers, no middleware, one convention. The convention is the documentation's promise. The network does not read documentation.\n\n## The same architecture, the next CVE\n\nA month after August829's three issues, a second researcher filed two more. 360AlphaLab opened #1139 on 2026-05-25 at 11:40 UTC, documenting a second-order SSRF where the unauthenticated `POST /api/config` rewrites the SearXNG search URL stored in the global config, and a later call to `GET /api/discover` fetches the new URL. They opened #1140 sixty-one seconds later, documenting an SSRF where the user's chat message can ask the LLM to scrape arbitrary URLs through the citation-fetching subsystem. Both issues have zero comments. The maintainer has not responded to the second researcher either.\n\nFive public security issues now exist against Vane between 2026-04-26 and 2026-05-27, from two independent researchers. One has a CVE. Four do not. The architecture they all describe is one architectural decision: a Next.js App Router project that mounts handlers under `src/app/api/` and does not insert any per-request authentication step between Next.js's router and the handler's body. The same decision is the source of the API-key disclosure in #1122, the chat-history read in #1123, the SSRF in #1124, the second-order SSRF in #1139, and the LLM-triggered SSRF in #1140.\n\nThis is the design-debt-driver shape. A single architectural commitment, taken because the deployment model was assumed to be \"the operator on their own laptop,\" produces a steady stream of CVE-eligible primitives whenever a researcher reads a different `route.ts`. The patch that closes CVE-2026-9372 will probably add a URL-shape regex to `OllamaProvider.parseAndValidate`, or refuse `baseURL` values whose hostname resolves into RFC 1918 space. The patch will not add the missing middleware. The next CVE from this repository will be one of the other fifteen endpoints, or it will be the cousin of `baseURL` in a different `parseAndValidate`, or it will be a chained primitive that uses `POST /api/config` to redirect a downstream fetch. The researcher who files it will not be the first.\n\nThe Vane repository has 23,000 stars. The Docker image has 50,000 pulls. The \"runs entirely on your own hardware\" framing is what most readers of the README will remember. The framing is what August829 and 360AlphaLab read carefully enough to disprove on every endpoint they looked at.\n\nPoC: [GitHub issue #1124 by August829](https://github.com/ItzCrazyKns/Vane/issues/1124)\n","closing_line":"CVE-2026-9372 closes when the argument gets a regex. The other fifteen routes are still public.","hook_md":"CVE-2026-9372 attributes the SSRF in Vane 1.12.1 to manipulation of the `baseURL` argument in `src/app/api/providers/route.ts`. The argument reaches a `fetch()` call because the handler that reads it has no authentication, no session check, no API key, no rate limit. The handler shares that property with every other file under `src/app/api/`. The issue that produced this CVE was filed by August829 on 2026-04-26. It was one of three filed the same day by the same researcher. The CVE record covers one.","post_id":498,"slug":"vane-cve-2026-9372-baseurl-was-not-the-gate","title":"CVE-2026-9372: Vane's baseURL Was Not The Gate. The Endpoint Was Public.","type":"initial","unreadable_sentence":"The CVE picked the argument. The issue picked the architecture. The maintainer picked neither."} -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQRf0htP5+SjynlxywneZjl4jgkQJgUCany9tgAKCRDeZjl4jgkQ JuX+AP9ZsXkiMJsh7DN2j392zfPDdpvPDRoeKR9ZyP2JCnGpTQD8DOc40LSEs7z2 PeCrKUQsHV6Q7gOBg+X2vwDCtY4K/Ak= =vKUa -----END PGP SIGNATURE-----