CVE-2025-8714
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 · uneditedUntrusted 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 confidenceA 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.
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 checksWork through these to decide whether this CVE applies to you.
-
Determine installed PostgreSQL client tool versionRun '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.
-
Identify if plain-format dumps are generatedInspect 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.
-
Verify restore source trust statusReview 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.
-
Confirm psql is used for dump restorationIdentify 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.
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 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.
PostgreSQL 17.6, 16.10, 15.14, 14.19, or 13.22 (upgrade to the latest patch within your current major version line)
- 1. Identify the current PostgreSQL version by running: psql --version (or SELECT version();)
- 2. Determine which major version line you are currently on (13, 14, 15, 16, or 17)
- 3. For Red Hat, CentOS, or similar: sudo yum update postgresql (or sudo dnf update postgresql)
- 4. For Debian/Ubuntu: sudo apt update && sudo apt install postgresql postgresql-client
- 5. For source builds: download the appropriate source tarball from www.postgresql.org/ftp/source/ and compile/install
- 6. Restart the PostgreSQL service after upgrade: sudo systemctl restart postgresql (or pg_ctlcluster for Debian)
- 7. Verify the new version is running: psql --version
- 8. Test pg_dump, pg_dumpall, and pg_restore to confirm they work correctly
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation2.0 h
- Testing4.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 $3,392.
Scan for this in your stack
Free · runs locallyCheck 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 sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2025-8714 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