CVE-2022-41854: Snakeyaml vulnerable to Stack overflow leading to denial of service

org.yaml:snakeyaml Updated 02 Oct 2025

Summary

11/11/2022
Yes i
Moderate
6.5

CVE-2022-41854: Snakeyaml vulnerable to Stack overflow leading to denial of service. Affects org.yaml:snakeyaml versions < 1.32. Fixed in 1.32. How to fix ↓

Also tracked for

The same CVE-2022-41854 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Snakeyaml is a popular Java library for parsing YAML files. It provides a simple and efficient way to handle YAML data in Java applications. However, versions prior to 1.32 are vulnerable to a stack overflow vulnerability that can be exploited by an attacker to cause a denial of service (DOS) attack. This vulnerability occurs when the parser is used to parse untrusted YAML files, allowing an attacker to supply content that triggers a stack overflow and crashes the parser.

Vulnerability Detail

The stack overflow vulnerability in Snakeyaml can be exploited by an attacker to cause a denial of service attack. By supplying specially crafted YAML content, an attacker can trigger a stack overflow, leading to a crash of the parser. This can result in the application becoming unresponsive or crashing, causing a disruption in service. The vulnerability has a CVSS score of 6.5, indicating a moderate severity.

How To Fix

Latest published version: 2.7 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.32

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is recommended to upgrade to the fixed version of Snakeyaml as soon as possible.

Conclusion

Snakeyaml versions prior to 1.32 are vulnerable to a stack overflow vulnerability that can be exploited by an attacker to cause a denial of service attack. To mitigate this vulnerability, it is crucial to upgrade to Snakeyaml version 1.32 or later. Developers should update their project's dependencies to use the latest version of Snakeyaml. For further assistance and support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.yaml:snakeyaml →

Share this vulnerability

FAQ

Snakeyaml is a Java library for parsing YAML files. It provides a simple and efficient way to handle YAML data in Java applications.

The vulnerability allows an attacker to cause a denial of service (DOS) attack by crashing the parser with specially crafted YAML content. This can result in the application becoming unresponsive or crashing, causing a disruption in service.

To fix this vulnerability, it is recommended to upgrade to Snakeyaml version 1.32 or later. This version includes a fix for the stack overflow vulnerability. Update your project's dependencies to use the latest version of Snakeyaml.

There is no known workaround for this vulnerability. It is recommended to upgrade to the fixed version of Snakeyaml as soon as possible.

The CVSS score of this vulnerability is 6.5, indicating a moderate severity.

Related vulnerabilities

Recent vulnerabilities recorded for org.yaml:snakeyaml.

How To Fix

Latest published version: 2.7 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.32

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback