CVE-2026-136502 (GCVE-0-2026-136502)

Vulnerability from cvelistv5 – Published: 2026-11-25 22:25 – Updated: 2026-11-25 22:25
VLAI
Title
SQL injection and redirected writes because the driver reads SQL text differently from the server
Summary
psqlODBC scans statement text itself to substitute parameters, translate ODBC escapes, join batched statements and rewrite queries for updatable cursors. Where it read the text differently from the server, text the driver took for data ran as SQL, or a positioned write went to another table: - An escape string constant written e'…' in lower case was not recognised as one, and '…' after a keyword ending in E, as in LIKE'…', was taken for one. - A } inside a quoted literal ended an ODBC {d …}, {t …}, {ts …} or {escape …} sequence. - Dollar-quote tags containing _ were not recognised, and an identifier starting with _ followed by $, such as _$$, was taken for the start of a dollar quote, so a parameter marker inside a literal was substituted. - A trailing -- comment in one statement of a batched parameter array swallowed the next statement. - Comments, literals longer than 255 bytes and escape strings were misread when the driver located the FROM and WHERE clauses of a query for an updatable cursor, and the text copied into the cursor's own queries could include SQL from inside a literal. - A table name containing $ was cut at the $, and a quoted table name starting with , or ; ended the table list, so positioned updates, inserts and deletes went to another table. - An integer parameter with an embedded NUL byte cut the query short. - /*/ was taken for a comment that opens and closes, while the server reads it as one that only opens. - ConnSettings was split at every semicolon, including one inside a quoted literal, so an application that puts an end user's value into a SET command there ran the rest of the value as SQL at connect time. An end user who controls text the application puts into a statement, or a parameter value, can run SQL with the rights of the application's database role. A database user who can create a table with a crafted name can redirect another user's positioned writes to a table of their choosing. Versions up to and including psqlODBC 18.00.0006 are affected.
CWE
  • CWE-89 - Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
  • CWE-706 - Use of Incorrectly-Resolved Name or Reference
