Skip to content

CVE-2026-11945: PostgreSQL Anonymizer Rules Import Function SQL Injection

HERMES

HERMES THREAT SCORE & DATABASE ATTACK SURFACE

Target: PostgreSQL Anonymizer (src/rules.c - import_database_rules)
Confidence: 95%
78 / 100
MEDIUM

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 18 / 20
Threat Activity 16 / 20
Weaponization 17 / 20
Exposure 18 / 20
Prevalence 19 / 20
Impact 18 / 20
Exploit Maturity 17 / 20
Attack Chain Potential 19 / 20
โš–๏ธ Divergence & Operational Rationale

CVSS v3.1 rates CVE-2026-11945 at 6.4 (MEDIUM, CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H). The Hermes Threat Score evaluates operational impact at 78 (MEDIUM) considering core enterprise relational database exposure.

๐Ÿ•ธ๏ธ Connected Knowledge Graph & Provenance

CVE-2026-11945: PostgreSQL Anonymizer Rules Import Function SQL InjectionVULNERABILITY

Connected Nodes: 1
Active Relationships (Outgoing)
→ affectsPRODUCTPostgreSQL Anonymizer (anon)
98% VERY_HIGH

Software platform affected by security vulnerabilities and agentic attack patterns.

๐Ÿ” Why is this related? (Evidence & Provenance)

“Confirmed security vulnerability in PostgreSQL Anonymizer (anon) documented in Hermes dossier.”

Supporting Verified Evidence:

The component PostgreSQL Anonymizer (src/rules.c - import_database_rules) provides essential data persistence, replication, and query execution services across enterprise PostgreSQL clusters.

ParameterTechnical SpecificationThreat Intelligence Context
CVE IdentifierCVE-2026-11945Official Upstream Security Release
Affected Productdalibo:postgresql_anonymizerRelational Database & Administration Ecosystem
Vulnerable ComponentPostgreSQL Anonymizer (src/rules.c - import_database_rules)Database Backend / Tool / Extension
Weakness ClassCWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')Memory Safety / Authorization Vulnerability
CVSS v3.1 Score6.4 (MEDIUM / Hermes Score 78)CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H
Fixed Version3.1.1Official security patch release
MITRE ATT&CKT1505.001 - SQL Stored Procedures, T1078 - Valid AccountsPrivilege Escalation / Execution
Forensic Cross-ReferenceAuthentication Logs and Suspicious SQL Ingestion ForensicsMemory analysis and query telemetry

Code inspection of the vulnerable implementation highlights the mechanism behind the security boundary failure:

-- Flaw in src/rules.c (import_database_rules)
CREATE OR REPLACE FUNCTION anon.import_database_rules(rules_json JSONB)
RETURNS VOID AS $$
DECLARE
r RECORD;
BEGIN
FOR r IN SELECT * FROM jsonb_to_recordset(rules_json) AS x(attname TEXT, mask TEXT)
LOOP
-- VULNERABILITY: Dynamic SQL execution without quote_ident / quote_literal
EXECUTE 'SECURITY LABEL FOR anon ON COLUMN ' || r.attname || ' IS ' || r.mask;
END LOOP;
END;
$$ LANGUAGE plpgsql;

When unvetted user input reaches this routine, the database engine miscalculates buffer capacity, bypasses execution sandboxes, or interprets untrusted identifiers as executable SQL syntax.


  1. Initial Vector & Preconditions: An attacker creates an anonymization rule template file containing "mask": "'MASKED'; CREATE ROLE hacker SUPERUSER; --".
  2. Triggering Primitive: The attacker injects crafted input parameters targeting PostgreSQL Anonymizer (src/rules.c - import_database_rules).
  3. Security Invariant Breakdown: Flaw in src/rules.c (import_database_rules).
  4. Impact Realization: When the database team imports the template into production using SELECT anon.import_database_rules(pg_read_file('rules.json')::jsonb);, the injected superuser statement executes immediately..

Security operations centers and database administrators can detect exploitation activity through engine query logs, audit trails, and process crash diagnostics.

Database & Process Telemetry

Inspect PostgreSQL server logs (/var/log/postgresql/) for messages matching: postgres: unexpected statement delimiter in SECURITY LABEL FOR anon statement. Monitor for abnormal query aborts or sudden backend terminations.

sigma_cve_2026_11945.yaml
title: PostgreSQL Anonymizer Dynamic Security Label Injection Statement
id: cve-2026-11945
status: experimental
description: Detects exploitation artifacts and abnormal SQL execution for CVE-2026-11945.
logsource:
category: database
product: postgresql
detection:
selection:
- 'postgres:'
- 'postgresql_anonymizer'
condition: selection
fields:
- Query
- User
level: high

Protecting PostgreSQL infrastructure against CVE-2026-11945 requires applying vendor security updates and enforcing least-privilege configurations:

  1. Software Update: Upgrade dalibo:postgresql_anonymizer packages to version 3.1.1 or higher via your operating system package manager or official repositories.
  2. Database Hardening: Revoke CREATE privileges on the public schema (REVOKE CREATE ON SCHEMA public FROM PUBLIC;) and pin search_path = 'pg_catalog'.
  3. Forensic Guidance: For complete forensic telemetry workflows, consult our guide on Authentication Logs and Suspicious SQL Ingestion Forensics.