LiveActive security incident?Get immediate response
CVE Record

CVE-2022-31115: Unsafe YAML deserialization in opensearch-ruby

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.

HighCVSS 8.8Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

A Ruby OpenSearch client could unsafe-load YAML returned by a server. If a victim application connects to an attacker-controlled OpenSearch server, this may allow severe compromise. The vendor fixed the issue in opensearch-ruby 2.0.1 and lists no workaround.

Executive priority

Prioritize remediation for internet-facing or business-critical Ruby services using opensearch-ruby. The exploit path needs a malicious server connection, but successful exploitation could affect confidentiality, integrity, and availability.

Technical view

opensearch-ruby before 2.0.1 used Ruby YAML.load instead of YAML.safe_load when processing YAML responses. This is CWE-502 unsafe deserialization with CVSS 3.1 score 8.8. Exploitation requires attacker control of an OpenSearch server and user/application interaction to connect to it.

Likely exposure

Exposure is limited to Ruby applications or services that include opensearch-ruby versions before 2.0.1, especially where OpenSearch endpoints can be influenced, misconfigured, or point outside trusted infrastructure.

Exploitation context

The source bundle does not show CISA KEV listing or active exploitation. The advisory states exploitation requires a malicious OpenSearch server and convincing the victim to connect, which reduces reach but not impact.

Researcher notes

Focus validation on dependency version and trust boundaries around configured OpenSearch servers. Avoid assuming exposure in non-Ruby clients or unrelated OpenSearch components; the cited affected product is opensearch-project opensearch-ruby before 2.0.1.

Mitigation direction

  • Upgrade opensearch-ruby to version 2.0.1 or later.
  • Audit dependency locks and deployed artifacts for opensearch-ruby below 2.0.1.
  • Do not rely on untrusted OpenSearch endpoints while upgrade is pending.
  • Check vendor guidance because no workaround is listed in the advisory.

Validation and detection

  • Review Gemfile.lock and dependency manifests for opensearch-ruby versions.
  • Confirm production images and deployed services include opensearch-ruby 2.0.1 or later.
  • Inventory applications that configure OpenSearch endpoints.
  • Confirm endpoint configuration is controlled and points to trusted infrastructure only.
Prepared
Confidence
high
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-502: Code execution behavior lookup

Code execution and unsafe deserialization weaknesses often justify reviewing execution behavior and process telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2022-31115 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
8.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
4Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
8.8CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H2.85.9Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

8.8High
CVSS 3.1 vector shape for CVE-2022-31115Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
opensearch-projectopensearch-ruby< 2.0.1Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-502 · source CWE mapping

Deserialization of Untrusted Data

Deserialization of Untrusted Data represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.