CVE-2026-25044: Budibase: Command Injection in Bash Automation Step

Published Apr 3, 2026
·
Updated

Location: packages/server/src/automations/steps/bash.ts

Description The bash automation step executes user-provided commands using execSync without proper sanitization or validation. User input is processed through processStringSync which allows template interpolation, potentially allowing arbitrary command execution.

Code Reference 21:28:packages/server/src/automations/steps/bash.ts const command = processStringSync(inputs.code, context)

let stdout, success = true try { stdout = execSync(command, { timeout: environment.QUERYTHREADTIMEOUT, }).toString()

Attack Vector An attacker with access to create or modify automations can inject malicious shell commands by including template syntax that evaluates to command injection payloads (e.g., $(rm -rf /), ; malicious-command, | malicious-command).

Impact - Remote code execution (RCE) - Complete system compromise - Data exfiltration - Lateral movement within the infrastructure

Recommendation 1. Immediate: Disable bash automation step in production until fixed 2. Implement a whitelist of allowed commands 3. Use parameterized command execution with proper escaping 4. Implement command argument validation 5. Consider using a restricted shell or command sandboxing 6. Add rate limiting and monitoring for command execution

Example Fix typescript import { spawn } from "childprocess"

// Validate against whitelist const ALLOWEDCOMMANDS = ["echo", "date", "pwd"] // Extend as needed

function sanitizeCommand(input: string): string { // Remove dangerous characters and command chaining return input.replace(/[;&|$(){}[\]]/g, "").trim() }

function validateCommand(cmd: string): boolean { const parts = cmd.split(/\s+/) return ALLOWEDCOMMANDS.includes(parts[0]) }

export async function run({ inputs, context }) { if (!inputs.code) { return { stdout: "Budibase bash automation failed: Invalid inputs" } }

const processedCommand = processStringSync(inputs.code, context) const sanitized = sanitizeCommand(processedCommand) if (!validateCommand(sanitized)) { return { success: false, stdout: "Command not allowed" } }

// Use spawn instead of execSync with proper argument handling return new Promise((resolve) => { const [command, ...args] = sanitized.split(/\s+/) const proc = spawn(command, args, { timeout: environment.QUERYTHREADTIMEOUT, }) let stdout = "" proc.stdout.on("data", (data) => { stdout += data }) proc.on("close", (code) => { resolve({ stdout, success: code === 0 }) }) }) }

Other sources

Budibase is an open-source low-code platform. Prior to version 3.33.4, the bash automation step executes user-provided commands using execSync without proper sanitization or validation. User input is processed through processStringSync which allows template interpolation, potentially allowing arbitrary command execution. This issue has been patched in version 3.33.4.

MITRE

Affected Software

2 affected componentsFixes available
npm/@budibase/server<3.33.4
3.33.4
budibase Budibase<3.33.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/@budibase/server to a version that resolves this vulnerability.

    Fixed in 3.33.4
  2. Upgrade

    Upgrade Budibase bash automation step to a version that resolves this vulnerability.

    Fixed in 3.33.4
  3. Configuration

    Disable/stop using the bash automation step in production until patched; implement a whitelist of allowed commands (e.g., ALLOWED_COMMANDS such as "echo", "date", "pwd") and reject any command that is not in the whitelist.

    Budibase server (packages/server/src/automations/steps/bash.ts) Bash automation command execution = restricted
  4. Configuration

    Before executing, process user input via processStringSync, then sanitize/validate the resulting command string by removing dangerous characters used for command injection (e.g., replace /[;&|`$(){}[\]]/g with "" and trim) and fail when validation returns false.

    Budibase server (packages/server/src/automations/steps/bash.ts) Command sanitization/validation = sanitize and validate
  5. Configuration

    Replace execSync(command, ...) with child_process spawn(command, args, ...) using properly separated arguments rather than shell command chaining; ensure command and args come from the sanitized/validated input.

    Budibase server (packages/server/src/automations/steps/bash.ts) Process execution method = spawn with argument handling
  6. Compensating control

    Add rate limiting and monitoring for command execution in the automation/bash step to detect and slow command-injection attempts.

Event History

Apr 3, 2026
CVE Published
via MITRE·03:38 PM
Data Sourced
via MITRE·03:38 PM
DescriptionWeakness
Data Sourced
via NVD·04:16 PM
DescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·09:53 PM
Data Sourced
via GitHub·09:53 PM
DescriptionWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203