Missing AuthorizationWeakness · CWE-862

CVE-2025-2506

MEDIUM · 5.3 CVSS v3.1 Published 2025-05-22
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
59/100
Remediation priority · Elevated
Remotely reachable Zero-click

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 · unedited
When pglogical attempts to replicate data, it does not verify it is using a replication connection, which means a user with CONNECT access to a database configured for replication can execute the pglogical command to obtain read access to replicated tables. When pglogical runs it should verify it is running on a replication connection but does not perform this check. This vulnerability was introduced in the pglogical 3.x codebase, which is proprietary to EDB. The same code base has been integrated into BDR/PGD 4 and 5. To exploit the vulnerability the attacker needs at least CONNECT permissions to a database configured for replication and must understand a number of pglogical3/BDR specific commands and be able to decode the binary protocol.

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 · moderate confidence

pglogical fails to verify it is running on a replication connection during data replication, allowing any user with CONNECT access to a replication-configured database to execute pglogical commands and gain unauthorized read access to replicated tables. The vulnerability stems from missing authorization checks in the replication code path introduced in pglogical 3.x and inherited by BDR/PGD 4 and 5.

MitigationApply vendor patches when available. As an interim control, restrict CONNECT permissions on databases configured for replication to only trusted users and monitor for unauthorized replication connection attempts.

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
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N

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 checks

Work through these to decide whether this CVE applies to you.

  1. Verify pglogical extension version
    Query the pg_extension catalog: SELECT extname, extversion FROM pg_extension WHERE extname IN ('pglogical', 'bdr', 'pgd');
    Affected if The installed version is 3.x or higher (for pglogical) or 4.x/5.x (for BDR/PGD)
  2. Identify databases with pglogical replication configured
    Check for active replication nodes: SELECT node_name, database FROM pglogical.node; If this returns rows, pglogical replication is active.
    Affected if Any rows returned means replication is configured and the vulnerability applies
  3. List users with CONNECT permission on replication-configured databases
    Query: SELECT datname, grantee FROM information_schema.database_privileges WHERE privilege_type = 'CONNECT' AND datname IN (SELECT database FROM pglogical.node);
    Affected if More than expected users or untrusted users have CONNECT access to replication-enabled databases
  4. Check for unauthorized replication role assignments
    Review pg_roles for users granted replication-related roles (pglogical.replication_writer, etc): SELECT rolname FROM pg_roles WHERE rolname IN (SELECT member::regrole::text FROM pg_auth_members WHERE role::regrole::text LIKE '%replication%');
    Affected if Users without explicit replication duties hold replication privileges
  5. Audit recent pglogical function executions
    Check pg_stat_statements or logs for executions of pglogical functions (pglogical.replication_set_add_table, pglogical.subscription_sync, etc) from unexpected session contexts
    Affected if pglogical functions were called by sessions that were not established via a replication connection

You are affected if pglogical 3.x, BDR/PGD 4, or BDR/PGD 5 is installed AND a database is configured for replication AND untrusted users have CONNECT access to that database.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

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 · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Apply vendor patches when available. As an interim control, restrict CONNECT permissions on databases configured for replication to only trusted users and monitor for unauthorized replication connection attempts.

Recommended fix Moderate confidence

Obtain the fixed release from EDB - contact EDB Technical Support or check EDB security advisories at www.enterprisedb.com for the specific version numbers for pglogical 3.x, BDR 4, and PGD 5 that include the replication connection verification fix.

  1. Contact EDB Technical Support or visit www.enterprisedb.com to obtain the specific patch or updated release for pglogical 3.x, BDR 4, or PGD 5 that addresses CVE-2025-2506.
  2. Verify your current pglogical/BDR/PGD version by querying the database or checking installed packages.
  3. Apply the vendor-provided patch or upgrade to the fixed release as directed by EDB.
  4. After upgrade, verify that pglogical now properly validates replication connections before granting access to replicated data.
  5. Confirm the fix by testing that non-replication connections cannot execute pglogical replication commands.
Caveat Review EDB release notes for any configuration or behavioral changes in the fixed release before upgrading.

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation6.0 h
  • Implementation12.0 h
  • Testing10.0 h
  • Review / QA6.0 h
34.0 hours of engineering $5,940
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $9,504.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-2506 — 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 sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-2506 in production — separate from our analysis above.

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.

What this is

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.

What belongs here
  • 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