Vulnerability Details : CVE-2022-31115
Potential exploit
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.
Products affected by CVE-2022-31115
- cpe:2.3:a:amazon:opensearch:*:*:*:*:*:ruby:*:*
Exploit prediction scoring system (EPSS) score for CVE-2022-31115
0.15%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 37 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2022-31115
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
6.8
|
MEDIUM | AV:N/AC:M/Au:N/C:P/I:P/A:P |
8.6
|
6.4
|
NIST | |
8.8
|
HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
2.8
|
5.9
|
NIST | |
8.8
|
HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
2.8
|
5.9
|
GitHub, Inc. |
CWE ids for CVE-2022-31115
-
The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.Assigned by: security-advisories@github.com (Primary)
References for CVE-2022-31115
-
https://staaldraad.github.io/post/2021-01-09-universal-rce-ruby-yaml-load-updated/
Universal RCE with Ruby YAML.load (versions > 2.7) - StaaldraadExploit;Third Party Advisory
-
https://github.com/opensearch-project/opensearch-ruby/pull/77
Use safe_load instead of load for yaml by VachaShah · Pull Request #77 · opensearch-project/opensearch-ruby · GitHubPatch;Third Party Advisory
-
https://github.com/opensearch-project/opensearch-ruby/security/advisories/GHSA-977c-63xq-cgw3
Unsafe YAML deserialization in Ruby Client · Advisory · opensearch-project/opensearch-ruby · GitHubThird Party Advisory
Jump to