CVE-2017-1000208 Deserialization of Untrusted Data in swagger-parser

High 8.8 Published Updated

Attackers can execute arbitrary code by providing a malicious YAML Open-API specification to the Swagger Parser library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2017-1000208?

CVE-2017-1000208 is a high-severity unsafe deserialization vulnerability in n/a, published on 17 Nov 2017. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

A vulnerability in Swagger-Parser's (version <= 1.0.30) yaml parsing functionality results in arbitrary code being executed when a maliciously crafted yaml Open-API specification is parsed. This in particular, affects the 'generate' and 'validate' command in swagger-codegen (<= 2.2.2) and can lead to arbitrary code being executed when these commands are used on a well-crafted yaml specification.

Weakness: CWE-502

Which versions are affected by CVE-2017-1000208?

4 open source packages ship an affected version, including io.swagger:swagger-codegen and io.swagger:swagger-parser. It affects 2 products.

PackageAffectedFixed in
io.swagger:swagger-codegen MavenAll versions2.2.2
io.swagger:swagger-codegen MavenAll versions2.2.2
io.swagger:swagger-parser MavenAll versions1.0.31
io.swagger:swagger-parser MavenAll versions1.0.31

Products include Swagger Swagger-Codegen, Swagger Swagger-Parser.

How do I fix CVE-2017-1000208?

Upgrade io.swagger:swagger-codegen to 2.2.2 or later.

Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.

Is CVE-2017-1000208 being exploited?

There is no known exploitation of CVE-2017-1000208 in the wild and no public exploit code.

Sources

Also known as GHSA-q7pf-qr96-2vq5.

Is CVE-2017-1000208 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free