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.
Weakness
- CWE-502: Deserialization of Untrusted Data
CISA SSVC decision points
| Exploitation | poc |
|---|---|
| Automatable | no |
| Technical impact | total |
| Scored | 2025-04-22 |
Timeline
- 2022-06-30Published by the CNA21:55 UTC
- 2022-07-05GitHub advisory published (GHSA-977c-63xq-cgw3)5 days after publication
- 2025-04-22CISA SSVC decision recorded1027 days after publication
Exploit and advisory records
GitHub advisory GHSA-977c-63xq-cgw3, affected packages:
| Package | Vulnerable versions | Fixed in |
|---|---|---|
| RubyGems opensearch-ruby | from 2.0.0 before 2.0.2 | 2.0.2 |
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| amazon opensearch | before 2.0.2fixed in 2.0.2 | 2.0.2 |
References
- https://github.com/opensearch-project/opensearch-ruby/pull/77
- https://staaldraad.github.io/post/2021-01-09-universal-rce-ruby-yaml-load-updated/
- https://github.com/opensearch-project/opensearch-ruby/security/advisories/GHSA-977c-63xq-cgw3
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2022-31115'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2022-31115'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2022-31115'curl 'https://api.contrastcyber.com/cve_products/CVE-2022-31115'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).