Miggo Logo

CVE-2017-1000207: Deserialization of Untrusted Data in swagger-codegen

8.8

CVSS Score
3.0

Basic Information

EPSS Score
0.61323%
Published
10/19/2018
Updated
1/9/2023
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
io.swagger:swagger-parsermaven< 1.0.311.0.31
io.swagger:swagger-codegenmaven< 2.2.22.2.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from unsafe YAML deserialization using SnakeYAML's default Constructor in swagger-parser. The LGTM blog analysis explicitly identifies this pattern as the root cause (CVE-2017-1000207), and the fix in swagger-parser PR #481 involved modifying YAML parsing to use a restricted constructor. While swagger-codegen's 'generate'/'validate' commands trigger the vulnerability, the actual vulnerable implementation resides in the YAML parsing logic of swagger-parser. The YamlParser.parse method is the direct entry point for this unsafe deserialization.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

* vuln*r**ility in Sw****r-P*rs*r's v*rsion <= *.*.** *n* Sw****r *o****n v*rsion <= *.*.* y*ml p*rsin* *un*tion*lity r*sults in *r*itr*ry *o** **in* *x**ut** w**n * m*li*iously *r**t** y*ml Op*n-*PI sp**i*i**tion is p*rs**. T*is in p*rti*ul*r, *****

Reasoning

T** vuln*r**ility st*ms *rom uns*** Y*ML **s*ri*liz*tion usin* `Sn*k*Y*ML`'s ****ult *onstru*tor in `sw****r-p*rs*r`. T** L*TM *lo* *n*lysis *xpli*itly i**nti*i*s t*is p*tt*rn *s t** root **us* (*V*-****-*******), *n* t** *ix in `sw****r-p*rs*r` PR #