Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-25041

@budibase/server: Command Injection in PostgreSQL Dump Command
Back to all
CVE

CVE-2026-25041

@budibase/server: Command Injection in PostgreSQL Dump Command

Locationpackages/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
}

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
8.6
-
4.0
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
C
H
U
0
-
C
H
U
-

Related Resources

No items found.

References

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

Severity

7.2

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
7.2
EPSS Probability
0.00079%
EPSS Percentile
0.23248%
Introduced Version
0
Fix Available
3.23.32

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading