Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm

GHSA-gjw9-34gf-rp6m

HIGH

GHSA-gjw9-34gf-rp6m is a high-severity (CVSS 8.8) OS Command Injection vulnerability in @budibase/server. O3 Security confirms whether GHSA-gjw9-34gf-rp6m is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

Budibase: Command Injection in Bash Automation Step

Also known asCVE-2026-25044
Published
Apr 3, 2026
Updated
Apr 9, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed

Blast Radius

1 pkg affected

Weekly download volume for affected packages — a proxy for how broadly this vulnerability is deployed.

@budibase/servernpm
12Kdownloads / week

Description

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

    const command = processStringSync(inputs.code, context)

    let stdout,
      success = true
    try {
      stdout = execSync(command, {
        timeout: environment.QUERY_THREAD_TIMEOUT,
      }).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

import { spawn } from "child_process"

// Validate against whitelist
const ALLOWED_COMMANDS = ["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 ALLOWED_COMMANDS.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.QUERY_THREAD_TIMEOUT,
    })
    
    let stdout = ""
    proc.stdout.on("data", (data) => { stdout += data })
    proc.on("close", (code) => {
      resolve({ stdout, success: code === 0 })
    })
  })
}

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npm@budibase/serverall versions3.33.4

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @budibase/server. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update @budibase/server to 3.33.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-gjw9-34gf-rp6m is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-gjw9-34gf-rp6m is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-gjw9-34gf-rp6m. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

**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.QUERY_THREAD_T
O3 Security · Impact-Aware SCA

Is GHSA-gjw9-34gf-rp6m in your dependencies?

O3 detects GHSA-gjw9-34gf-rp6m across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.