Miggo Logo

CVE-2022-25857: Uncontrolled Resource Consumption in snakeyaml

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.52789%
Published
8/31/2022
Updated
3/15/2024
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.yaml:snakeyamlmaven< 1.311.31

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

T** p**k*** or*.y*ml:sn*k*y*ml *rom * *n* ***or* *.** *r* vuln*r**l* to **ni*l o* S*rvi** (*oS) *u* missin* to n*st** **pt* limit*tion *or *oll**tions.

Reasoning

T** vuln*r**ility st*mm** *rom missin* **pt* tr**kin* in *oll**tion *omposition lo*i*. T** p*t** ***** `n*stin***pt*` tr**kin* *n* limit ****ks in `*ompos*r.j*v*`. T** pr*-p*t** v*rsions o* `*ompos*No**`/`*ompos*M*ppin*No**`/`*ompos*S*qu*n**No**` l**