Summary
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).
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 })
})
})
}
Impact
- Remote code execution (RCE)
- Complete system compromise
- Data exfiltration
- Lateral movement within the infrastructure
Untrusted input reaches a shell command, allowing arbitrary commands to run on the host. Typical impact: code execution in the application's environment.
CVE-2026-25044 has a CVSS score of 8.8 (High). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (3.33.4); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
- Immediate: Disable bash automation step in production until fixed
- Implement a whitelist of allowed commands
- Use parameterized command execution with proper escaping
- Implement command argument validation
- Consider using a restricted shell or command sandboxing
- Add rate limiting and monitoring for command execution
Frequently Asked Questions
- What is CVE-2026-25044? CVE-2026-25044 is a high-severity OS command injection vulnerability in @budibase/server (npm), affecting versions < 3.33.4. It is fixed in 3.33.4. Untrusted input reaches a shell command, allowing arbitrary commands to run on the host.
- How severe is CVE-2026-25044? CVE-2026-25044 has a CVSS score of 8.8 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of @budibase/server are affected by CVE-2026-25044? @budibase/server (npm) versions < 3.33.4 is affected.
- Is there a fix for CVE-2026-25044? Yes. CVE-2026-25044 is fixed in 3.33.4. Upgrade to this version or later.
- Is CVE-2026-25044 exploitable, and should I be worried? Whether CVE-2026-25044 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-25044 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-25044? Upgrade
@budibase/serverto 3.33.4 or later.