jackson-security
Harden Jackson JSON deserialization against config-injection/override tricks (including empty-string `""` keys) and ensure JavaScript execution controls cannot be enabled from request bodies.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- jackson-security
- description
- Harden Jackson JSON deserialization against config-injection/override tricks (including empty-string `""` keys) and ensure JavaScript execution controls cannot be enabled from request bodies.
03 SKILL.md 正文
Steps
- Identify any request-body–deserialized classes involved in JavaScript-based features (e.g., sampler specs / transform filters) that receive security configuration via
@JacksonInject(notablyJavaScriptConfig). - For every constructor/factory parameter annotated like
@JacksonInject JavaScriptConfig config, change it to ignore any JSON-provided value by using:@JacksonInject(useInput = OptBoolean.FALSE) JavaScriptConfig config- Add
import com.fasterxml.jackson.annotation.OptBoolean;
- Ensure there are no alternative JSON-settable fields/setters that can override the injected
JavaScriptConfigafter construction (search for otherJavaScriptConfigproperties and Jackson annotations). - Add a focused deserialization-level test (unit test) that attempts to deserialize a malicious payload containing an empty-string key intended to override the injected config (e.g.,
"": {"enabled": true}) and assert:- the injected config value is still used (input override did not occur), and/or
- deserialization is rejected if that is the intended behavior.
- Add a companion “legitimate request” test to ensure normal sampler/filter JSON without the injection attempt still deserializes and behaves as expected.
Expected Result
Malicious JSON containing "" (or similar) cannot override injected security configuration to enable JavaScript execution; legitimate sampler/spec requests still work.
04 同仓库更多 Skills
video-frame-extraction
Extract frames from video files and save them as images using OpenCV
openai-vision
Analyze images and multi-frame sequences using OpenAI GPT vision models
image-ocr
Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms
video-frame-extraction
Extract frames from video files and save them as images using OpenCV
openai-vision
Analyze images and multi-frame sequences using OpenAI GPT vision models
image-ocr
Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms