druid-javascript-security
Securing Apache Druid's JavaScript execution engine against code injection and security bypass attacks.
Skill by cxcscmu
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/cxcscmu-druid-javascript-security
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/druid-javascript-security
What's inside
- Skill name
druid-javascript-security- Description
- Securing Apache Druid's JavaScript execution engine against code injection and security bypass attacks.
- License
- MIT
- Instructions
- 98 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Apache Druid JavaScript Security
## Vulnerability Context
Apache Druid versions up to 0.20.0 have a critical vulnerability in JavaScript expression handling where an empty key (`""`) can bypass security settings, allowing arbitrary code execution through the `java.lang.Runtime` API.
## Key Components
### 1. JavaScript Transform Spec
- Located in indexing service modules
- Handles JavaScript expressions for data transformation
- Uses GraalVM or Nashorn engine for JavaScript execution
### 2. Security Filter Structure
The vulnerable structure looks like:
```json
{
"filter": {
"type": "javascript",
"function": "function(){...}",
"": {
"enabled": true
}
}
}
```
The empty key `""` is the bypass vector.
## Patching Strategy
### 1. Input Validation
- Reject filter/transform specs with empty string keys
- Validate all keys in security configuration objects
- Enforce strict schema validation before passing to JavaScript engine
### 2. Security Configuration Enforcement
- Ensure `enabled` flag is only checked for known, valid keys
- Implement whitelist of allowed configuration keys
- Reject any configuration with unexpected keys
### 3. Code Changes Needed
- Typically in classes handling JavaScript filter/transform deserialization
- Common classes: `JavaScriptFilter`, `JavaScriptExpressionValidator`, JavaScript spec handlers
- May need to add validation in both request parsing and execution phases
## Testing the Fix
### Exploit Request (should fail)
```http
POST /druid/indexer/v1/sampler
{
"type": "index",
"spec": {
"dataSchema": {
"transformSpec": {
"filter": {
"type": "javascript",
"function": "function(){java.lang.Runtime.getRuntime().exec('malicious_command');}",
"": {
"enabled": true
}
}
}
}
}
}
```
### Legitimate Request (should work)
```http
POST /druid/indexer/v1/sampler
{
"type": "index",
"spec": {
"dataSchema": {
"transformSpec": {
"filter": {
"type": "javascript",
"function": "function(row){return true;}"
}
}
}
}
}
```
## Common Druid File Locations
- JavaScript filter implementation: `processing/src/main/java/org/apache/druid/query/filter/JavaScriptFilter.java`
- Indexing service: `indexing-service/src/main/java/org/apache/druid/indexing/`
- Transform specs: Related to dataSchema handling
## Jackson Deserialization Considerations
The vulnerability likely involves improper validation during Jackson deserialization. Use raw `@JsonAnySetter` or similar mechanisms to catch unexpected properties and validate them strictly before further processing.From cxcscmu/SkillLearnBench, MIT.
More from cxcscmu/SkillLearnBench
- 0.523score
skill-creator
cxcscmu
Create modular skill documents (SKILL.md files) for Claude Code.
SkillDFreshness: D★ 91Claude Code +9 - 0.515score
package-lock-parsing
cxcscmu
Parse and extract package information from npm package-lock.json files to identify dependencies and their installed versions.
SkillDFreshness: D★ 91Claude Code +9 - 0.515score
mandarin-rhyming-guide
cxcscmu
Master modern Mandarin pinyin finals and tone systems to create accurate rhymes for classical poetry following contemporary pronunciation standards.
SkillDFreshness: D★ 91Claude Code +9 - 0.515score
trivy-vulnerability-scanning
cxcscmu
Use Trivy vulnerability scanner in offline mode to detect CVEs in npm dependencies and generate structured JSON reports.
SkillDFreshness: D★ 91Claude Code +9 - 0.515score
cvss-score-extraction
cxcscmu
Extract and handle CVSS scores from multiple vulnerability data sources (NVD, GHSA, RedHat) with proper fallback priority.
SkillDFreshness: D★ 91Claude Code +9 - 0.515score
github-metrics-processing
cxcscmu
Process GitHub API data to calculate PR/issue metrics including merge time averages, author rankings, and bug categorization.
SkillDFreshness: D★ 91Claude Code +9 - 0.515score
security-audit-csv-reporting
cxcscmu
Generate structured CSV security audit reports from vulnerability data with proper filtering, formatting, and field mapping.
SkillDFreshness: D★ 91Claude Code +9 - 0.515score
classical-poetry-peace-theme
cxcscmu
Compose classical Chinese poetry on peace themes using authentic imagery, perspective shifts, and the voice of ordinary people experiencing war's aftermath.
SkillDFreshness: D★ 91Claude Code +9 - 0.515score
seven-char-regulated-verse
cxcscmu
Master the structure, tonal patterns, and rhyming requirements of classical seven-character regulated verse (七言律诗) in Chinese poetry.
SkillDFreshness: D★ 91Claude Code +9 - 0.512score
jackson-deserialization-validation
cxcscmu
Securing Jackson JSON deserialization by validating input before processing and preventing unknown properties.
SkillDFreshness: D★ 91Claude Code +9 - 0.512score
scala-option-either
cxcscmu
Translating Python's None/Optional to Scala's Option, Either, and Try types
SkillDFreshness: D★ 91Claude Code +9 - 0.512score
git-patch-workflow
cxcscmu
Creating, managing, and applying unified diff patches with Git for source code modifications.
SkillDFreshness: D★ 91Claude Code +9
Signals
- Stars
- 91
- Forks
- 7
- Open issues
- 6
- Last commit (this folder)
- Apr 24, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/cxcscmu/SkillLearnBench
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from cxcscmu
- 0.523score
skill-creator
cxcscmu
Create modular skill documents (SKILL.md files) for Claude Code.
SkillDFreshness: D★ 91Claude Code +9 - 0.515score
seven-char-regulated-verse
cxcscmu
Master the structure, tonal patterns, and rhyming requirements of classical seven-character regulated verse (七言律诗) in Chinese poetry.
SkillDFreshness: D★ 91Claude Code +9 - 0.515score
security-audit-csv-reporting
cxcscmu
Generate structured CSV security audit reports from vulnerability data with proper filtering, formatting, and field mapping.
SkillDFreshness: D★ 91Claude Code +9 - 0.515score
classical-poetry-peace-theme
cxcscmu
Compose classical Chinese poetry on peace themes using authentic imagery, perspective shifts, and the voice of ordinary people experiencing war's aftermath.
SkillDFreshness: D★ 91Claude Code +9 - 0.515score
cvss-score-extraction
cxcscmu
Extract and handle CVSS scores from multiple vulnerability data sources (NVD, GHSA, RedHat) with proper fallback priority.
SkillDFreshness: D★ 91Claude Code +9 - 0.515score
mandarin-rhyming-guide
cxcscmu
Master modern Mandarin pinyin finals and tone systems to create accurate rhymes for classical poetry following contemporary pronunciation standards.
SkillDFreshness: D★ 91Claude Code +9
Cite this page
druid-javascript-security skill. Agent Mart. https://agentmart.dev/skills/cxcscmu-druid-javascript-security (last updated 2026-10-24)