agentsclimarketplace

Run2 jackson empty key vulnerability

Skill cxcscmu/SkillLearnBench/skills/b2-self-feedback-gemini-3-flash-preview/fix-security-bug/run2_jackson-empty-key-vulnerability

Detailed explanation of the Jackson empty key ("") vulnerability and how it bypasses @JacksonInject security.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill run2_jackson-empty-key-vulnerability

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

1.6 KB, 316 tokens by cl100k_base, as published. Nobody here has run it

Jackson Empty Key ("") Vulnerability

The vulnerability (e.g., CVE-2021-25646 in Apache Druid) occurs when Jackson's @JacksonInject is used to provide sensitive configuration objects, but the deserialization process allows these objects to be overridden by malicious JSON input.

How it works

  1. Unnamed Injected Parameters: If a constructor parameter is marked with @JacksonInject but lacks a @JsonProperty name, Jackson may default to matching it against certain JSON keys, including the empty string key "".
  2. Override Behavior: By default, Jackson might allow the JSON input to populate the fields of an injected object if a match is found.
  3. Security Bypass: In Druid, JavaScriptConfig is injected to determine if JavaScript is enabled. An attacker can provide "": {"enabled": true} in the JSON, which Jackson uses to override the server-side JavaScriptConfig object, thus enabling JavaScript execution for that specific request even if it's globally disabled.

The Fix: useInput = OptBoolean.FALSE

The robust fix is to explicitly tell Jackson NOT to use any JSON input for the injected parameter.

@JsonCreator
public MyObject(
    @JsonProperty("someField") String someField,
    @JacksonInject(useInput = OptBoolean.FALSE) MyConfig config
)

Setting useInput = OptBoolean.FALSE ensures that the config object is ONLY sourced from the InjectableValues (server configuration) and never from the JSON payload.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.