{"id":"CVE-2022-31115","published":"2022-06-30T21:55:11Z","modified":"2025-04-22T17:52:35Z","title":"Unsafe YAML deserialization in opensearch-ruby","vendor":"opensearch-project","product":"opensearch-ruby","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01614,"percentile":0.7634,"provenance":"source"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"references":[{"url":"https://github.com/opensearch-project/opensearch-ruby/security/advisories/GHSA-977c-63xq-cgw3","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/opensearch-project/opensearch-ruby/pull/77","tags":["x_refsource_MISC"]},{"url":"https://staaldraad.github.io/post/2021-01-09-universal-rce-ruby-yaml-load-updated/","tags":["x_refsource_MISC"]}],"priority":{"score":21.4,"factors":[{"name":"EPSS percentile","points":15.27},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"opensearch-project","affectedVersions":[{"vendor":"opensearch-project","product":"opensearch-ruby","versions":["< 2.0.1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2025-04-22T15:42:50.945376Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"opensearch-ruby","vulnerableRanges":[">=2.0.0, <2.0.2"],"patched":["2.0.2"],"from":["GHSA-977c-63xq-cgw3"],"provenance":"source"}],"summary":{"text":"The opensearch-ruby gem (product opensearch-ruby, from the opensearch-project) contains an unsafe YAML deserialization flaw in its response handling, where YAML responses are parsed with Ruby's YAML.load instead of YAML.safe_load. An attacker who controls an OpenSearch server can exploit this by convincing the victim to connect to that server, which requires user interaction and no prior authentication or network position.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:56:47Z"},"euvd":{"id":"EUVD-2022-6303","exploited":false,"provenance":"source"}}