agentsclimarketplace

Run2 jackson security

Skill cxcscmu/SkillLearnBench/skills/b2-self-feedback-gemini-3.1-pro-preview/fix-security-bug/run2_jackson-security

[COLM'26] SkillLearnBench is the first benchmark for evaluating continual learning methods that automatically generate agent skills.

Install
npx -y skills add cxcscmu/SkillLearnBench --skill run2_jackson-security

Assembled 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

Security considerations for Jackson JSON deserialization in Java, focusing on @JacksonInject bypass vulnerabilities via empty property names ("").

SKILL.md

2.7 KB, 508 tokens by cl100k_base, as published. Nobody here has run it

Jackson Security: @JacksonInject Bypass Vulnerability

Concept

In Jackson, @JacksonInject is used to inject values into properties or constructor parameters during deserialization without expecting those values to come from the JSON payload itself. However, due to how Jackson's AnnotationIntrospector and fallback behaviors work, if a @JacksonInject annotated parameter does not explicitly have a @JsonProperty annotation, an attacker may be able to supply a JSON property with an empty string key ("") and bypass the injection mechanism.

This causes Jackson to deserialize the attacker's JSON value and bind it to the parameter instead of using the properly injected, trusted value.

Real-world Example (CVE-2021-25646 in Apache Druid)

Apache Druid used @JacksonInject for a JavaScriptConfig object in its JavaScriptDimFilter. By supplying "": {"enabled": true}, an attacker overrode the globally disabled JS config with an enabled one, allowing arbitrary code execution.

@JsonCreator
public JavaScriptDimFilter(
    @JsonProperty("dimension") String dimension,
    @JsonProperty("function") String function,
    // Vulnerable: no @JsonProperty, an empty string key "" will bind to this!
    @JacksonInject JavaScriptConfig config 
)

Mitigation

To mitigate this class of vulnerabilities at the framework level, you can implement a custom AnnotationIntrospector that refuses to parse empty string property names for parameters that don't explicitly specify one using @JsonProperty.

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.introspect.Annotated;
import com.fasterxml.jackson.databind.introspect.AnnotatedParameter;
import com.fasterxml.jackson.databind.introspect.NopAnnotationIntrospector;

public class SecureAnnotationIntrospector extends NopAnnotationIntrospector {
    @Override
    public JsonIgnoreProperties.Value findPropertyIgnorals(Annotated ac) {
        if (ac instanceof AnnotatedParameter) {
            final AnnotatedParameter ap = (AnnotatedParameter) ac;
            if (ap.hasAnnotation(JsonProperty.class)) {
                return JsonIgnoreProperties.Value.empty();
            }
        }
        // Deny empty string property names to prevent @JacksonInject bypasses
        return JsonIgnoreProperties.Value.forIgnoredProperties("");
    }
}

This SecureAnnotationIntrospector should then be registered with your ObjectMapper using an AnnotationIntrospectorPair.

Keep looking

Skills are one crate of 328,083. 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.