CVE-2026-59285: Jackson Polymorphic Type Validator Allow Map Basetype

Allowing 'Map' or 'Collection' as a base type in Jackson's PolymorphicTypeValidator permits deserialization of arbitrary Map/Collection implementations and gadget chains. Use 'allowIfSubType' with specific safe classes (e.g., HashMap, LinkedHashMap) instead.

Provally CuratedPublic repositoryMediumHigh confidenceVerifiedApache-2.0Java
greprules fetch cve-2026-59285-jackson-polymorphic-type-validator-allow-map-basetype --engine opengrep

Description

Allowing 'Map' or 'Collection' as a base type in Jackson's PolymorphicTypeValidator permits deserialization of arbitrary Map/Collection implementations and gadget chains. Use 'allowIfSubType' with specific safe classes (e.g., HashMap, LinkedHashMap) instead.