@budibase/server: Command Injection in PostgreSQL Dump Command
Location: packages/server/src/integrations/postgres.ts:529-531
Description
The PostgreSQL integration constructs shell commands using user-controlled configuration values (database name, host, password, etc.) without proper sanitization. The password and other connection parameters are directly interpolated into a shell command.
Code Reference
const dumpCommand = `PGPASSWORD="${
this.config.password
}" pg_dump --schema-only "${dumpCommandParts.join(" ")}"`
Attack Vector
An attacker who can control database configuration values (e.g., through compromised credentials or configuration injection) can inject shell commands. For example:
- Password:
password"; malicious-command; echo " - Database name:
db"; rm -rf /; echo "
Impact
- Remote code execution
- System compromise
- Data exfiltration
Recommendation
- Use environment variables for sensitive values instead of command-line arguments
- Validate and sanitize all configuration values
- Use proper escaping for shell arguments
- Consider using a PostgreSQL library's native dump functionality instead of shell commands
Example Fix
import { execFile } from "child_process"
import { promisify } from "util"
const execFileAsync = promisify(execFile)
// Use execFile with proper argument handling
const env = {
...process.env,
PGPASSWORD: this.config.password
}
const args = [
"--schema-only",
"--host", this.config.host,
"--port", this.config.port.toString(),
"--username", this.config.user,
"--dbname", this.config.database
]
try {
const { stdout } = await execFileAsync("pg_dump", args, { env })
return stdout
} catch (error) {
// Handle error
}
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| npm-Paket | @budibase/server | < 3.23.32 | 3.23.32 |
Verweise
- https://github.com/Budibase/budibase/security/advisories/GHSA-726g-59wr-cj4c
- https://nvd.nist.gov/vuln/detail/CVE-2026-25041
- https://github.com/Budibase/budibase/commit/9fdbff32fb9e69650ba899a799e13f80d9b09e93
- https://github.com/Budibase/budibase
- https://github.com/Budibase/budibase/blob/f34d545602a7c94427bae63312a5ee9bf2aa6c85/packages/server/src/integrations/postgres.ts#L529-L531
- CVSS-Vektor
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N- Schwäche (CWE)
CWE-77, CWE-78- Plattform
- npm
- Paket
@budibase/server- Veröffentlicht
- 09.03.2026
- Aktualisiert
- 11.10.2026 10:22
Quellen und Lizenzen
OSV / GitHub Advisory Database - GHSA-726g-59wr-cj4c - CC BY 4.0
Schwachstellenhistorie: @budibase/server
Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
- Einträge insgesamt
- 42
- Erste → letzte
- 03.2024 08.2026
- Ohne Fix
- 19
- In Angriffen ausgenutzt
- 0
Verteilung nach Schweregrad
- Kritisch 8
- Hoch 27
- Mittel 7
Veröffentlichungen pro Jahr
- 2024: 1
- 2025: 0
- 2026: 41
-
@budibase/server: Command Injection in PostgreSQL Dump Command dieser Eintrag
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.