Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. opensearch
  4. ›
  5. CVE-2022-31115

CVE-2022-31115: Deserialization of Untrusted Data

June 30, 2022 (updated July 25, 2022)

opensearch-ruby is a community-driven, open source fork of elasticsearch-ruby. In versions prior to 2.0.2 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.2. Users are advised to upgrade. There are no known workarounds for this issue.

References

  • github.com/opensearch-project/opensearch-ruby/pull/77
  • github.com/opensearch-project/opensearch-ruby/security/advisories/GHSA-977c-63xq-cgw3
  • nvd.nist.gov/vuln/detail/CVE-2022-31115
  • staaldraad.github.io/post/2021-01-09-universal-rce-ruby-yaml-load-updated/

Code Behaviors & Features

Detect and mitigate CVE-2022-31115 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.0.2

Fixed versions

  • 2.0.2

Solution

Upgrade to version 2.0.2 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-502: Deserialization of Untrusted Data

Source file

gem/opensearch/CVE-2022-31115.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:25 +0000.