CVE-2022-31115: Unsafe YAML deserialization in opensearch-ruby
Vulnerability summary
CVE-2022-31115 is a high (CVSS 8.8) Deserialization of Untrusted Data vulnerability in amazon opensearch. EPSS estimates a 1.64% chance of exploitation in the next 30 days, higher than 77.2% of scored vulnerabilities. 1 public exploit is recorded.
Public exploit (reference, Date unknown)
Source freshness unavailable
How is this decided?Timeline
- 30-06-2022PublishedVulnerability first disclosed.
- 22-04-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
4 scores · 3 sources · 2 versions- OSV · RubygemsEcosystem advisory · calculated8.8HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- NVDNIST8.8HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS trend
Probability
1.64%
Chance of exploitation in the next 30 days
Percentile
77%
Versus all other CVEs
30-day change
Increase +0.03 pp
From 1.62% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundExploit Reference (staaldraad.github.io)
Maturity: unknown
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Amazon1 product
- opensearch< 2.0.2
Opensearch-project1 product
- opensearch-ruby< 2.0.1
RubyGems1 product
- opensearch-ruby≥ 2.0.0, < 2.0.2
3 vendors · 3 products
References
9 links- github.com/opensearch-project/opensearch-ruby/security/advisories/GHSA-977c-63xq-cgw3X Refsource CONFIRMWEBThird Party Advisory
- staaldraad.github.io/post/2021-01-09-universal-rce-ruby-yaml-load-updated/X Refsource MISCExploitThird Party Advisory