Commit c64d3c8
backpatch CVE-2026-54515: keep per-property @JsonIgnoreProperties under case-insensitive matching
Port of upstream bc1613c ("Backport PR FasterXML#5964
into 2.18 to fix FasterXML#5962", FasterXML#6039), shipped in 2.18.9, onto the 2.13.5 baseline.
BeanDeserializerBase.createContextual() first calls _handleByNameInclusion() to
apply the per-property @JsonIgnoreProperties exclusions, producing a contextual
deserializer whose BeanPropertyMap no longer carries the ignored properties. If
the property ALSO carries @jsonformat(with =
Feature.ACCEPT_CASE_INSENSITIVE_PROPERTIES), the block that follows rebuilt the
case-insensitive map from `_beanProperties` -- this deserializer's ORIGINAL,
unfiltered map -- and then installed it on the contextual one. Every property
the exclusion had just removed came back, and case-insensitive lookup then
routed the incoming field to it. A declared @JsonIgnoreProperties("adminKey")
stopped holding, which is a write to a field the application had declared
off-limits to JSON.
The fix reads contextual._beanProperties instead, so the rebuild starts from
the filtered map.
NOT A CHERRY-PICK: the commit also edits release-notes/VERSION-2.x and
CREDITS-2.x, which have no 2.18 section at this baseline and conflict. The
production hunk merged with no conflict and is upstream's bytes -- one changed
line plus upstream's three-line comment.
Binary compatibility: no API change of any kind; one expression inside an
existing method body.
BEHAVIOUR CHANGE: a property excluded by a per-property @JsonIgnoreProperties
stays excluded when case-insensitive matching is enabled on the same property.
A consumer that (knowingly or not) depended on the property being writable
again will now see it ignored -- which is the CVE.
Regression gate: IgnorePropertiesCaseInsensitive5962Test, upstream's own file
for the issue, converted from JUnit 5 on DatabindTestUtil (neither exists at
this baseline) to JUnit 3 on BaseMapTest: @test dropped, methods renamed to the
testXxx form, and assertNotEquals rewritten in JUnit 4's
(message, unexpected, actual) argument order. The DTOs, payloads and asserted
values are upstream's, including its own negative control -- the same document
against a container WITHOUT the case-insensitive format override, which passes
on the unpatched baseline and is what shows the exclusion mechanism itself was
never broken.
Upstream-Commit: bc1613c1 parent 9c201c6 commit c64d3c8
2 files changed
Lines changed: 93 additions & 1 deletion
File tree
- src
- main/java/com/fasterxml/jackson/databind/deser
- test/java/com/fasterxml/jackson/databind/deser/filter
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
811 | | - | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
812 | 815 | | |
813 | 816 | | |
814 | 817 | | |
| |||
Lines changed: 89 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
0 commit comments