CVE-2022-31115: opensearch-ruby 2.x before 2.0.2 vulnerable to unsafe YAML deserialization
8.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.39573%
CWE
Published
7/5/2022
Updated
3/31/2023
KEV Status
No
Technology
Ruby
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| opensearch-ruby | rubygems | >= 2.0.0, < 2.0.2 | 2.0.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the use of YAML.load instead of YAML.safe_load in two locations. The GitHub commit diff explicitly shows these functions being patched. YAML.load is inherently unsafe for untrusted input due to its ability to deserialize arbitrary Ruby objects, which aligns with CWE-502 (Deserialization of Untrusted Data). The linked advisory and supporting references confirm this pattern as the root cause.