Sanaan Fayaz Wani

teableio/teable

GHSA-jvm6-86c5-f8j8

SSRF via AI provider baseUrl bypasses safeFetch, reachable by any space owner

GHSA-jvm6-86c5-f8j8

6.5

Medium

CVSS 3.1 base

  1. 2026-09-04Reported privately
  2. 39 days later2026-10-13Published by the maintainer

What to do

If you run teable before release.2026-10-12T12-45-53Z.3331, upgrade to release.2026-10-12T12-45-53Z.3331 or later.

Anyone who can reach it over the network, with a low-privilege account and no user interaction, can read sensitive data.Read from the CVSS 3.1 vector

CVSS 3.1 metrics

To exploit it

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None

What it gets

Confidentiality
High
Integrity
None
Availability
None
Scope
Unchanged

Open this vector in the FIRST calculator ↗

Weakness
CWE-918 Server-Side Request Forgery
CVE
not assigned
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Also in teable
GHSA-w677-p6hx-85vw 7.1
2026-09-04Reported privately
39 days
2026-10-13Published by the maintainer

My analysis of this finding: root cause, the vulnerable code, the impact and the fix, in the site’s format. The official advisory of record is linked above.

Affected versions

Package Ecosystem Vulnerable Fixed in
teableio/teable other < release.2026-10-12T12-45-53Z.3331 release.2026-10-12T12-45-53Z.3331

Summary

Teable ships its own SSRF guard (createSsrfSafeFetch / safeFetch) and wires it into the import and attachment paths. The AI provider path does not use it. POST /api/space/:spaceId/test-llm builds an LLM provider from a fully user-controlled baseUrl and makes the server issue an outbound request to it, through a plain global fetch with no host or scheme allowlist. Any authenticated user can reach the endpoint, and the error responses distinguish open ports from closed ones, giving a server-side internal port-scan and reachability oracle against hosts the attacker cannot reach directly. This is a server-side request forgery (CWE-918).

Where it lives

The route carries @Permissions('space|update'), which sounds privileged but is held by every user on a space they create: POST /api/space needs only space|create (a default capability), and the creator becomes Role.Owner, which has space|update. The handler ignores the path spaceId entirely and acts on the request body, so an attacker’s own throwaway space satisfies the gate. baseUrl is validated only as z.url(), with no host or scheme restriction.

testLLM in apps/nestjs-backend/src/features/setting/open-api/setting-open-api.service.ts takes baseUrl straight from the request body, builds the provider, and calls generateText, which performs the outbound request:

async testLLM(testLLMRo: ITestLLMRo): Promise<ITestLLMVo> {  const { type, baseUrl, apiKey, models, ... } = testLLMRo;  ...  const providerOptions = getAdaptedProviderOptions(type, { name: model, baseURL: baseUrl, apiKey });  const modelProvider = provider({ ...providerOptions } as never) as OpenAIProvider;

The buguser supplied baseUrl becomes the provider endpoint

The provider fetch is defined in apps/nestjs-backend/src/features/ai/util.ts, and it is the unguarded global fetch, not safeFetch:

const createFixingFetch = (): typeof fetch => {  return async (input, init) => {    const response = await fetch(input, init);   // plain global fetch, no SSRF guard    ...

The bugplain global fetch with no SSRF guard

The other provider factories in modelProviders use the AI SDK’s own default fetch, also unfiltered. None of them route through the safeFetch that imports and external-DB connections already enforce.

Impact

I confirmed the oracle live against ghcr.io/teableio/teable:latest as a non-admin user, probing docker-network services the attacker has no direct route to:

baseUrl teable-db:5432    (internal Postgres, OPEN) -> "Cannot connect to API: other side closed"  (connected)
baseUrl teable-db:1       (CLOSED port)             -> "Cannot connect to API: bad port"
baseUrl teable-cache:6379 (internal Redis, OPEN)    -> "other side closed"                         (connected)

The distinct error per target proves the server performed the attacker-directed outbound connection and reflected the result. An unprivileged tenant in a multi-tenant deployment can enumerate and fingerprint internal services, databases, caches and cloud metadata endpoints that are otherwise unreachable from its network position, and an endpoint returning OpenAI-shaped JSON reflects its body back to the caller.

Fix

Route the AI provider path through the existing guard: pass a createSsrfSafeFetch()-based fetch into every entry of modelProviders (not only the OpenAI-compatible wrapper) and into createGateway, or install it as a global undici dispatcher. Restrict baseUrl to public https hosts via an allowlist, and return a generic failure message instead of the raw connection error so the port oracle disappears.

The record

Weakness
CWE-918 Server-Side Request Forgery
Affected
teable before release.2026-10-12T12-45-53Z.3331
Fixed in
release.2026-10-12T12-45-53Z.3331
Disclosure
2026-09-04 Reported privately
39 days later2026-10-13 Published
Advisory
GHSA-jvm6-86c5-f8j8
Also in teable
GHSA-w677-p6hx-85vw 7.1

About this writeup

Sanaan Fayaz Wani (GitHub sfwani) reported this vulnerability to the teable maintainers under coordinated disclosure and is credited as a reporter in GHSA-jvm6-86c5-f8j8, published 2026-10-13.

All published findings: advisory index.