USPR-13802: fix spring-webmvc and spring-webflux open redirect vulnerability (GHSA-h3qp-gqrc-q736) - #400
Open
midnight-clue[bot] wants to merge 2 commits into
Conversation
…0.8 (GHSA-h3qp-gqrc-q736) Co-Authored-By: Catarina Correia <catarina.correia@getyourguide.com>
…A-h3qp-gqrc-q736) Add ext['spring-framework.version'] override in both example Spring Boot apps (example-spring-boot-starter-web and example-spring-boot-starter-webflux), in lockstep with the resolutionStrategy floor added for spring-webmvc and spring-webflux in the root build.gradle. These examples use the Spring Dependency Management plugin's strict BOM import, which is not affected by resolutionStrategy.eachDependency and requires its own ext[] property override to move the floor, following the same pattern already used there for jackson, logback, netty and tomcat. 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
Dependabot Security Alerts #125 and #126: moderate-severity Open Redirect vulnerability (GHSA-h3qp-gqrc-q736) in Spring Framework affects
org.springframework:spring-webmvcandorg.springframework:spring-webfluxversions 7.0.0 through 7.0.7. These are pulled in transitively via Spring Boot BOM without explicit version pins.See USPR-13802.
Solution
Commit 1: Root build.gradle resolutionStrategy floor bump
Added two new dependency resolution rules to
build.gradleresolutionStrategy.eachDependency block:These rules enforce the minimum version across all subprojects that do not use the Spring Dependency Management plugin's strict BOM import.
Commit 2: Example apps spring-framework.version ext override (lockstep fix)
Added
ext['spring-framework.version'] = '7.0.8'to both:examples/example-spring-boot-starter-web/build.gradleexamples/example-spring-boot-starter-webflux/build.gradleThese example apps use the Spring Dependency Management plugin with strict BOM constraints, which take precedence over resolutionStrategy rules. The ext[] override ensures the strict constraint evaluates to 7.0.8, following the same pattern already used in those files for jackson, logback, netty, and tomcat.
Verification
✓ Dependency resolution confirmed for all affected subprojects:
:spring-boot-starter:spring-boot-starter-web: spring-webmvc resolves to 7.0.8:test:openapi-webflux: spring-webflux resolves to 7.0.8:examples:example-spring-boot-starter-web: spring-webmvc resolves to 7.0.8 (strict constraint):examples:example-spring-boot-starter-webflux: spring-webflux resolves to 7.0.8 (strict constraint)✓ Gradle parse:
./gradlew help -qcompleted successfully✓ Code quality:
./gradlew checkstyleMain checkstyleTest pmdMain pmdTestall passed✓ Test suite:
./gradlew testall passed (56 actionable tasks)🔍 Braintrust trace