8.7high
Budibase: Command Injection in Bash Automation Step
- Severity
- 8.7high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.53% (higher than 46% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-gjw9-34gf-rp6m
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Budibase budibase | < 3.33.4, before 3.33.4 | CVE List, NVD |
| @budibase/server (npm) | before 3.33.4 | GitHub Advisory Database |
All scores
| GitHub_M | 8.7high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| GitHub | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.
What each source says
CVE List
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.
GitHub Advisory Database
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
- 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
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 })
})
})
}
NVD (es)
Budibase es una plataforma de bajo código de código abierto. Antes de la versión 3.33.4, el paso de automatización bash ejecuta comandos proporcionados por el usuario usando execSync sin una sanitización o validación adecuadas. La entrada del usuario se procesa a través de processStringSync, lo que permite la interpolación de plantillas, lo que podría permitir la ejecución arbitraria de comandos. Este problema ha sido parcheado en la versión 3.33.4.
References
| https://github.com/Budibase/budibase/security/advisories/GHSA-gjw9-34gf-rp6m | mitigation, vendor-advisory, web | |
| https://github.com/Budibase/budibase/releases/tag/3.33.2 | product, release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-25044 | advisory | |
| https://github.com/Budibase/budibase | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-25044 changed 2026-04-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-gjw9-34gf-rp6m changed 2026-04-09 | CC-BY-4.0 |
| NVD | CVE-2026-25044 changed 2026-10-06 | Public domain |