CWE-829Weakness · CWE-829

CVE-2025-8714

HIGH · 8.8 CVSS v3.1 Published 2025-08-14
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
95/100
Remediation priority · Urgent
Remotely reachable No privileges

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
Untrusted data inclusion in pg_dump in PostgreSQL allows a malicious superuser of the origin server to inject arbitrary code for restore-time execution as the client operating system account running psql to restore the dump, via psql meta-commands. pg_dumpall is also affected. pg_restore is affected when used to generate a plain-format dump. This is similar to MySQL CVE-2024-21096. Versions before PostgreSQL 17.6, 16.10, 15.14, 14.19, and 13.22 are affected.

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 confidence

A vulnerability in PostgreSQL's pg_dump utility allows a malicious superuser on the origin database server to inject arbitrary code into dump files via psql meta-commands. When the dump is restored using psql, this injected code executes on the client system with the privileges of the user running psql. Affected components include pg_dump, pg_dumpall, and pg_restore when generating plain-format dumps.

MitigationUpgrade PostgreSQL to version 17.6, 16.10, 15.14, 14.19, or 13.22 or later. Until patched, do not restore dumps from untrusted database servers without reviewing the contents first, and avoid running psql as a privileged OS account when restoring untrusted dumps.

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

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/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 checks

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

  1. Determine installed PostgreSQL client tool version
    Run 'pg_dump --version' or 'psql --version' to find the version of the PostgreSQL client tools. For server version, run 'SELECT version();' as a superuser or check 'pg_config --version'.
    Affected if The version is 17.x before 17.6, 16.x before 16.10, 15.x before 15.14, 14.x before 14.19, or 13.x before 13.22. Compare your installed version against these ranges.
  2. Identify if plain-format dumps are generated
    Inspect how your backup process generates dumps. Plain-format dumps are created with 'pg_dump -F plain' or the default format (no -F flag), or when using pg_dumpall without the -c/--clean option for non-plain output. Check any backup scripts or cron jobs for the -F p flag or absence of -F c/-F d.
    Affected if Dumps are being created in plain text format (the default) using pg_dump, pg_dumpall, or pg_restore with -F plain.
  3. Verify restore source trust status
    Review whether you restore dumps from database servers you do not fully control or trust. Check if backups originate from shared hosting environments, third-party providers, or any server where you are not the sole administrator.
    Affected if You restore dumps from origin database servers where you are not the sole superuser or cannot verify the superuser's integrity.
  4. Confirm psql is used for dump restoration
    Identify your restore procedure. Determine if you use 'psql' to read in plain-format dump files (the typical method for plain dumps), as opposed to pg_restore which is used for custom/archive formats.
    Affected if Plain-format dumps are restored using the psql command-line client.

You are affected if your PostgreSQL tools are within the vulnerable version ranges AND you restore plain-format dumps from origins where a malicious superuser could have injected meta-commands.

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

Upgrade PostgreSQL to version 17.6, 16.10, 15.14, 14.19, or 13.22 or later. Until patched, do not restore dumps from untrusted database servers without reviewing the contents first, and avoid running psql as a privileged OS account when restoring untrusted dumps.

Recommended fix High confidence

PostgreSQL 17.6, 16.10, 15.14, 14.19, or 13.22 (upgrade to the latest patch within your current major version line)

  1. 1. Identify the current PostgreSQL version by running: psql --version (or SELECT version();)
  2. 2. Determine which major version line you are currently on (13, 14, 15, 16, or 17)
  3. 3. For Red Hat, CentOS, or similar: sudo yum update postgresql (or sudo dnf update postgresql)
  4. 4. For Debian/Ubuntu: sudo apt update && sudo apt install postgresql postgresql-client
  5. 5. For source builds: download the appropriate source tarball from www.postgresql.org/ftp/source/ and compile/install
  6. 6. Restart the PostgreSQL service after upgrade: sudo systemctl restart postgresql (or pg_ctlcluster for Debian)
  7. 7. Verify the new version is running: psql --version
  8. 8. Test pg_dump, pg_dumpall, and pg_restore to confirm they work correctly
Caveat Minor version upgrades typically have backward compatibility, but always review release notes and test in non-production first

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

Have this fixed Scoped from the published advisory
  • Consultation4.0 h
  • Implementation2.0 h
  • Testing4.0 h
  • Review / QA2.0 h
12.0 hours of engineering $2,120
Get help mitigating

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

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

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