Repository navigation
bug: pin snakeyaml 1.33 in UserFront (CVE-2022-25857, SNYK-JAVA-ORGYAML-2806360) - #422
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-f8a0cebe(high, CVSS 7.5):org.yaml:snakeyaml@1.17arrives transitively throughspring-boot-starter-web@1.5.4.RELEASE. It has no limit on collection nesting depth, so deeply nested YAML can crash the parser (CVE-2022-25857 / CWE-400). Vulnerable range:[0,1.31).<properties> <java.version>1.8</java.version> + <snakeyaml.version>1.33</snakeyaml.version> </properties>The Boot 1.5.x parent manages snakeyaml through
${snakeyaml.version}, so overriding that property is enough. This avoids the major bump Snyk suggests (Boot 3.0.0, which needs Java 17). The Spring Boot parent and Java version (1.8) stay the same.Why 1.33 and not 1.31: 1.31 is the smallest version that fixes this CVE. 1.33 is the last 1.x release, and it also fixes the related 1.x DoS CVEs (CVE-2022-38749/38750/38751/38752 and CVE-2022-41854, which need 1.32). It is also the version cached on the build VM, so it could be verified offline. Not fixed by this PR: CVE-2022-1471 needs snakeyaml 2.x, which Boot 1.5's YAML loader doesn't support.
Duplicate notice: this is the same one-line change as the older PR #226 (sfind-760a250f). This PR exists because each new finding gets its own PR. Only one of them should land.
Verification (offline: the network policy blocks Maven Central and api.snyk.io)
dependency:tree -Dincludes=org.yamlon a copy of the pom. The copy uses the cached Boot 1.5.8 parent because 1.5.4 isn't cached:spring-boot-starter-web > spring-boot-starter > org.yaml:snakeyaml:jar:1.17... > org.yaml:snakeyaml:jar:1.33YamlPropertySourceLoaderand parsed a payload of 100,000[characters withnew Yaml().load(...):StackOverflowError(vulnerable)YAMLException: Nesting Depth exceeded max 50application.yml, Tomcat 8.5 served/ping, and the response reportedsnakeyaml-1.33.jar.mvn test(needs the Boot 1.5.4 parent and starters from Maven Central, plus MySQL) andsnyk test. Snyk fails withSNYK-CLI-0000because it can't reach its API. So there is no Snyk before/after issue count. Based on the advisory range, this finding should go from 1 to 0, but no Snyk rescan confirmed it. Network access has been requested. Note: UserFront ships onlyapplication.propertiesand doesn't parse YAML itself.Devin-Org: engineering
Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/8185c1cf437841d5861b828a81ea1e5c
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/8185c1cf437841d5861b828a81ea1e5c?variant=devin
Devin Review