oscerd opened a new pull request, #24177: URL: https://github.com/apache/camel/pull/24177
## Summary `camel-jacksonxml`'s default `XmlMapper` now enables `MapperFeature.BLOCK_UNSAFE_POLYMORPHIC_BASE_TYPES`, mirroring the hardening already applied to `camel-jackson` in CAMEL-23786. This is defense-in-depth against gadget-chain deserialization: when polymorphic / default typing is enabled, Jackson refuses unsafe base types (`Object`, `Serializable`, `Comparable`) that are the classic entry point for such attacks. Ordinary marshalling/unmarshalling is unchanged. ## Changes - `JacksonXMLDataFormat.createNewXmlMapper()` builds the default `XmlMapper` via `XmlMapper.builder().enable(BLOCK_UNSAFE_POLYMORPHIC_BASE_TYPES).build()`. - New `JacksonXMLDataFormatPolymorphicHardeningTest` asserting the feature is enabled on the data format's `XmlMapper` by default. - Upgrade-guide notes added for 4.21, 4.18 and 4.14 (entries on `main` per the docs-on-main policy, since this is backported to the 4.18.x and 4.14.x maintenance lines). ## Opt-out Routes that deliberately rely on polymorphic/default typing on an unsafe base type can supply their own `XmlMapper` (via the `xmlMapper` option) configured without this feature. ## Backport Will be backported to `camel-4.18.x` and `camel-4.14.x` (code-only; upgrade-guide entries stay on `main`). --- _AI-generated by Claude Code on behalf of Andrea Cosentino._ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
