---
id: "CVE-2026-105620"
kind: "vulnerability"
aliases: ["CVE-2026-105620"]
title: "PostgreSQL Anonymizer: sub-query results in masking rules are returned unmasked"
severity: "medium"
cvss: 6.5
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["data-masking", "package", "postgresql", "self-hosted"]
not_affected_if: ["no-anonymizer-extension", "no-subquery-rules"]
published_at: "2026-10-28T18:17:04+00:00"
first_seen_at: "2026-10-28T18:34:32+00:00"
updated_at: "2026-10-28T18:34:59+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-105620", "first_seen_at": "2026-10-28T18:34:32+00:00"}]
---

# PostgreSQL Anonymizer: sub-query results in masking rules are returned unmasked

PostgreSQL Anonymizer does not mask data returned by a sub-query inside a masking rule, so values meant to be hidden can reach the querying user. Fixed in version 3.3.0.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed extension version with `SELECT extversion FROM pg_extension WHERE extname = 'anon';`
- Review masking rules that use sub-queries (`SELECT * FROM anon.rules` or your rule definitions) and test them as a masked role

## Fix

- Upgrade PostgreSQL Anonymizer to `3.3.0` or later
- Re-test any masking rules that rely on sub-queries after the upgrade

## Timeline

- 2026-10-28T18:34:32+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-105620

## From the sources

PostgreSQL Anonymizer doesn't mask data returned by a sub-query in a rule. The problem is resolved in PostgreSQL Anonymizer 3.3.0 and later versions.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
