| Título | Flowable Flowable BPM Engine 7.x;Flowable BPM Engine 5.x import unguarded dynamic class load remote code execution |
|---|
| Descripción | CWE:CWE-94
CVSS 3.1“AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H = 9.9
Type:Remote code execution / Code injection
The JUEL script engine of the Flowable BPM engine registers an unguarded
`lang:import` function that performs arbitrary dynamic class loading and
registers all public static methods of any class into the ScriptContext,
bypassing any ELResolver-based reflection filtering.
In org.flowable.engine.impl.scripting.JuelScriptEngine.createElContext():
SecurityManager sm = System.getSecurityManager();
if (sm == null) {
scriptCtx.setAttribute("lang:import", getImportMethod(),
ScriptContext.ENGINE_SCOPE);
}
The only gate is a null-check on System.getSecurityManager(), which is null
on all modern JVMs (Java 9+; deprecated 17, removed 24), so `lang:import`
is registered by default in every current deployment.
importFunctions() then executes:
Class<?> clazz = ReflectUtil.loadClass((String) obj); // arbitrary class
for (Method m : clazz.getMethods())
if (public static) ctx.setAttribute(ns + ":" + m.getName(), m, ENGINE_SCOPE);
Unlike its upstream Activiti (which added an ELResolverReflectionBlockerDecorator,
itself bypassable via java.lang.Runtime), Flowable contains NO reflection
blocker at all (verified: zero matches for ELResolverReflectionBlocker
across the whole repository). Method objects land directly in the
ScriptContext, so JUEL evaluation applies no filter whatsoever.
Proof of concept — deploy a BPMN process (flowable-rest POST /process-definition
or repositoryService) with a JUEL script task:
<serviceTask id="exploit">
<flowable:script scriptFormat="juel">
lang:import("java.lang.Runtime","rt"); rt:exec("whoami");
</flowable:script>
</serviceTask>
Impact: RCE as the engine's run user; malicious BPMN templates = supply-chain
trigger; affects both org.flowable and the flowable5-engine compatibility
layer (same code at JuelScriptEngine.java L168).
Recommendation: port an ELResolver reflection blocker (extended to
java.lang.Runtime/ProcessBuilder/reflect), or whitelist/remove lang:import;
never rely on the deprecated SecurityManager as a boundary. |
|---|
| Fuente | ⚠️ https://github.com/flowable/flowable-engine/issues/4314 |
|---|
| Usuario | onlyeagle (UID 101618) |
|---|
| Sumisión | 2026-10-25 02:47 (hace 1 mes) |
|---|
| Moderación | 2026-11-24 09:50 (1 month later) |
|---|
| Estado | Aceptado |
|---|
| Entrada de VulDB | 442771 [flowable flowable-engine 8.0.0 JuelScriptEngine JuelScriptEngine.java createElContext/importFunctions escalada de privilegios] |
|---|
| Puntos | 20 |
|---|