Skip to content
Heist/ feed
Back to feed
High

Improper search_path protection in PostgreSQL Anonymizer 2.5 allows any user with create privilege to gain superuser privileges

Type: advisorySources: OSV

PostgreSQL Anonymizer contains a vulnerability that allows a user to gain superuser privileges by creating a temporary view based on a function containing malicious code. When the anon.get_tablesample_ratio function is then called, the malicious code is executed with superuser privileges. This privilege elevation can be exploited by users having the CREATE privilege in PostgreSQL 15 and later. The risk is higher with PostgreSQL 14 or with instances upgraded from PostgreSQL 14 or a prior version because the creation permission on the public schema is granted by default. The problem is resolved in PostgreSQL Anonymizer 3.0.1 and further versions

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-2361
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 16:37 UTC · Revision 1

Source evidence

Improper search_path protection in PostgreSQL Anonymizer 2.5 allows any user with create privilege to gain superuser privileges

core-osv · Original source

Published 11 Feb 2026, 17:48 UTC

PostgreSQL Anonymizer contains a vulnerability that allows a user to gain superuser privileges by creating a temporary view based on a function containing malicious code. When the anon.get_tablesample_ratio function is then called, the malicious code is executed with superuser privileges. This privilege elevation can be exploited by users having the CREATE privilege in PostgreSQL 15 and later. The risk is higher with PostgreSQL 14 or with instances upgraded from PostgreSQL 14 or a prior version because the creation permission on the public schema is granted by default. The problem is resolved in PostgreSQL Anonymizer 3.0.1 and further versions

osv:CVE-2026-2361
Complete source record
{
  "id": "1bfdbd82ea9799c7e5d657f7dbc695d5894366926264d0e4b62a30ee68bd2b83",
  "url": "https://osv.dev/vulnerability/CVE-2026-2361",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Improper search_path protection in PostgreSQL Anonymizer 2.5 allows any user with create privilege to gain superuser privileges",
    "summary": "PostgreSQL Anonymizer contains a vulnerability that allows a user to gain superuser privileges by creating a temporary view based on a function containing malicious code. When the anon.get_tablesample_ratio function is then called, the malicious code is executed with superuser privileges. This privilege elevation can be exploited by users having the CREATE privilege in PostgreSQL 15 and later. The risk is higher with PostgreSQL 14 or with instances upgraded from PostgreSQL 14 or a prior version because the creation permission on the public schema is granted by default. The problem is resolved in PostgreSQL Anonymizer 3.0.1 and further versions",
    "evidence": "osv:CVE-2026-2361",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-2361",
      "aliases": [
        "CVE-2026-2361"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://gitlab.com/dalibo/postgresql_anonymizer",
              "type": "GIT",
              "events": [
                {
                  "introduced": "c79d5b610629a197f1eb4c868168c8cba9db4868"
                },
                {
                  "fixed": "b13a74ad3fe6b95c15aae6055d25e4669f7f2920"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "1"
                      },
                      {
                        "fixed": "3.0.1"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-2361.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:37.653254885Z",
      "provider": "osv",
      "references": [
        "https://gitlab.com/dalibo/postgresql_anonymizer/-/blob/latest/NEWS.md",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/2xxx/CVE-2026-2361.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-2361",
        "https://gitlab.com/dalibo/postgresql_anonymizer/-/issues/617"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-427"
        ],
        "cna_assigner": "PostgreSQL",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/2xxx/CVE-2026-2361.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-2361",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 504755,
  "published_at": "2026-02-11T17:48:03.805+00:00"
}