swagger-api / swagger-core

Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API
http://swagger.io
Apache License 2.0
7.39k stars 2.18k forks source link

CVE-2022-1471 (High) detected in snakeyaml-1.33.jar #4332

Open mend-for-github-com[bot] opened 1 year ago

mend-for-github-com[bot] commented 1 year ago

CVE-2022-1471 - High Severity Vulnerability

Vulnerable Library - snakeyaml-1.33.jar

YAML 1.1 parser and emitter for Java

Library home page: https://bitbucket.org/snakeyaml/snakeyaml

Path to dependency file: /modules/swagger-project-jakarta/modules/swagger-jaxrs2-jakarta/pom.xml

Path to vulnerable library: /pository/org/yaml/snakeyaml/1.33/snakeyaml-1.33.jar,/pository/org/yaml/snakeyaml/1.33/snakeyaml-1.33.jar,/modules/swagger-project-jakarta/modules/swagger-maven-plugin-jakarta/target/lib/snakeyaml-1.33.jar,/home/wss-scanner/.m2/repository/org/yaml/snakeyaml/1.33/snakeyaml-1.33.jar,/home/wss-scanner/.m2/repository/org/yaml/snakeyaml/1.33/snakeyaml-1.33.jar,/home/wss-scanner/.m2/repository/org/yaml/snakeyaml/1.33/snakeyaml-1.33.jar,/home/wss-scanner/.m2/repository/org/yaml/snakeyaml/1.33/snakeyaml-1.33.jar,/pository/org/yaml/snakeyaml/1.33/snakeyaml-1.33.jar,/pository/org/yaml/snakeyaml/1.33/snakeyaml-1.33.jar

Dependency Hierarchy: - :x: **snakeyaml-1.33.jar** (Vulnerable Library)

Found in base branch: master

Vulnerability Details

SnakeYaml's Constructor() class does not restrict types which can be instantiated during deserialization. Deserializing yaml content provided by an attacker can lead to remote code execution. We recommend using SnakeYaml's SafeConsturctor when parsing untrusted content to restrict deserialization.

Publish Date: 2022-12-01

URL: CVE-2022-1471

CVSS 3 Score Details (9.8)

Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: Low - Privileges Required: None - User Interaction: None - Scope: Unchanged - Impact Metrics: - Confidentiality Impact: High - Integrity Impact: High - Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://nvd.nist.gov/vuln/detail/CVE-2022-1471

Release Date: 2022-12-01

Fix Resolution: org.yaml:snakeyaml - 1.31


drabe8 commented 1 year ago

I see that snakeyaml 2.0 has been released, which should address this vulnerability. https://bitbucket.org/snakeyaml/snakeyaml/wiki/Changes

Hoping we can get a new release of swagger-core soon that incorporates this updated dependency?

cniweb commented 1 year ago

@frantuma can you make a new release of swagger-core, please?