{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "0"
                  },
                  {
                    "fixed": "18.00.0006"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "96fa03dbc968c40920c907bf18d3b4cbd8efeebc"
            }
          ],
          "repo": "https://github.com/postgresql-interfaces/psqlodbc",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-6rmx-9q62-4w6m"
  ],
  "database_specific": {
    "cna_assigner": "PostgreSQL",
    "cwe_ids": [
      "CWE-191",
      "CWE-787"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/120xxx/CVE-2026-120058.json"
  },
  "details": "psqlODBC sizes its row cache from the column count of a cursor's first result, but recomputes the column count from each later FETCH reply without checking that it matches. A server not trusted under current SSL settings can answer a later FETCH with more columns and make the driver write tuple records past the end of the heap allocation. A keyset reply with fewer columns than the key fields also underflows the unsigned field count. This is reachable with UseDeclareFetch enabled. Versions before psqlODBC 18.00.0006 are affected.",
  "id": "CVE-2026-120058",
  "modified": "2026-11-08T02:30:16.406146079Z",
  "published": "2026-11-02T19:09:09.747Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/120xxx/CVE-2026-120058.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-6rmx-9q62-4w6m"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120058"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/postgresql-interfaces/psqlodbc"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "psqlODBC row cache overflow when a later FETCH changes the column count"
}