Repository navigation
feature: Spring Boot 3.2.11 (spring-webmvc 6.1.14) to fix CVE-2024-38819 [major bump, requires Java 17] - #480
Open
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Author
There was a problem hiding this comment.
Devin Review found 1 potential issue.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
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.
Summary
Fixes Snyk
SNYK-JAVA-ORGSPRINGFRAMEWORK-8230373/ CVE-2024-38819 (spring-webmvc path traversal, CWE-23) reported onUserFront/pom.xml:30(findingsfind-d5ea2c99). The fix moves thespring-boot-starter-parentfrom1.5.4.RELEASEto3.2.11, the smallest upgrade path Snyk lists (Boot 3.2.11 brings in spring-webmvc 6.1.14).Warning
Two things go against the remediation guidance. Please review before merging.
javax.*→jakarta.*, Security 4.2 → 6.2, Hibernate 5.0 → 6.4).java.version1.8 → 17. Spring Framework 6 / Boot 3 need Java 17, and OSS Spring on the Java 8 line ends at 5.3.x, where this CVE isn't fixed. So "do not change the Java version" can't be satisfied together with this fix.WebMvc.fn(org.springframework.web.servlet.function) didn't exist before Spring 5.2. If keeping Java 8 matters more, close this PR and accept/track the finding instead.Code changes the migration requires (based on the existing Boot 3 migration branch
devin/1790739508-spring-webmvc-cve-2026-22735, re-pinned to 3.2.11):pom.xml: parent3.2.11,java.version17,mysql:mysql-connector-java→com.mysql:mysql-connector-j.javax.persistence/javax.servlet→jakarta.*indomain/**andRequestFilter.SecurityConfig:WebSecurityConfigurerAdapterremoved (it no longer exists) → aSecurityFilterChainbean plus aDaoAuthenticationProviderbean. Matchers, form login, logout and remember-me stay the same, and CSRF/CORS stay disabled as before."/error/**/*"→"/error/**", because PathPattern rejects**in the middle of a pattern.AppointmentServiceImpl:findOne(id)→findById(id).orElse(null)(Spring Data 2+).application.properties:spring.main.allow-circular-references=true(UserServiceImpl↔AccountServiceImpl), and the hard-codedMySQL5Dialectis dropped because Hibernate 6 auto-detects the dialect.Verification
Not fully verified. Maven Central and the Snyk API can't be reached from the build environment (network allowlist), so neither the exact 3.2.11 build nor a Snyk re-scan could run:
snyk test --file=UserFront/pom.xmlfails withSNYK-CLI-0000(no network). Expected result: this finding clears, because Boot 3.2.11 managesspring-webmvc6.1.14 ([,6.1.14)is vulnerable).mysql:5.7:mvn -o compilepassed.UserFrontApplicationTests.contextLoadsran through the JUnit Platform launcher (surefire's junit-platform provider isn't cached): 1 test, 1 successful, 0 failed.Started UserFrontApplication.POST /signup→ 302,POST /index→ 302/userFront,GET /userFront→ 200,POST /account/deposit(Primary, 250) → 302 and the DB shows balance250.00plus theDeposit to Primary Accountrow. A wrong password →/index?error. Anonymous/account/primaryAccount→ 302/index. Encoded traversal requests (/css/..%2f..%2f..%2fetc/passwd,/webjars/%2e%2e/...) → 400.SecurityConfigusesnew DaoAuthenticationProvider()+setUserDetailsService(...)because theDaoAuthenticationProvider(UserDetailsService)constructor only exists from Security 6.3 on, and 3.2.11 ships Security 6.2.cd UserFront && ./mvnw verifyandsnyk testwith network access to confirm the exact 3.2.11 dependency set and the issue count.Devin-Org: engineering
Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/5a088181a4fa43be81175e8f8ff32a4e
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/5a088181a4fa43be81175e8f8ff32a4e?variant=devin
Devin Review