{"id":"CVE-2022-31026","aliases":["EUVD-2022-5938","GHSA-5g4r-2qhx-vqfm"],"status":"published","title":"Use of Uninitialized Variable in trilogy","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.","severity":{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.01094,"percentile":0.6575,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-908"],"published":"2022-06-06T21:05:14Z","modified":"2026-10-28T02:30:28Z","fixes":[{"ecosystem":"RubyGems","package":"trilogy","fixed_in":["2.1.1"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"RubyGems","package":"trilogy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.1"}]}]},{"source":"osv","ecosystem":"RubyGems","package":"trilogy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.1"}]}],"versions":["2.0.0","2.1.0"]}],"products":[{"vendor":"github","product":"trilogy"},{"vendor":"trilogy_project","product":"trilogy"}],"references":[{"url":"https://github.com/github/trilogy/security/advisories/GHSA-5g4r-2qhx-vqfm","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/github/trilogy/commit/6bed62789eaf119902b0fe247d2a91d56c31a962","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31026","tags":["advisory"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/trilogy/CVE-2022-31026.yml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-5g4r-2qhx-vqfm"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31026.json","tags":["advisory"]},{"url":"https://github.com/github/trilogy","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2022-31026","title":"Use of Uninitialized Variable in trilogy","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.","status":"published","published":"2022-06-06T21:05:14Z","modified":"2025-04-23T18:18:51.825Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"cna"}],"cwes":["CWE-908"],"updated_at":"2026-11-02T14:34:35.279735Z"}],"euvd":[{"id":"EUVD-2022-5938","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.","status":"published","published":"2022-06-06T21:05:14Z","modified":"2025-04-23T18:18:51Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"updated_at":"2026-11-02T20:52:08.95736Z"}],"ghsa":[{"id":"GHSA-5g4r-2qhx-vqfm","title":"Use of Uninitialized Variable in trilogy","description":"### Impact\n\nWhen 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.\n\n### Patches\n\nUsers of the trilogy gem should upgrade to version 2.1.1\n\n### Workarounds\n\nThis issue can be avoided by only connecting to trusted servers.\n\n### Acknowledgements \n\nWe would like to thank Sergei Volokitin for reporting this vulnerability\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [trilogy](https://github.com/github/trilogy)\n","status":"published","published":"2022-06-06T21:22:05Z","modified":"2023-05-04T19:58:41Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-908"],"updated_at":"2026-11-02T14:36:52.310293Z"}],"nvd":[{"id":"CVE-2022-31026","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.","status":"published","published":"2022-06-09T13:15:08.457Z","modified":"2026-06-17T04:44:38.027Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"high","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-908"],"updated_at":"2026-11-02T14:07:21.62951Z"}],"osv":[{"id":"CVE-2022-31026","title":"Use of Uninitialized Variable in trilogy","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.","status":"published","published":"2022-06-06T21:05:14Z","modified":"2026-10-28T02:30:28.232275185Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-908"],"updated_at":"2026-11-02T15:44:25.516981Z"},{"id":"GHSA-5g4r-2qhx-vqfm","title":"Use of Uninitialized Variable in trilogy","description":"### Impact\n\nWhen 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.\n\n### Patches\n\nUsers of the trilogy gem should upgrade to version 2.1.1\n\n### Workarounds\n\nThis issue can be avoided by only connecting to trusted servers.\n\n### Acknowledgements \n\nWe would like to thank Sergei Volokitin for reporting this vulnerability\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [trilogy](https://github.com/github/trilogy)\n","status":"published","published":"2022-06-06T21:22:05Z","modified":"2023-11-08T04:09:23.087201Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"medium"}],"cwes":["CWE-908"],"updated_at":"2026-11-02T15:46:38.213481Z"}]}}
