USPR-13801: pin org.springframework:spring-expression to 7.0.8 (GHSA-9f52-rjqv-25qv) - #402
Open
midnight-clue[bot] wants to merge 2 commits into
Open
USPR-13801: pin org.springframework:spring-expression to 7.0.8 (GHSA-9f52-rjqv-25qv)#402midnight-clue[bot] wants to merge 2 commits into
midnight-clue[bot] wants to merge 2 commits into
Conversation
…f52-rjqv-25qv) Co-Authored-By: Catarina Correia <catarina.correia@getyourguide.com>
…52-rjqv-25qv) Co-Authored-By: Catarina Correia <catarina.correia@getyourguide.com>
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
GitHub Dependabot alert #127 on getyourguide/openapi-validation-java flags org.springframework:spring-expression versions >= 7.0.0, <= 7.0.7 as vulnerable to GHSA-9f52-rjqv-25qv (Spring Framework Arbitrary Method Invocation in SpEL Expressions). The alert lists settings.gradle as the manifest, but spring-expression is not a direct dependency anywhere in the repo — it's pulled in transitively via the Spring Boot 4.0.6 dependency management (Spring Framework BOM). USPR-13801
Solution
Added a new
resolutionStrategy.eachDependencyoverride fororg.springframework:spring-expressionin the root build.gradle's existing subprojects security-pinning block, forcinguseVersion('7.0.8'), following the exact same pattern used for the existing jackson/logback/tomcat-embed-core/netty overrides in that block.Additionally, because the example modules apply Spring's
io.spring.dependency-managementplugin, which re-asserts dependency versions from the Spring Boot BOM after the root resolutionStrategy rules execute, we also addedext['spring-framework.version'] = '7.0.8'to bothexamples/example-spring-boot-starter-web/build.gradleandexamples/example-spring-boot-starter-webflux/build.gradle. This follows the existing pattern already used for netty and tomcat version overrides in those files, ensuring the Spring dependency-management plugin respects our pinned version.settings.gradle was intentionally left untouched — it has nothing to do with this dependency despite being listed as the alert's manifest path. No changes were needed to any other files.
Verification
./gradlew :spring-boot-starter:spring-boot-starter-web:dependencyInsight --dependency spring-expression --configuration runtimeClasspath: was 7.0.7, now 7.0.8 with upgrade arrow)./gradlew :examples:example-spring-boot-starter-web:dependencyInsight --dependency spring-expression --configuration runtimeClasspath: was 7.0.7, now 7.0.8)./gradlew :examples:example-spring-boot-starter-webflux:dependencyInsight --dependency spring-expression --configuration runtimeClasspath: was 7.0.7, now 7.0.8)./gradlew help -q)🔍 Braintrust trace