Skip to content

CAMEL-23803: block unsafe polymorphic base types by default in camel-jackson-avro and camel-jackson-protobuf (backport to 4.14.x)#24198

Open
oscerd wants to merge 1 commit into
apache:camel-4.14.xfrom
oscerd:backport/24195-to-camel-4.14.x
Open

CAMEL-23803: block unsafe polymorphic base types by default in camel-jackson-avro and camel-jackson-protobuf (backport to 4.14.x)#24198
oscerd wants to merge 1 commit into
apache:camel-4.14.xfrom
oscerd:backport/24195-to-camel-4.14.x

Conversation

@oscerd

@oscerd oscerd commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Backport of #24195 to camel-4.14.x.

camel-jackson-avro's and camel-jackson-protobuf's createNewObjectMapper() now build their default AvroMapper / ProtobufMapper with MapperFeature.BLOCK_UNSAFE_POLYMORPHIC_BASE_TYPES enabled, mirroring the hardening applied to camel-jackson (CAMEL-23786) and camel-jacksonxml (CAMEL-23787) and to their respective transform/ mappers. Defense-in-depth against gadget-chain deserialization; ordinary marshalling/unmarshalling is unchanged. Opt out via the objectMapper option.

Code + test only — the upgrade-guide entry lives on main (per the docs-on-main policy).


AI-generated by Claude Code on behalf of Andrea Cosentino.

…jackson-avro and camel-jackson-protobuf (backport to 4.14.x)

The camel-jackson-avro and camel-jackson-protobuf data formats now create their
default AvroMapper / ProtobufMapper with MapperFeature.BLOCK_UNSAFE_POLYMORPHIC_BASE_TYPES
enabled, mirroring the hardening applied to camel-jackson (CAMEL-23786) and
camel-jacksonxml (CAMEL-23787) and to their respective transform/ mappers. This is
defense-in-depth against gadget-chain deserialization: when polymorphic / default
typing is enabled, Jackson refuses unsafe base types (Object, Serializable, Comparable).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants