Apache Druid Security Patching
When patching vulnerabilities related to arbitrary code execution in Druid via JavaScript filters or samplers:
- Identify the vulnerability point: Look for where JavaScript is evaluated (e.g.,
JavaScriptFilter,JavaScriptFunction). - Review sandbox settings: Check how
JavascriptConfigis initialized and enforced. Ensure that enabling JavaScript (enabled: true) is not allowing bypasses via unexpected configurations or null keys. - Impose Restrictions: Modify the logic to strictly require explicit approval for dangerous operations, or block them entirely by default.
- Testing: Create a regression test that mimics the exploit payload to ensure the fix is effective.