Repository navigation
bug: bump mysql-connector-java 5.1.42 -> 8.0.27 (CVE-2021-2471 XXE, sfind-94ba7933) - #543
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)".
|
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 code-scan finding
sfind-94ba7933(SnykSNYK-JAVA-MYSQL-1766958, CVE-2021-2471, CWE-611). This is an XXE inMysqlSQLXML.getSource()inmysql:mysql-connector-java@5.1.42. UserFront gets the connector version from the Boot 1.5.4 parent'smysql.versionproperty, so the fix is one property override inUserFront/pom.xml:mysql:mysql-connector-javacoordinates (the move tocom.mysql:mysql-connector-jhappened in 8.0.31), so the dependency block doesn't change. The Spring Boot and Java versions also stay the same, because Connector/J 8.0 supports Java 8.DatabaseDriver.MYSQLstill auto-selectscom.mysql.jdbc.Driver. Connector/J 8.0 keeps that class as a deprecated alias ofcom.mysql.cj.jdbc.Driver, so it works but logs a deprecation warning at startup.application.properties(URL,MySQL5Dialect,validationQuery) needs no change, andserverTimezonehas not been required since 8.0.23.Duplicate: this is the same diff as open PR #209 (
sfind-0f178d13, same CVE). It was opened because of the one-PR-per-finding rule. Only one of #209 / this PR should land.Verification
mvn teston the real pom, and the Snyk re-scan. Before/after Snyk issue counts are not available. This session can only reachgit-manager.devin.ai. The Boot 1.5.4 parent POM and the 8.0.27 jar are not in~/.m2, somvn -ofails withUnresolvableModelException.snyk testfails withSNYK-CLI-0000because api.snyk.io is blocked. Network access for Maven Central and api.snyk.io has been requested. Expected Snyk result:SNYK-JAVA-MYSQL-1766958is no longer reported. Please runcd UserFront && mvn test && snyk testbefore merging (contextLoadsneeds MySQL with anonlinebankingDB).com.userFront.domainentities with Hibernate 5.0.12 (the Boot 1.5.4 version) and ran them on Connector/J 8.0.33 (the closest cached 8.0.x jar, not 8.0.27). It used the same driver class, URL shape, dialect, andhbm2ddl=updateas the app, against Dockermysql:5.7(5.7.44). Steps:User+PrimaryAccount, and an HQL read-back all worked.ResultSet.getSQLXML().getSource(DOMSource.class). The parser rejected the DOCTYPE, so the entity was not expanded. This is the hardened behaviour introduced in 8.0.27.Devin-Org: engineering
Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/3a4c349483c245dfb3fca29ee8d11f77
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/3a4c349483c245dfb3fca29ee8d11f77?variant=devin
Devin Review