{"api_version":"1","generated_at":"2026-05-05T18:04:58+00:00","cve":"CVE-2022-31115","urls":{"html":"https://cve.report/CVE-2022-31115","api":"https://cve.report/api/cve/CVE-2022-31115.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-31115","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-31115"},"summary":{"title":"CVE-2022-31115","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.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2022-06-30 22:15:00","updated_at":"2022-07-25 09:34:00"},"problem_types":["CWE-502"],"metrics":[],"references":[{"url":"https://staaldraad.github.io/post/2021-01-09-universal-rce-ruby-yaml-load-updated/","name":"https://staaldraad.github.io/post/2021-01-09-universal-rce-ruby-yaml-load-updated/","refsource":"MISC","tags":[],"title":"Universal RCE with Ruby YAML.load (versions > 2.7) - Staaldraad","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/opensearch-project/opensearch-ruby/pull/77","name":"https://github.com/opensearch-project/opensearch-ruby/pull/77","refsource":"MISC","tags":[],"title":"Use safe_load instead of load for yaml by VachaShah · Pull Request #77 · opensearch-project/opensearch-ruby · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/opensearch-project/opensearch-ruby/security/advisories/GHSA-977c-63xq-cgw3","name":"https://github.com/opensearch-project/opensearch-ruby/security/advisories/GHSA-977c-63xq-cgw3","refsource":"CONFIRM","tags":[],"title":"Unsafe YAML deserialization in Ruby Client · Advisory · opensearch-project/opensearch-ruby · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-31115","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31115","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2022","cve_id":"31115","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"amazon","cpe5":"opensearch","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"ruby","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"31115","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"opensearch","cpe5":"opensearch","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"ruby","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"security-advisories@github.com","ID":"CVE-2022-31115","STATE":"PUBLIC","TITLE":"Unsafe YAML deserialization in opensearch-ruby"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"opensearch-ruby","version":{"version_data":[{"version_value":"< 2.0.1"}]}}]},"vendor_name":"opensearch-project"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"impact":{"cvss":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":8.8,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-502: Deserialization of Untrusted Data"}]}]},"references":{"reference_data":[{"name":"https://github.com/opensearch-project/opensearch-ruby/security/advisories/GHSA-977c-63xq-cgw3","refsource":"CONFIRM","url":"https://github.com/opensearch-project/opensearch-ruby/security/advisories/GHSA-977c-63xq-cgw3"},{"name":"https://github.com/opensearch-project/opensearch-ruby/pull/77","refsource":"MISC","url":"https://github.com/opensearch-project/opensearch-ruby/pull/77"},{"name":"https://staaldraad.github.io/post/2021-01-09-universal-rce-ruby-yaml-load-updated/","refsource":"MISC","url":"https://staaldraad.github.io/post/2021-01-09-universal-rce-ruby-yaml-load-updated/"}]},"source":{"advisory":"GHSA-977c-63xq-cgw3","discovery":"UNKNOWN"}},"nvd":{"publishedDate":"2022-06-30 22:15:00","lastModifiedDate":"2022-07-25 09:34:00","problem_types":["CWE-502"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseScore":8.8,"baseSeverity":"HIGH"},"exploitabilityScore":2.8,"impactScore":5.9},"baseMetricV2":{"cvssV2":{"version":"2.0","vectorString":"AV:N/AC:M/Au:N/C:P/I:P/A:P","accessVector":"NETWORK","accessComplexity":"MEDIUM","authentication":"NONE","confidentialityImpact":"PARTIAL","integrityImpact":"PARTIAL","availabilityImpact":"PARTIAL","baseScore":6.8},"severity":"MEDIUM","exploitabilityScore":8.6,"impactScore":6.4,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false,"userInteractionRequired":true}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:amazon:opensearch:*:*:*:*:*:ruby:*:*","versionEndExcluding":"2.0.2","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}