Repository navigation
UserFront: upgrade embedded Tomcat to 9.0.98 (CVE-2024-56337, sfind-43a5867e) - #387
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
…867e) Spring Boot parent 1.5.4.RELEASE -> 2.7.18 (Java 1.8 kept), tomcat.version 9.0.98, mysql-connector-j coordinates, findById, Boot 1.5-compatible JPA/bean defaults, sun.io.useCanonCaches=false for spring-boot:run.
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-ORGAPACHETOMCATEMBED-8547999/ CVE-2024-56337 (critical, TOCTOU intomcat-embed-core@8.5.15, which comes in throughspring-boot-starter-web1.5.4). Code-scan findingsfind-43a5867e79d245d3840085f41d176840.The only fixed lines are 9.0.98, 10.1.34 and 11.0.2, so there is no 8.5.x fix. A plain
<tomcat.version>override can't do it either: Boot 1.5 crashes on Tomcat 9 at default-servlet registration (NoSuchMethodError Context.addServletMapping). This PR does the smallest upgrade that works and keeps Java 1.8:Flag: this is a major bump (Boot 1.5 -> 2.7). Snyk's suggested path, Boot 3.3.7, needs Java 17, and the remediation rules say not to change the Java version.
Exploitability on master is low. The CVE needs the DefaultServlet with writes enabled (
readonly=false), and UserFront doesn't enable that:PUT /evil.jsp/gets redirected to login. If you run the jar directly on Java 8/11, also pass-Dsun.io.useCanonCaches=false. The pom setting only applies tomvn spring-boot:run.Verification
mvn -o dependency:tree -Dincludes=org.apache.tomcat.embedresolvesspring-boot-starter-tomcat:2.7.18 -> tomcat-embed-core/el/websocket:9.0.98.-Dtomcat.version=9.0.83as a stand-in.mvn -o test-compilepasses on JDK 11.UserFrontApplicationTests(context load against MySQL 5.7) passed: 1 test, 1 successful, 0 failed. It was run through a JUnit Platform launcher because surefire'sjunit-platformprovider isn't cached.mysql:5.7and checked with curl:GET /index200, then signup, login, and a $250 deposit to primary all worked (primary balance 250.00). The user gotuser_id=1and nohibernate_sequencetable was created.snyk testfails withSNYK-CLI-0000because api.snyk.io isn't on this session's network allowlist. Please re-run the Snyk scan in CI or after merge.Duplicates
Only one of these should land:
devin/1790739588-tomcat-cve-2024-56337has the same pom change.This PR is a separate one because the code-scan finding is a new ticket. Compared with that branch, it adds the
use-new-id-generator-mappings=falseanduseCanonCacheschanges.Devin-Org: engineering
Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/582175d996bb4c34acd25034736f8491
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/582175d996bb4c34acd25034736f8491?variant=devin
Devin Review