Vulnerability · Published Jun 30, 2022 · Assigned by GitHub_M

CVE-2022-31115Unsafe YAML deserialization in opensearch-ruby

High 8.8

In plain English

A high-severity unsafe deserialization in opensearch-ruby from opensearch-project. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.6% (higher than 76% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)8.8High
Exploit odds (30 days)1.6%top 23.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

opensearch-ruby is a community-driven, open source fork of elasticsearch-ruby. In versions prior to 2.0.1 the ruby `YAML.load` function was used instead of `YAML.safe_load`. As a result opensearch-ruby 2.0.0 and prior can lead to unsafe deserialization using YAML.load if the response is of type YAML. An attacker must be in control of an opensearch server and convince the victim to connect to it in order to exploit this vulnerability. The problem has been patched in opensearch-ruby gem version 2.0.1. Users are advised to upgrade. There are no known workarounds for this issue.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
RubyGemsopensearch-ruby2.0.2GHSA-977c-63xq-cgw3

Affected products (as reported)

VendorProductVersions
opensearch-project opensearch-ruby < 2.0.1

Weakness: CWE-502 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

References