CVE-2026-25041: @budibase/server Command Injection Vulnerability

HIGH
Advisory Identifier: GHSA-726g-59wr-cj4c
CWE-78 CWE-77
Published
Advisory Summary

CVE-2026-25041 is a HIGH command injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting @budibase/server libraries in the npm ecosystem. The issue involves command injection in postgresql dump command. Remediation is available by upgrading affected packages to version 3.23.32.

CVE-2026-25041 at a Glance

CVE Identifier CVE-2026-25041
GHSA Identifier GHSA-726g-59wr-cj4c
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product @budibase/server
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-25041

To remediate this vulnerability, upgrade all affected @budibase/server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@budibase/server fixed: 3.23.32
npm install @budibase/server@3.23.32
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @budibase/server

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-25041, inspect your project dependencies using npm:

npm ls @budibase/server

Analyze the terminal output to locate any version of @budibase/server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.23.32), your application is affected.

Note: The npm ls @budibase/server command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In @budibase/server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

**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 ```529:531:packages/server/src/integrations/postgres.ts 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 ```typescript 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 } ```

CVE-2026-25041 Affected @budibase/server Versions

1 component(s)
Fixed Versions:
3.23.32
Product / Package Ecosystem Affected Versions Fixed Version
@budibase/server
npm
< 3.23.32
3.23.32

References

Frequently Asked Questions

What is CVE-2026-25041?
CVE-2026-25041 is a security vulnerability in @budibase/server involving Command Injection in PostgreSQL Dump Command under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which @budibase/server versions are affected?
Affected versions include releases prior to 3.23.32 across affected packages: @budibase/server.
What version fixes CVE-2026-25041?
Upgrading to 3.23.32 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @budibase/server affected?
Yes, @budibase/server is affected in releases prior to 3.23.32. Upgrade your dependency to 3.23.32 or later.
What CWE is associated with CVE-2026-25041?
CVE-2026-25041 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check npm dependencies for CVE-2026-25041?
Run the dependency tree command: 'npm ls @budibase/server'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-726g-59wr-cj4c",
  "modified" : "2026-03-10T18:39:09Z",
  "published" : "2026-03-09T16:56:26Z",
  "aliases" : [ "CVE-2026-25041" ],
  "summary" : "@budibase/server: Command Injection in PostgreSQL Dump Command",
  "details" : "**Location**: `packages/server/src/integrations/postgres.ts:529-531`  \n\n#### Description\nThe 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.\n\n#### Code Reference\n```529:531:packages/server/src/integrations/postgres.ts\n    const dumpCommand = `PGPASSWORD=\"${\n      this.config.password\n    }\" pg_dump --schema-only \"${dumpCommandParts.join(\" \")}\"`\n```\n\n#### Attack Vector\nAn attacker who can control database configuration values (e.g., through compromised credentials or configuration injection) can inject shell commands. For example:\n- Password: `password\"; malicious-command; echo \"`\n- Database name: `db\"; rm -rf /; echo \"`\n\n#### Impact\n- Remote code execution\n- System compromise\n- Data exfiltration\n\n#### Recommendation\n1. Use environment variables for sensitive values instead of command-line arguments\n2. Validate and sanitize all configuration values\n3. Use proper escaping for shell arguments\n4. Consider using a PostgreSQL library's native dump functionality instead of shell commands\n\n#### Example Fix\n```typescript\nimport { execFile } from \"child_process\"\nimport { promisify } from \"util\"\nconst execFileAsync = promisify(execFile)\n\n// Use execFile with proper argument handling\nconst env = {\n  ...process.env,\n  PGPASSWORD: this.config.password\n}\n\nconst args = [\n  \"--schema-only\",\n  \"--host\", this.config.host,\n  \"--port\", this.config.port.toString(),\n  \"--username\", this.config.user,\n  \"--dbname\", this.config.database\n]\n\ntry {\n  const { stdout } = await execFileAsync(\"pg_dump\", args, { env })\n  return stdout\n} catch (error) {\n  // Handle error\n}\n```",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@budibase/server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.23.32"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Budibase/budibase/security/advisories/GHSA-726g-59wr-cj4c"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-25041"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Budibase/budibase/commit/9fdbff32fb9e69650ba899a799e13f80d9b09e93"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Budibase/budibase"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Budibase/budibase/blob/f34d545602a7c94427bae63312a5ee9bf2aa6c85/packages/server/src/integrations/postgres.ts#L529-L531"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-77", "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-09T16:56:26Z",
    "nvd_published_at" : "2026-03-09T20:16:07Z"
  }
}