Commit bed2546
authored
Upgrade Jackson dependency to a safe version (#703)
# Summary
Upgrades Jackson from 2.15.2 to 2.18.6 to fix GHSA-72hv-8253-57qq (High
severity, CVSS 8.7), a denial-of-service
vulnerability in jackson-core's async JSON parser.
# Motivation
The async JSON parser in jackson-core versions prior to 2.18.6 does not
enforce the maxNumberLength constraint
(default: 1000 characters), while the synchronous parser does. This
allows an attacker to submit JSON with
arbitrarily long numeric values, causing memory and CPU exhaustion —
particularly in reactive/non-blocking
applications (e.g. Spring WebFlux). This is classified as CWE-770
(Allocation of Resources Without Limits or
Throttling).
The SDK currently pins Jackson at 2.15.2, which falls in the vulnerable
range (2.0.0–2.18.5). All consumers of the
SDK inherit this version, so the fix must be applied upstream here
rather than overridden at each consumer.
# Changes
- databricks-sdk-java/pom.xml: Bumps jackson.version from 2.15.2 to
2.18.6 (affects jackson-core, jackson-databind,
jackson-annotations, jackson-datatype-jsr310, jackson-datatype-guava).
Adds jackson-datatype-jdk8 as a new
dependency.
- SerDeUtils.java: Registers Jdk8Module on the shared ObjectMapper. This
is required because Jackson 2.18.x no
longer serializes/deserializes java.util.Optional types by default — the
SDK's Request class uses Optional<Boolean>
for redirectionBehavior, which fails without this module.
# Test plan
- All 1093 existing unit tests pass with no changes needed.
- The jackson-datatype-jdk8 module addition was validated by the
ApiClientTest.errorDetails test, which exercises
serialization of Request objects containing Optional fields.
NO_CHANGELOG=true1 parent 0afd4ef commit bed2546
File tree
2 files changed
+9
-1
lines changed- databricks-sdk-java
- src/main/java/com/databricks/sdk/core/utils
2 files changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
113 | 119 | | |
114 | 120 | | |
115 | 121 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
0 commit comments