Apache Druid JavaScript RCE Vulnerability
SkillSecurityApache Druid JavaScript RCE vulnerability (CVE-2021-25646) fix via @JacksonInject hardening and constructor validation.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Apache Druid JavaScript RCE Vulnerability skill
What this skill tells your AI
The instructions your AI receives, as published by cxcscmu/skilllearnbench in skills/b1-one-shot-claude-opus-4-6/fix-security-bug/druid-javascript-rce/SKILL.md and read by ahel’s review.
Overview
Apache Druid 0.20.0 allows authenticated users to execute arbitrary server-side code through JavaScript-based features (filters, aggregators, extraction functions, etc.) even when JavaScript is disabled via druid.javascript.enabled=false.
Root Cause
All JavaScript-related classes use @JacksonInject JavaScriptConfig config to receive the server-side JavaScript configuration. Jackson's default behavior allows JSON input to override injected values via an empty key "".
Affected Classes
JavaScriptDimFilter- processing moduleJavaScriptAggregatorFactory- processing moduleJavaScriptExtractionFn- processing moduleJavaScriptPostAggregator- processing moduleJavaScriptParseSpec- core moduleJavaScriptTieredBrokerSelectorStrategy- server module (already has constructor check)
Fix Strategy
For each affected class:
- Change
@JacksonInjectto@JacksonInject(useInput = OptBoolean.FALSE) - Add
Preconditions.checkState(config.isEnabled(), "JavaScript is disabled")in constructors that don't already have it
Exploit Payload Example
{
"type": "index",
"spec": {
"dataSchema": {
"transformSpec": {
"filter": {
"type": "javascript",
"dimension": "dim",
"function": "function(x){java.lang.Runtime.getRuntime().exec('cmd')}",
"": {"enabled": true}
}
}
}
}
}
Modules Requiring Rebuild
druid-core(JavaScriptParseSpec)druid-processing(JavaScriptDimFilter, JavaScriptAggregatorFactory, JavaScriptExtractionFn, JavaScriptPostAggregator)druid-server(JavaScriptTieredBrokerSelectorStrategy)druid-indexing-service(sampler endpoint, depends on above)
Signals
- GitHub stars
- 83
- Forks
- 5
- Last commit
- Jul 2026
Advanced
- Catalog kind
- skill
- Gateway key
druid-javascript-rce- Source
- github.com/cxcscmu/skilllearnbench