Proof-of-concept per un path traversal (CWE-22) in n8n nei nodi Databricks: l'input di un webhook non autenticato elude il percorso Genie per esfiltrare i segreti PAT del workspace, con un laboratorio loopback.
abraxaslabs.tech · github.com/abraxas · @abraxas_null · [email protected] · n8n-databricks-path-join
n8n 2.42.0 - n8n GmbH
GHSA-89p4-6h98-c7xm e GHSA-rqch-9jrh-cr8w hanno introdotto toPathSegment: encodeURIComponent più il rifiuto di '' / . / ... getSpace.operation.ts concatena spaceId in ${host}/api/2.0/genie/spaces/${spaceId}. Vector Search getIndex e Files downloadFile sono della stessa classe. LangChain VectorStoreDatabricks avvolge già il percorso dell'indice. Il resto lo fa WHATWG new URL. ../ viene normalizzato. Il PAT Databricks del workflow se ne va con esso.
Input webhook non attendibile diventa GET /api/2.0/secrets/get sotto il token del workspace. Credential leak su Databricks, non RCE sull'host n8n.
| ID | nessuna CVE al momento |
| CWE | CWE-22 |
| CVSS | High: 8.6 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N |
| Prodotto | n8n |
| Affetto | fino alla 2.42.0 (86c23326); gemello di GHSA-89p4 / GHSA-rqch |
| Auth | non autenticato al webhook se un workflow vittima ha associato input non attendibile |
| Licenza | GNU Affero GPL v3.0 |
| Lab | solo 127.0.0.1 |
Colpire un webhook pubblico, una chat o un trigger HTTP che confluisce in Databricks Genie get-space (o Vector Search get-index, o Files download) con un id controllato dall'attaccante. Il token del workflow esegue quindi GET su /api/2.0/secrets/get. Se quel token può leggere lo scope (tipico PAT di amministratore del workspace), l'output del nodo è il JSON value del segreto.
Un token senza ACL sui segreti restituisce comunque 403; anche questo dimostra che la richiesta ha lasciato /genie. Il download di Files richiede un ../ più profondo (prefisso più lungo). Serve una vittima che abbia associato input non attendibile a quel parametro. Un nodo HTTP Request bloccato (allowedHttpRequestDomains: none) non sostituisce la codifica degli id Databricks.
Stesso prodotto, residuo gemello: hidden Function vm2.
Stesso passaggio sui residui del lab Function: dieci ricerche su [email protected] dopo l'ondata di GHSA del 16 settembre 2026. La ricerca sulla node-injection cercava gemelli incompleti di GHSA-89p4 (id risorsa della Public API) e GHSA-rqch (nome tabella Supabase). Elastic, Adalo, Currents, il nodo n8n stesso. L'helper esiste perché hanno già perso questa battaglia. Databricks nodes-base non lo chiama.
Non l'ho puntato contro un workspace reale. Il mock del lab su :18203 risponde a GET /api/2.0/secrets/get con N8N-DBX-SECRET-WITNESS. n8n su :18202. Il webhook dbx-space associa spaceId dal JSON. Log di accesso del mock: GET /api/2.0/secrets/get?scope=s&key=k. Il body del webhook contiene il witness.
Vicoli ciechi già registrati: richiesta che resta sotto /api/2.0/genie/spaces/ (allora .. veniva codificato - il lab richiede che sia uscito); trattare l'RCE sull'host n8n come SUCCESS; colpire un workspace reale; una reverse shell. Teatro. Il witness è N8N-DBX-SECRET-WITNESS più la riga di richiesta del mock.
cd lab
./run.sh
Target solo http://127.0.0.1:18202 (n8n) e :18203 (mock). L'host delle credenziali è il mock, non un workspace reale.
webhook-http=200
mock-request-line=GET /api/2.0/secrets/get?scope=s&key=k
webhook-witness=True
mock-secrets-get=True
witness=N8N-DBX-SECRET-WITNESS
SUCCESS N8N-DBX-PATH-JOIN
Avvolgere ogni id di percorso Databricks con toPathSegment, come fa VectorStoreDatabricks.
getSpace.operation.ts · toPathSegment · DatabricksVectorStore.tsGNU Affero GPL v3.0. Vedi LICENSE. Solo lab su loopback. Nessuna garanzia.