Summary
Budibase contains a remote code execution vulnerability in plugin handling because uploaded plugin JavaScript is evaluated without sandboxing in the main Node.js process. An authenticated administrator who uploads a malicious plugin tarball may execute arbitrary code and access sensitive environment variables or credentials, particularly in deployments running with elevated privileges.
Affected context
The vulnerability occurs in Budibase deployments that allow authenticated administrators to upload or install plugins and then process plugin JavaScript in the server application. Risk is higher when plugin contents are treated as trusted, evaluated in the main Node.js process, or executed under a highly privileged service account. Deployments with restricted plugin management and stronger runtime isolation may reduce exposure.
Exploit preconditions
- Attack surface: Budibase plugin upload and processing functionality
- Required access: Authenticated administrative access or equivalent permission to manage plugins
- Trigger point: Server-side loading and evaluation of JavaScript contained in a plugin tarball
- Why exploitation is possible: Plugin code is evaluated without an effective sandbox, allowing it to execute within the privileges and process context of the Budibase server
Why this happens
The underlying bug is the use of eval() or equivalent unrestricted JavaScript evaluation for plugin code within the primary Node.js process. This treats plugin content as executable logic rather than untrusted data and does not establish a security boundary between extension code and the application. The behavior maps to CWE-94: Improper Control of Generation of Code ('Code Injection'), because attacker-controlled code can be introduced into and executed by the server.
Potential impact
- An attacker may execute arbitrary code on the Budibase server
- Sensitive environment variables, tokens, or credentials could be disclosed
- Application data could be modified, deleted, or exfiltrated
- A compromised process could affect other services reachable from the host or network
- Elevated service privileges could increase the scope of system compromise
General mitigation guidance
Mitigation generally focuses on removing unrestricted code execution from plugin handling and reducing trust in uploaded extensions.
Common defensive patterns include:
- Avoiding
eval()and similar dynamic execution APIs for plugin content - Using a narrowly scoped extension interface with explicit capabilities
- Isolating plugin execution in a sandboxed, separately privileged process or runtime
- Validating plugin archives, manifests, signatures, and contents before processing
- Restricting plugin installation to tightly controlled administrative workflows
- Running the application with least-privilege identities and minimal filesystem and network permissions
- Keeping secrets out of broadly accessible environment variables where practical
- Applying resource, filesystem, and network policies to plugin execution environments
How teams detect issues like this
Detection approaches may include:
- Static analysis rules identifying
eval(), dynamic function construction, and unrestricted module loading in plugin paths - Code review checks for extension code executed in the main application process
- Monitoring plugin uploads, installation events, archive contents, and administrative activity
- Runtime alerts for unexpected child processes, outbound connections, credential access, or environment inspection by the Budibase service
- Policy enforcement requiring plugin provenance, review, signing, and isolated execution
- Automated security review tools that flag dynamic code execution and missing sandbox boundaries

