CVE-2022-31026
JSON

5.9medium

Use of Uninitialized Variable in trilogy

Severity
5.9medium CVSS:3.1 by GitHub_M
Exploit likelihood
1.09% (higher than 66% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-5g4r-2qhx-vqfm

Description

Trilogy is a client library for MySQL. When authenticating, a malicious server could return a specially crafted authentication packet, causing the client to read and return up to 12 bytes of data from an uninitialized variable in stack memory. Users of the trilogy gem should upgrade to version 2.1.1 This issue can be avoided by only connecting to trusted servers.

Affected

Product or packageVersionsReported by
github trilogy< 2.1.1CVE List
trilogy (RubyGems)before 2.1.1GitHub Advisory Database
trilogy_project trilogybefore 2.1.1NVD

All scores

GitHub_M5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub5.9medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:P/I:N/A:N

Classification

CWE-908

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Trilogy is a client library for MySQL. When authenticating, a malicious server could return a specially crafted authentication packet, causing the client to read and return up to 12 bytes of data from an uninitialized variable in stack memory. Users of the trilogy gem should upgrade to version 2.1.1 This issue can be avoided by only connecting to trusted servers.

GitHub Advisory Database
Impact

When authenticating, a malicious server could return a specially crafted authentication packet, causing the client to read and return up to 12 bytes of data from an uninitialized variable in stack memory.

Patches

Users of the trilogy gem should upgrade to version 2.1.1

Workarounds

This issue can be avoided by only connecting to trusted servers.

Acknowledgements

We would like to thank Sergei Volokitin for reporting this vulnerability

For more information

If you have any questions or comments about this advisory:

NVD (es)

Trilogy es una biblioteca cliente para MySQL. Cuando es autenticado, un servidor malicioso podría devolver un paquete de autenticación especialmente diseñado, causando que el cliente lea y devuelva hasta 12 bytes de datos de una variable no inicializada en la memoria de la pila. Los usuarios de la gema trilogía deberían actualizar a versión 2.1.1. Este problema puede evitarse conectándose únicamente a servidores confiables

References

Sources

SourceRecordLicence
CVE ListCVE-2022-31026 changed 2025-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-5g4r-2qhx-vqfm changed 2023-11-08CC-BY-4.0
NVDCVE-2022-31026 changed 2026-06-17Public domain