Skip to content
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 - Use of SnakeYaml Constructor #29649

Closed
bisvo01 opened this issue Dec 6, 2022 · 2 comments
Closed

CVE-2022-1471 - Use of SnakeYaml Constructor #29649

bisvo01 opened this issue Dec 6, 2022 · 2 comments
Assignees
Labels
status: invalid An issue that we don't feel is valid

Comments

@bisvo01
Copy link

bisvo01 commented Dec 6, 2022

Affects: \5.3.x, 6.0.x

CVE-2022-1471 has been reported against the SnakeYaml project 1.30+. Additional information can be found in the google/security-research project security post.

Related SnakeYaml issue states that the issue will not be fixed in SnakeYaml and:

We recommend using SnakeYaml's SafeConstructor when parsing untrusted content to restrict deserialization.

Spring Framework uses SnakeYaml so it potentially could be impacted, at least in:

Could someone please check if that's the case, or confirm that it can't be exploited?

Thank you.

@bisvo01 bisvo01 changed the title CVE-2022-1471 - Use of SnakeYaml CVE-2022-1471 - Use of SnakeYaml Constructor Dec 6, 2022
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Dec 6, 2022
@bclozel bclozel self-assigned this Dec 6, 2022
@bclozel
Copy link
Member

bclozel commented Dec 6, 2022

Spring Framework's YamlProcessor already restricts the types allowed to be loaded via its org.springframework.beans.factory.config.YamlProcessor#setSupportedTypes method. By default, only Java standard classes (as defined in SafeConstructor are allowed). With this limitation in place, I don't think the security issue you're pointing to can be leveraged.

Note that raising publicly potential CVEs with an open source project is dangerous and disrespectful. If you believe you've found a possible security vulnerability, please reach out via the appropriate channels.

The first lines of our issue template state:

< !--
!!! For Security Vulnerabilities, please go to https://spring.io/security-policy !!!
-- >

Also, see spring-projects/spring-boot#33457

@bclozel bclozel closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2022
@bclozel bclozel added status: invalid An issue that we don't feel is valid and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Dec 6, 2022
@bisvo01
Copy link
Author

bisvo01 commented Dec 6, 2022

Thanks for confirming that the YamlProcessor restricts the impact of the vulnerability.

All the information provided in this issue was already public (in a very conspicuous way). My intent here was not to report a new vulnerability, but to get help with assessing the impact of an existing publicly known one. To an outsider not knowledgeable about the project's codebase, that's a nontrivial help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

3 participants