-
Notifications
You must be signed in to change notification settings - Fork 40.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CVE-2022-1471 - A new vulnerability in SnakeYaml 1.30+ #33457
Comments
Thanks for the information. Spring Boot already uses Users that use SnakeYaml directly to parse data from untrusted sources should implement their own mitigation strategies. |
@philwebb Thanks a lot. Those are the information I am looking for. |
Is Spring Boot 2.7.x still supported? The unsafe |
@bisvo01 Spring Boot 2.7.x is currently supported, see our support timeline page. We'll do another pass in our codebase to ensure that we're using the safe constructor variant - but in general, Spring Boot is only parsing yaml from trusted sources. Using |
@bisvo01 I just double checked |
More info can be found on spring-projects/spring-boot#33457
Thank you for the analysis. Is Spring Boot 2.5.x susceptible to the CVE? |
@AmigaBlitter it's not, unless your application is using SnakeYaml to deserialize untrusted input. I think the biggest security risk right now is being in production with a Spring Boot version that's not supported anymore (unless you've got commercial support). |
Thank you for the reply. |
@philwebb does the statement regarding |
@jpcmonster |
thanks for your reply; I suspected so and have followed up there. |
@sreekanth-tf Yes, it should be fine as long as you don't have any |
thank you @philwebb! |
Thanks : ) |
We are aware that SnakeYaml 2.0 has been released, fixing this CVE. The team is working on an upgrade strategy. Also see spring-projects/spring-framework#30048. |
@wilkinsona, I would be referring to having SpringBoot 2.7.x use snakeyaml 2.0. I can see that spring-boot-starter 2.7.10 pom pulls in snakeyaml 1.30. I scanned the ticket you refer to, it sounds like "one person tried it and it didn't break". I suppose I could try it. It also sounds like there might be some jackson compatibility issues that would burn me anyway unless I also upgrade jackson. |
The issue to which I already linked answer this.
The commit that closed that issue to which I already linked adds a test that verifies that it works for loading
Correct. Compatibility of code that the Spring Boot team does not maintain is out of the Spring Boot team's control. |
in your POM add in |
## Description Upgrades SnakeYaml dependency version forcefully to 2.0 to overcome [this issue](spring-projects/spring-boot#33457), as advised [here](spring-projects/spring-boot#34405 (comment)). This version tag can be reverted when we upgrade to Spring 6.1, which is when the library [aims](spring-projects/spring-framework#30048 (comment)) to upgrade the version themselves. Fixes appsmithorg/appsmith-ee#1233 #### Type of change - Chore (housekeeping or task changes that don't impact user perception) ## Testing This PR will be tested during regression. --------- Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com> Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
This is a false positive as stated here spring-projects/spring-boot#33457 and since we are not doing any manual yaml parsing. However, we can update to v2.2 to completely remove the snakeyaml 1.33 from our jars.
This one is a derived dependency of spring-boot, and we are already in the latest spring boot version. This is a false positive as stated here spring-projects/spring-boot#33457 and since we are not doing any manual yaml parsing. However, we can update to v2.2 to completely remove the snakeyaml 1.33 from our jars.
This one is a derived dependency of spring-boot, and we are already in the latest spring boot version. This is a false positive as stated here spring-projects/spring-boot#33457 and since we are not doing any manual yaml parsing. However, we can update to v2.2 to completely remove the snakeyaml 1.33 from our jars.
This one is a derived dependency of spring-boot, and we are already in the latest spring boot version. This is a false positive as stated here spring-projects/spring-boot#33457 and since we are not doing any manual yaml parsing. However, we can update to v2.2 to completely remove the snakeyaml 1.33 from our jars.
We're using Spring Boot 3.1.5 in many projects. If I look at the when are you planning to change this to 2.0, so that we don't have to temporarily patch this maven property in all our projects (and then remember to remove it again in the future) ? |
@swiss-chris Spring Boot 3.2.0, see #37331 |
@bclozel The PR you linked has a commit which upgrades snakeyaml 2.1 to |
@swiss-chris we've upgraded to the latest SnakeYaml minor version (2.2) in Spring Boot 3.2. You can check the dependencies POM here. The issue I've pointed you to does just that, upgrading the SnakeYaml version in our dependency management. |
@bclozel thanks for the clarification. As Spring Boot 3.2 is already in RC2, I assume it will be in GA soon ... (?). |
Yes, it will be out soon. You can check our release dates on the milestone page and on our public release calendar. |
Awesome! |
…ies (#3677) * chore: add specific module for SBOM generation * chore: workflow adjustmets * chore: update license whitelist * chore: add sso and k8s kits * enclose frontend build in a profile * chore: publish SBOM in release * fix failure when using snapshots in java versions * rename report files, and save with the artifacts * fix hasOssToken by moving it to the cmd object * use a profile for the sbom maven module * make hasOssToken boolean * put OSSINDEX credentials in env
CVE-2022-1471 has been reported against the SnakeYaml project 1.30+. More information can be found in the google/security-research project security post.
At this stage, SnakeYaml has no patch to fix it. A new issue has been created on SnakeYaml's Bitbucket project.
The description says
We recommend using SnakeYaml's SafeConsturctor when parsing untrusted content to restrict deserialization
.Spring Boot uses SnakeYaml so potentially could be impacted. Can somebody (@bclozel) help with checking how Spring Boot uses SnakeYaml since Spring Boot may not be impacted by the vulnerability?
Thank you.
The text was updated successfully, but these errors were encountered: