CVE-2022-25857: Uncontrolled Resource Consumption in snakeyaml
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.52789%
CWE
Published
8/31/2022
Updated
3/15/2024
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| org.yaml:snakeyaml | maven | < 1.31 | 1.31 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from missing depth tracking in collection composition logic. The patch added nestingDepth tracking and limit checks in Composer.java. The pre-patch versions of composeNode/composeMappingNode/composeSequenceNode lacked these protections, allowing attackers to craft YAML with excessive nesting. The commit explicitly added nesting depth validation in composeNode and related methods, confirming these were the vulnerable entry points. Test cases demonstrate exploitation via deep nesting (e.g., FuzzyStackOverflowTest), and the CWE-400 mapping aligns with uncontrolled resource consumption in collection processing functions.