Druid vulnerability fix
[COLM'26] SkillLearnBench is the first benchmark for evaluating continual learning methods that automatically generate agent skills.
npx -y skills add cxcscmu/SkillLearnBench --skill druid-vulnerability-fixAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
How to fix the Apache Druid JavaScript sampler vulnerability. Use this skill when patching Druid code to block arbitrary JavaScript execution.
SKILL.md
1.2 KB, 203 tokens by cl100k_base, as published. Nobody here has run it
Druid JavaScript Sampler Vulnerability Fix
Overview
The vulnerability allows authenticated users to execute arbitrary code via the /druid/indexer/v1/sampler endpoint by passing a malicious JavaScript payload with an empty key "" in the JSON spec.
Fixing Strategy
- Identify the affected component: The
JavaScriptConfigor related validation logic in Druid's processing module is responsible for the JavaScript filter. - Restrict access: Ensure that the
JavaScriptfilter is properly guarded and cannot be bypassed by empty keys or other malformed JSON structures. - Validate payload: Add strict validation to the sampler configuration that prevents arbitrary code injection via the
functionproperty.
Patching Workflow
- Locate the responsible class (likely
JavaScriptFilterorJavaScriptConfig). - Implement robust input sanitization and validation.
- Generate a diff/patch file in
/root/patches/. - Apply the patch to
/root/druid/.