Assigner
PostgreSQL CNA under the redhat root
CNA scorecard C 69/100 over 179 records in the last 180 days details
References
Impacted products
Vendor Product Version CPE status
PostgreSQL psqlODBC Affected: 0 , ≤ 18.00.0006 (custom)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "collectionURL": "https://odbc.postgresql.org/",
          "defaultStatus": "unaffected",
          "packageName": "psqlodbc",
          "product": "psqlODBC",
          "vendor": "PostgreSQL",
          "versions": [
            {
              "lessThanOrEqual": "18.00.0006",
              "status": "affected",
              "version": "0",
              "versionType": "custom"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "psqlODBC scans statement text itself to substitute parameters, translate ODBC escapes, join batched statements and rewrite queries for updatable cursors. Where it read the text differently from the server, text the driver took for data ran as SQL, or a positioned write went to another table:\n\n- An escape string constant written e\u0027\u2026\u0027 in lower case was not recognised as one, and \u0027\u2026\u0027 after a keyword ending in E, as in LIKE\u0027\u2026\u0027, was taken for one.\n- A } inside a quoted literal ended an ODBC {d \u2026}, {t \u2026}, {ts \u2026} or {escape \u2026} sequence.\n- Dollar-quote tags containing _ were not recognised, and an identifier starting with _ followed by $, such as _$$, was taken for the start of a dollar quote, so a parameter marker inside a literal was substituted.\n- A trailing -- comment in one statement of a batched parameter array swallowed the next statement.\n- Comments, literals longer than 255 bytes and escape strings were misread when the driver located the FROM and WHERE clauses of a query for an updatable cursor, and the text copied into the cursor\u0027s own queries could include SQL from inside a literal.\n- A table name containing $ was cut at the $, and a quoted table name starting with , or ; ended the table list, so positioned updates, inserts and deletes went to another table.\n- An integer parameter with an embedded NUL byte cut the query short.\n- /*/ was taken for a comment that opens and closes, while the server reads it as one that only opens.\n- ConnSettings was split at every semicolon, including one inside a quoted literal, so an application that puts an end user\u0027s value into a SET command there ran the rest of the value as SQL at connect time.\n\nAn end user who controls text the application puts into a statement, or a parameter value, can run SQL with the rights of the application\u0027s database role. A database user who can create a table with a crafted name can redirect another user\u0027s positioned writes to a table of their choosing.\n\nVersions up to and including psqlODBC 18.00.0006 are affected."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 8.1,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "format": "CVSS"
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-89",
              "description": "CWE-89 Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)",
              "lang": "en",
              "type": "CWE"
            },
            {
              "cweId": "CWE-706",
              "description": "CWE-706 Use of Incorrectly-Resolved Name or Reference",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-11-25T22:25:46.083Z",
        "orgId": "f86ef6dc-4d3a-42ad-8f28-e6d5547a5007",
        "shortName": "PostgreSQL"
      },
      "references": [
        {
          "name": "GHSA-4392-6j85-5q2q",
          "tags": [
            "vendor-advisory"
          ],
          "url": "https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-4392-6j85-5q2q"
        },
        {
          "name": "psqlODBC changelog",
          "tags": [
            "release-notes"
          ],
          "url": "https://odbc.postgresql.org/changelog/"
        }
      ],
      "title": "SQL injection and redirected writes because the driver reads SQL text differently from the server"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "f86ef6dc-4d3a-42ad-8f28-e6d5547a5007",
    "assignerShortName": "PostgreSQL",
    "cveId": "CVE-2026-136502",
    "datePublished": "2026-11-25T22:25:46.083Z",
    "dateReserved": "2026-11-24T20:17:10.903Z",
    "dateUpdated": "2026-11-25T22:25:46.083Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "collectionURL": "https://odbc.postgresql.org/",
                "defaultStatus": "unaffected",
                "packageName": "psqlodbc",
                "product": "psqlODBC",
                "vendor": "PostgreSQL",
                "versions": [
                  {
                    "lessThanOrEqual": "18.00.0006",
                    "status": "affected",
                    "version": "0",
                    "versionType": "custom"
                  }
                ]
              }
            ],
            "source": "f86ef6dc-4d3a-42ad-8f28-e6d5547a5007"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "psqlODBC scans statement text itself to substitute parameters, translate ODBC escapes, join batched statements and rewrite queries for updatable cursors. Where it read the text differently from the server, text the driver took for data ran as SQL, or a positioned write went to another table:\n\n- An escape string constant written e\u0027\u2026\u0027 in lower case was not recognised as one, and \u0027\u2026\u0027 after a keyword ending in E, as in LIKE\u0027\u2026\u0027, was taken for one.\n- A } inside a quoted literal ended an ODBC {d \u2026}, {t \u2026}, {ts \u2026} or {escape \u2026} sequence.\n- Dollar-quote tags containing _ were not recognised, and an identifier starting with _ followed by $, such as _$$, was taken for the start of a dollar quote, so a parameter marker inside a literal was substituted.\n- A trailing -- comment in one statement of a batched parameter array swallowed the next statement.\n- Comments, literals longer than 255 bytes and escape strings were misread when the driver located the FROM and WHERE clauses of a query for an updatable cursor, and the text copied into the cursor\u0027s own queries could include SQL from inside a literal.\n- A table name containing $ was cut at the $, and a quoted table name starting with , or ; ended the table list, so positioned updates, inserts and deletes went to another table.\n- An integer parameter with an embedded NUL byte cut the query short.\n- /*/ was taken for a comment that opens and closes, while the server reads it as one that only opens.\n- ConnSettings was split at every semicolon, including one inside a quoted literal, so an application that puts an end user\u0027s value into a SET command there ran the rest of the value as SQL at connect time.\n\nAn end user who controls text the application puts into a statement, or a parameter value, can run SQL with the rights of the application\u0027s database role. A database user who can create a table with a crafted name can redirect another user\u0027s positioned writes to a table of their choosing.\n\nVersions up to and including psqlODBC 18.00.0006 are affected."
          }
        ],
        "id": "CVE-2026-136502",
        "lastModified": "2026-11-25T23:17:23.180",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "HIGH",
                "attackVector": "NETWORK",
                "availabilityImpact": "HIGH",
                "baseScore": 8.1,
                "baseSeverity": "HIGH",
                "confidentialityImpact": "HIGH",
                "integrityImpact": "HIGH",
                "privilegesRequired": "NONE",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 2.2,
              "impactScore": 5.9,
              "source": "f86ef6dc-4d3a-42ad-8f28-e6d5547a5007",
              "type": "Secondary"
            }
          ]
        },
        "published": "2026-11-25T23:17:23.180",
        "references": [
          {
            "source": "f86ef6dc-4d3a-42ad-8f28-e6d5547a5007",
            "url": "https://github.com/postgresql-interfaces/psqlodbc/security/advisories/GHSA-4392-6j85-5q2q"
          },
          {
            "source": "f86ef6dc-4d3a-42ad-8f28-e6d5547a5007",
            "url": "https://odbc.postgresql.org/changelog/"
          }
        ],
        "sourceIdentifier": "f86ef6dc-4d3a-42ad-8f28-e6d5547a5007",
        "vulnStatus": "Received",
        "weaknesses": [
          {
            "description": [
              {
                "lang": "en",
                "value": "CWE-89"
              },
              {
                "lang": "en",
                "value": "CWE-706"
              }
            ],
            "source": "f86ef6dc-4d3a-42ad-8f28-e6d5547a5007",
            "type": "Secondary"
          }
        ]
      }
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.