Skip to content
Heist/ feed
Back to feed
Medium

Use of Uninitialized Variable in trilogy

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2022-31026
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 10:53 UTC · Revision 1

Source evidence

Use of Uninitialized Variable in trilogy

core-osv · Original source

Published 6 Jun 2022, 21:05 UTC

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.

osv:CVE-2022-31026
Complete source record
{
  "id": "94b227180ef6248aa35f49897ee3868d93d92b179a94608fadc24dbb9ff2fa49",
  "url": "https://osv.dev/vulnerability/CVE-2022-31026",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Use of Uninitialized Variable in trilogy",
    "summary": "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.",
    "evidence": "osv:CVE-2022-31026",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2022-31026",
      "aliases": [
        "CVE-2022-31026",
        "GHSA-5g4r-2qhx-vqfm"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/trilogy-libraries/trilogy",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "6bed62789eaf119902b0fe247d2a91d56c31a962"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "fixed": "6bed62789eaf119902b0fe247d2a91d56c31a962"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.1.0",
            "2.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-31026.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:28.232275185Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31026.json",
        "https://github.com/github/trilogy/security/advisories/GHSA-5g4r-2qhx-vqfm",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-31026",
        "https://github.com/github/trilogy/commit/6bed62789eaf119902b0fe247d2a91d56c31a962"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-908"
        ],
        "cna_assigner": "GitHub_M",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "2.1.1"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              }
            ]
          },
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "last_affected": "12"
                  }
                ],
                "source": "DESCRIPTION"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31026.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-31026",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 494695,
  "published_at": "2022-06-06T21:05:14+00:00"
}