{"answers":{"affected":"2 open source packages ship an affected version, including trilogy. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-31026 in the wild and no public exploit code.","fix":"Upgrade trilogy to 2.1.1 or later.","what":"CVE-2022-31026 is a medium-severity vulnerability in github trilogy, published on 6 Jun 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-31026 and fix it if it is affected.\n\nWhat it is: CVE-2022-31026 is a medium-severity vulnerability in github trilogy, published on 6 Jun 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-31026 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- trilogy (RubyGems): affected all versions; fixed in 2.1.1\n- trilogy (RubyGems): affected all versions; fixed in 2.1.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-31026/ (Markdown: https://insights.sbomify.com/CVE-2022-31026/index.md)","id":"CVE-2022-31026","markdown":"https://insights.sbomify.com/CVE-2022-31026/index.md","name":"CVE-2022-31026","record":{"aliases":["GHSA-5g4r-2qhx-vqfm"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"MySQL client library","requires_auth":"none","summary":"A malicious MySQL server can leak up to 12 bytes of stack memory from the trilogy client library during authentication.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"trilogy","vendor":"trilogy_project"}],"cvss":{"score":5.9,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-908","name":"Use of Uninitialized Resource"}],"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.","ecosystems":["RubyGems"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Use of Uninitialized Variable in trilogy","id":"CVE-2022-31026","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"RubyGems","product":null,"products":[],"type":"information_disclosure","year":"2022"},"n_packages":2,"n_references":2,"next":{"headline":"Authorization Bypass Through User-Controlled Key when using CILogonOAuthenticator in oauthenticator","id":"CVE-2022-31027"},"packages":[{"ecosystem":"RubyGems","fixed":["2.1.1"],"introduced":["0"],"last_affected":[],"package":"trilogy","purl":null,"source":"GHSA-5g4r-2qhx-vqfm"},{"ecosystem":"RubyGems","fixed":["2.1.1"],"introduced":["0"],"last_affected":[],"package":"trilogy","purl":"pkg:gem/trilogy","source":"GHSA-5g4r-2qhx-vqfm"}],"prev":{"headline":"Invite bypasses user approval in Discourse","id":"CVE-2022-31025"},"products":["trilogy"],"published":"2022-06-06","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-23","vendors":["github"]},"summary":"A malicious MySQL server can leak up to 12 bytes of stack memory from the trilogy client library during authentication.","url":"https://insights.sbomify.com/CVE-2022-31026/"}