CVE-2022-31115: opensearch-ruby - Insecure Deserialization
- Cve: CVE-2022-31115
- Name: opensearch-ruby - Insecure Deserialization
- 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.
- Impact: Attackers can execute arbitrary code through unsafe YAML deserialization, leading to remote code execution.
- Remediation: Upgrade to version 2.0.1 or later.
- Vulnerability type: insecure_deserialization
- Vulnerability impact: remote_code_execution
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 8.8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Epss score: 0.01642
- Epss percentile: 0.76915
- Assignee: [email protected]
- Published at: 2022-06-30T22:15:08Z
- Age in days: 1608
- Modified at: 2026-06-17T04:44:50Z
- Patch available: yes
- Public exploits total: 1
- References total: 3
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2022-31115
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-502 | Deserialization of Untrusted Data |
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://staaldraad.github.io/post/2021-01-09-universal-rce-ruby-yaml-load-updated/ | nvd | 2022-06-30 |
References
Same in every row:
- Source: nvd
| Url | Tags |
|---|---|
| https://github.com/opensearch-project/opensearch-ruby/pull/77 | Patch, Third Party Advisory |
| https://staaldraad.github.io/post/2021-01-09-universal-rce-ruby-yaml-load-updated/ | Exploit, Third Party Advisory |
| https://github.com/opensearch-project/opensearch-ruby/security/advisories/GHSA-977c-63xq-cgw3 | Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| amazon:opensearch | < 2.0.2 | no | nvd | /v1/products/amazon/opensearch |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| opensearch-project/opensearch-ruby | commit, compare, fix, package, pull, security_advisory | yes | /v1/repositories/opensearch-project/opensearch-ruby |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Public exploit: yes
- Public exploit count: 1
- Public exploit first date: 2022-06-30
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts