CVE-2026-59307 in Spring Integration's JdbcMessageStore creates a dangerous semantic gap: calling addAllowedPatterns() appears to secure deserialization but is silently overwritten by Spring's bean property binding under standard DI configuration. The method executes without error, returns normally, and gives every indication that protection is active — yet the patterns are never applied. This is not a missing security feature; it's an anti-feature that actively consumes your security attention while providing zero protection.

The vulnerability manifests specifically when Spring manages the bean lifecycle. If your configuration calls addAllowedPatterns() programmatically and also uses Spring's property binding (including defaults), the property binding wins — your explicit security configuration is silently discarded. The method name and API semantics make this outcome impossible to anticipate without deep knowledge of Spring's bean initialization order. There is no warning, no exception, no log entry. The code looks correct, passes review, and ships with a false sense of protection.

This is nearly impossible to catch in code review. The security intent is clear, the implementation appears sound, and a reviewer has no signal that Spring's property resolution will override the setter. The only detection path is runtime testing with actual deserialization gadget chains, which most teams do not perform. CVSS 8.0 confirms remote code execution is achievable, likely through known Java deserialization gadget chains.

Check your deployments: if JdbcMessageStore is Spring-managed and uses any form of property binding for pattern configuration, your deserialization is unrestricted regardless of what addAllowedPatterns() calls show in your codebase. The fix likely involves post-initialization validation — ensuring that programmatic configuration either locks or is validated against the final bean state rather than being silently overwritten. Until patched, do not rely on addAllowedPatterns() alone for JdbcMessageStore protection in Spring contexts.