Repository navigation
bug: Spring Boot 3.5.15 (spring-security-web 6.5.11) for CVE-2026-47838 [major bump, Java 17] - #488
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)".
|
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
This fixes Snyk
SNYK-JAVA-ORGSPRINGFRAMEWORKSECURITY-17305998/ CVE-2026-47838 (high, CWE-290:SubjectDnX509PrincipalExtractoruser impersonation) inorg.springframework.security:spring-security-web@4.2.3.RELEASE, which comes in throughspring-boot-starter-securityon the Boot 1.5.4 parent (code scan findingsfind-4c9ef168).The fix exists only in Security 6.5.11+. Snyk's upgrade path is
spring-boot-starter-security@3.5.15, so the parent goes1.5.4.RELEASE -> 3.5.15, the smallest Boot version that clears the issue.Changes (the same Boot 3/jakarta migration as #178, re-pinned to 3.5.15):
pom.xml: parent3.5.15,java.version17,mysql:mysql-connector-java->com.mysql:mysql-connector-jjavax.persistence/javax.servlet->jakarta.*(domain entities,RequestFilter)SecurityConfig: theWebSecurityConfigurerAdaptersubclass is replaced by aSecurityFilterChainbean usingauthorizeHttpRequests/requestMatchers, plusnew DaoAuthenticationProvider(userSecurityService)with BCrypt. The public matchers, the form-login pages and the remember-me setup stay the same.AppointmentServiceImpl:findOne(id)->findById(id).orElse(null)(Spring Data 3)application.properties:spring.main.allow-circular-references=true(UserServiceImplandAccountServiceImpldepend on each other) and the hard-codedMySQL5Dialectis removed (Hibernate 6 detects the dialect)@SpringBootTest, and the Maven wrapper goes to 3.9.9UserFront does not configure X.509 /
SubjectDnX509PrincipalExtractor, so the vulnerable code path is not reachable today. This PR clears the dependency finding.Duplicates: open PRs #71 / #62 / #274 (Boot 3.5.16) and #178 (3.5.14) make the same migration, and the 3.5.16 ones also clear this CVE. This PR exists because each new finding gets its own PR. Only one of them should land.
Verification
mvnagainst the real 3.5.15 parent andsnyk testcould not run, and I have no before/after Snyk issue counts. Expected result: this finding goes from 1 to 0. It still needs a Snyk rescan in CI or by a reviewer.UserFrontbuilt against the closest cached parent (Boot 3.3.4 / Security 6.3.3, Java 17):javacof main and test sources: the only error wasnew DaoAuthenticationProvider(UserDetailsService). That constructor was added in Security 6.4, so 3.5.15 has it. In the stand-in only, I swapped it forsetUserDetailsServiceto finish the check.UserFrontApplicationTests.contextLoadsagainstmysql:5.7: 1 test found, 1 successful, 0 failedmysql:5.7and these curl calls behaved as expected:GET /index200,POST /signup302, bad login ->/index?error, good login ->/userFront(200), and anonymous/userFront-> 302 to/index.Devin-Org: engineering
Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/27310626eeb94f8fa08d11446af64d8f
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/27310626eeb94f8fa08d11446af64d8f?variant=devin
Devin Review