Repository navigation
bug: fix spring-expression CVE-2023-20861 (Spring Boot 1.5.4 -> 2.5.15) - #494
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
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: 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-3369749 / CVE-2023-20861 (SpEL DoS, CWE-770), finding
sfind-6bdeef5c:UserFront/pom.xmlpulled inspring-expression@4.3.9.RELEASEthroughspring-boot-starter-web@1.5.4.RELEASE.This follows Snyk's upgrade path: parent
spring-boot-starter-parent1.5.4.RELEASE → 2.5.15, which bringsspring-webmvc/spring-expression5.3.27. The Spring 5.2.x fix (5.2.23) can't be used, because no Boot release ships it and Boot 1.5 can't run on Spring 5.The Boot 2 changes needed to stay working:
AppointmentServiceImpl.findAppointment:appointmentDao.findOne(id)→appointmentDao.findById(id).orElse(null)(Spring Data 2.x API).application.properties:spring.jpa.hibernate.use-new-id-generator-mappings = false. Without it,GenerationType.AUTOwould switch from MySQLAUTO_INCREMENTto ahibernate_sequencetable.UserFrontApplicationTests: JUnit 4@RunWith(SpringRunner.class)→ JUnit 5@Test. Boot 2.4+spring-boot-starter-testno longer includes the vintage engine.Duplicate notice: open PR #173 (finding
sfind-dbd6fe7e) fixes the same CVE with Boot 2.7.10. This PR exists only because a new ticket was filed. Land just one of them.Verification
Maven Central and
api.snyk.ioare blocked in this session, and the 2.5.15 BOM isn't in the local cache. So I could not build on the exact 2.5.15 parent or run the Snyk rescan (snyk test→SNYK-CLI-0000). Instead I verified with the closest cached Boot 2.x/Spring 5.3 line:'X' * 50000000, the CVE-2023-20861 repeat-operator case):spring-expression4.3.12:EVALUATED: length=50000000EVALUATED: length=50000000REJECTED: EL1076E: Repeated text is too long, exceeding the threshold of '256' charactersallow-circular-referencesand a connector version):mvn -o test-compileOK.UserFrontApplicationTests.contextLoadsagainst MySQL 5.7 passes (1 found / 1 successful). Booted the app and checked signup → login (302/userFront) →/userFront200 → deposit $250 (primary_account.account_balance = 250.00, transactionFinished).spring-expression@4.3.9). After: expected 0 (5.3.27≥ fixed5.3.26), but the scan couldn't run here. Please re-run Snyk in CI or locally to confirm.Devin-Org: engineering
Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/1ea1120bfc044cb3a79d94cb40bf5f9e
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/1ea1120bfc044cb3a79d94cb40bf5f9e?variant=devin
Devin Review