question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CVE-2022-25857 - Upgrade to SnakeYAML 1.31

See original GitHub issue

CVE-2022-25857 has been reported against the SnakeYaml project. This issue upgrades SnakeYaml to 1.31 for Spring Boot 3.0.0.

This CVE can make applications vulnerable to DoS attacks, given the Yaml parser is used to parse untrusted input. Most Spring Boot applications use this library to parse their own application.yml configuration file, which is considered as safe. If an attacker could change application.yml to exploit this vulnerability, they could cause much more damage than a DoS by just changing the properties, or by reading secrets.

The Spring Boot policy for upgrading third party dependencies in our dependency management prevents us from upgrading this version in maintenance branches, 2.6.x and 2.7.x. Doing so would expose developers to possible behavior or API changes that would disrupt their application. We’ve discussed the possibility of making an exception to this policy, but this case happened in the past already with SnakeYaml 1.26 (see #20366); so far we don’t see a reason to do so and we expect libraries maintainers to release patch versions for CVE fixes.

If your 2.6.x or 2.7.x application is using SnakeYaml to decode untrusted Yaml, for example from a web controller, you should override the SnakeYAML version property (snakeyaml.version) as soon as possible in your Gradle or Maven build.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:34 (21 by maintainers)

github_iconTop GitHub Comments

3reactions
asomovcommented, Sep 23, 2022

Dear @robert-gdv, unfortunately, you re-distribute the information which is partially confusing, partially just wrong. I would like to clarify.

  1. Fuzzy Scanning is currently NOT revealing a lot of issues with snakeyaml. There are a few which are easily solved with proper configuration of the parser. There is probably one which may still valid. If you think you are correct, please provide the list and we can go one-by-one
  2. Despite my call to show a use case when the parser has to take untrusted input without possibility for very basic sanitization, NO SINGLE real use case was provided. Please help me to find one
  3. The low quality tooling (like DependencyChecker) has hundreds (!!!) of issues, many of which are about false positives. They do not fix them. Why should we bother about the quality if they do not ???
  4. The low quality tooling does not check the most important part - the context. So they blindly complain about anything. Noise.
  5. There is nothing to fix in SnakeYAML. Otherwise please show what exactly.
  6. You cannot simple “use another tool” as you say. All the parsers have to follow the specification and it requires to support data structues which can be misused by a potential attacker.
  7. Please calify this statement “I expect some updates of snakeyaml in the near future.” - what exactly you expect ?
3reactions
bclozelcommented, Sep 14, 2022

@abegum123 this is already fixed and to be shipped with Spring Boot 2.6.12 and 2.7.4, see #32228

Both releases are scheduled next week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

upgrade to SnakeYaml 1.31 in spring-boot-starter-parent 2.7.3
Have springboot project in which wanted to either exclude snakeyaml 1.30 or upgrade it 1.31 inorder to avoid fortify issue reporting.
Read more >
upgrading snakeyaml to version 1.31 - Google Groups
We would be safe to upgrade snakeyaml to version 1.31. I am asking this question because the module file for snakeyaml in wildfly...
Read more >
Got StackOverflowError for many open unmatched brackets
In most spring boot applications, snakeyaml is only used indirectly ... breaking changes: CVE-2022-25857 - Upgrade to SnakeYAML 1.31 · Issue ...
Read more >
Security update for snakeyaml SUSE-SU-2022:3397-1
CVE-2022-25857 : Fixed denial of service vulnerability due missing to nested depth limitation for collections (bsc#1202932). Patch Instructions:.
Read more >
CVE-2022-25857 Detail - NVD
The package org.yaml:snakeyaml from 0 and before 1.31 are vulnerable to Denial of Service (DoS) due missing to nested depth limitation for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found