CVE-2026-25041
JSON

8.6high

Budibase has a Command Injection in PostgreSQL Dump Command

Severity
8.6high CVSS:4.0 by GitHub_M
Exploit likelihood
0.46% (higher than 41% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-726g-59wr-cj4c

Description

Budibase is a low code platform for creating internal tools, workflows, and admin panels. In 3.23.22 and earlier, 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. This affects packages/server/src/integrations/postgres.ts.

Affected

Product or packageVersionsReported by
Budibase budibase<= 3.23.22, up to 3.23.22CVE List, NVD
@budibase/server (npm)before 3.23.32GitHub Advisory Database

All scores

GitHub_M8.6high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
NVD7.2high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-77CWE-78

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

Budibase is a low code platform for creating internal tools, workflows, and admin panels. In 3.23.22 and earlier, 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. This affects packages/server/src/integrations/postgres.ts.

GitHub Advisory Database

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
  1. Use environment variables for sensitive values instead of command-line arguments
  2. Validate and sanitize all configuration values
  3. Use proper escaping for shell arguments
  4. 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
}
NVD (es)

Budibase es una plataforma de bajo código para crear herramientas internas, flujos de trabajo y paneles de administración. En 3.23.22 y anteriores, la integración de PostgreSQL construye comandos de shell utilizando valores de configuración controlados por el usuario (nombre de la base de datos, host, contraseña, etc.) sin una sanitización adecuada. La contraseña y otros parámetros de conexión se interpolan directamente en un comando de shell. Esto afecta a packages/server/src/integrations/postgres.ts.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-25041 changed 2026-03-09CVE Terms of Use
GitHub Advisory DatabaseGHSA-726g-59wr-cj4c changed 2026-03-10CC-BY-4.0
NVDCVE-2026-25041 changed 2026-06-17Public domain