Locate Jackson Deserialization Entry Points in Druid
Find the exact code locations where user-supplied JSON is deserialized into DimFilter and other security-sensitive objects in Apache Druid's indexing pipeline, to identify where raw input validation must occur before Jackson processes it.
- License 许可
- MIT
- 最近更新
- 2026-10-02
- Stars
- ★ 93
- Forks
- 8
01 前言 Front Matter
- name
- Locate Jackson Deserialization Entry Points in Druid
- description
- Find the exact code locations where user-supplied JSON is deserialized into DimFilter and other security-sensitive objects in Apache Druid's indexing pipeline, to identify where raw input validation must occur before Jackson processes it.
03 SKILL.md 正文
Locating Jackson Deserialization Entry Points
Search Strategy
-
Find Filter Deserialization
- Search for
readValue.*DimFilteracross the codebase - Search for
objectMapper.readValuein indexing-service module - Search for
transformSpecparsing and filter extraction - Look in
DruidInputSource,InputSourceSampler, andSamplerResource
- Search for
-
Trace the Request Path
- The exploit targets
/druid/indexer/v1/samplerendpoint - Find the corresponding resource handler (likely
SamplerResource.java) - Trace from HTTP request → JSON parsing → object deserialization
- Identify where
spec.dataSchema.transformSpec.filteris deserialized
- The exploit targets
-
Identify the ObjectMapper Configuration
- Find the ObjectMapper instance used for this deserialization
- Check if it has custom deserializers registered
- Locate the default deserialization behavior for filters
Expected Findings
The vulnerable flow should look similar to:
// Somewhere in SamplerResource or InputSourceSampler
String jsonInput = request.getBody(); // Raw JSON from attacker
ObjectMapper mapper = new ObjectMapper();
DataSchema schema = mapper.readValue(jsonInput, DataSchema.class);
// At this point, the empty key "" has already bypassed security
DimFilter filter = schema.getTransformSpec().getFilter();
Key Files to Examine
druid-indexing-service/src/main/java/org/apache/druid/indexing/overlord/sampler/SamplerResource.javadruid-indexing-service/src/main/java/org/apache/druid/indexing/overlord/sampler/InputSourceSampler.javadruid-core/src/main/java/org/apache/druid/segment/transform/TransformSpec.javadruid-core/src/main/java/org/apache/druid/query/filter/DimFilter.java
Validation Approach
Once the entry point is found, the fix must:
- Validate raw JSON string before passing to
ObjectMapper.readValue() - Reject empty keys
""at the input stream level - Prevent bypass of JavaScript security via malformed JSON structures
04 同仓库更多 Skills
object_counter
Count occurrences of an object in the image using computer vision algorithm.
travel-planning-workflow
Invoke this skill when performing travel planning. It defines a structured workflow for generating itineraries. Following this workflow is essential to ensure the final plan satisfies user requirements.
bundled-dataset-search-tool
invoke this skill when you need to perform database search for travel planning. This skill provides some useful pre-packaged tools to look up accommodations, attractions, cities, driving distance, flights, and restaurants from the bundled dataset.
glm-output
Output-processing guidance for GLM tasks. Especially useful after glm-basics and glm-calibration when you need verifier-matching metrics from output.nc and a final /root/metrics.json.
glm-calibration
Calibration guidance for GLM tasks. Often most effective after glm-basics has clarified the setup; glm-output is the companion skill for exact final metric computation.
glm-basics
A good starting point for GLM calibration tasks. Use to inspect glm3.nml, confirm how GLM runs, and identify the relevant files before moving on to calibration and output evaluation.