CVE-2026-2361
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedPostgreSQL 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
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidencePostgreSQL Anonymizer has a privilege escalation vulnerability where users with CREATE privilege can create a temporary view containing malicious code within a function. When the anon.get_tablesample_ratio function is executed, the malicious code runs with superuser privileges, allowing complete database compromise.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- High
- Privileges
- High
- User interaction
- None
- Scope
- Changed
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Confirm PostgreSQL Anonymizer extension is installedRun: SELECT * FROM pg_extension WHERE extname = 'anon';Affected if No rows returned means the extension is not installed and the vulnerability does not apply.
-
Check the installed version of PostgreSQL AnonymizerRun: SELECT * FROM pg_extension WHERE extname = 'anon'; and look at the extversion column, or run: SELECT anon.version();Affected if Version is lower than 3.0.1 (e.g., 3.0.0 or earlier).
-
Verify current user has CREATE privilege on any schemaRun: SELECT schema_name, privilege_type FROM information_schema.schema_privileges WHERE grantee = CURRENT_USER AND privilege_type = 'CREATE';Affected if Any rows returned means the user has CREATE privilege on at least one schema.
-
Check if the public schema allows CREATE for non-superusersRun: SELECT has_schema_privilege('public', 'CREATE') AS public_create_privilege;Affected if Returns true - the public schema grants CREATE privilege, which allows the attack.
-
Look for the get_tablesample_ratio function in the anon schemaRun: SELECT proname, pronamespace::regnamespace FROM pg_proc WHERE proname = 'get_tablesample_ratio' AND pronamespace = 'anon'::regnamespace;Affected if Function exists - the vulnerable function is present in the environment.
If PostgreSQL Anonymizer version is below 3.0.1 AND the current user has CREATE privilege on any schema (especially public), the environment is vulnerable to privilege escalation via the get_tablesample_ratio function.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpgrade to PostgreSQL Anonymizer 3.0.1 or later. Additionally, review and restrict CREATE privileges on schemas, particularly the public schema, especially on PostgreSQL 14 or upgraded instances where public schema permissions are granted by default.
PostgreSQL Anonymizer 3.0.1 or later
- Upgrade PostgreSQL Anonymizer to version 3.0.1 or a later release
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation2.0 h
- Testing3.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,512.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-2361 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-2361 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data