USPR-13800: enforce patched spring-expression version (GHSA-r5w3-xv2f-j59q) - #393
Open
midnight-clue[bot] wants to merge 3 commits into
Open
USPR-13800: enforce patched spring-expression version (GHSA-r5w3-xv2f-j59q)#393midnight-clue[bot] wants to merge 3 commits into
midnight-clue[bot] wants to merge 3 commits into
Conversation
…v2f-j59q Add a resolutionStrategy override to root build.gradle forcing org.springframework:spring-expression to 7.0.8 or higher, following the existing pattern used for jackson/logback/tomcat/netty security floors. Fixes Dependabot alert 128 (Spring Expression Language Algorithmic DoS).
…rification task Add ext['spring-framework.version'] = '7.0.8' to both example subprojects' build.gradle to close the BOM-precedence gap where spring-dependency-management's managed version otherwise overrides the root resolutionStrategy floor. Also add a verifySpringExpressionVersion Gradle task, wired into `check` for every subproject, that fails the build if org.springframework:spring-expression resolves below 7.0.8 anywhere in the dependency graph.
…e version constant Wire verifySpringExpressionVersion into the `test` task (in addition to `check`) so it actually executes as part of this repo's CI, which invokes `test` directly rather than the `check` lifecycle task. Also extract the 7.0.8 floor into a single local variable within build.gradle to avoid duplicating the version literal across the resolutionStrategy block and the verification task.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context & Problem
Dependabot alert 128 flagged
org.springframework:spring-expressionas vulnerable to GHSA-r5w3-xv2f-j59q (CVE-2026-41850): applications that evaluate user-supplied Spring Expression Language (SpEL) expressions are vulnerable to an Algorithmic Denial of Service, where a specially crafted expression can trigger excessive resource consumption during evaluation. This affects Spring Framework 7.0.0 through 7.0.7 (among other lines), fixed in 7.0.8. See USPR-13800.Solution
Added a new
resolutionStrategy.eachDependencyblock to the rootbuild.gradle, following the exact same pattern already used for jackson/logback/tomcat/netty security floors in this repo: if a resolvedorg.springframework:spring-expressionversion is below7.0.8, force it to7.0.8viauseVersion(...), with abecause(...)comment citing GHSA-r5w3-xv2f-j59q.The example subprojects (
examples/example-spring-boot-starter-web,examples/example-spring-boot-starter-webflux) apply thespring-dependency-managementGradle plugin, whose BOM-managedspring-framework.versionproperty otherwise wins over the rootresolutionStrategy.eachDependencyoverride in those modules (the same precedence issue already known for netty/jackson/logback/tomcat in this repo). Verified via./gradlew :examples:...:dependenciesthatspring-expressionstayed pinned at7.0.7in the examples with only the resolutionStrategy block in place. Fixed by addingext['spring-framework.version'] = '7.0.8'to both examplebuild.gradlefiles, alongside the existingext[]BOM overrides for jackson/logback/netty/tomcat.Also added a
verifySpringExpressionVersionGradle task, registered per-subproject and wired intocheck, that resolves each subproject's configurations and fails the build if anyorg.springframework:spring-expressionartifact is below the enforced7.0.8floor — giving this change automated, repo-wide coverage rather than relying on manual dependency-tree inspection.Verification
org.springframework:spring-expressionresolutionStrategy override added forcing >= 7.0.8 (build.gradle)ext['spring-framework.version'] = '7.0.8'added to both example subprojects to close the BOM-precedence gap./gradlew :examples:example-spring-boot-starter-web:dependencies --configuration runtimeClasspathand the webflux equivalent confirmspring-expressionnow resolves to7.0.8(was7.0.7)./gradlew :spring-boot-starter:spring-boot-starter-web:dependencies --configuration compileClasspathconfirmsspring-expressionresolves to7.0.8in the library modulesverifySpringExpressionVersiontask added, wired intocheckfor every subproject, and passes cleanly🔍 Braintrust trace