PostgreSQL Logical Replication Vulnerability - CVE-2020-14349

postgresql Updated 02 Oct 2025

Summary

24/08/2020
N/A
Yes i
High
7.1

ALPINE-CVE-2020-14349: It was found that PostgreSQL versions before 12.4, before 11.9 and before 10.14 did not properly sanitize the search_path during logical replication. Affects postgresql versions < 11.9-r0. Fixed in 11.9-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

PostgreSQL is a powerful, open-source object-relational database system that uses and extends the SQL language. It is known for its reliability, feature robustness, and performance. The vulnerability CVE-2020-14349 affects multiple versions of PostgreSQL, where improper sanitization of the search_path during logical replication can lead to unauthorized SQL command execution by authenticated attackers.

Vulnerability Detail

The vulnerability arises from the failure of PostgreSQL versions prior to 12.4, 11.9, and 10.14 to properly sanitize the search_path during logical replication. This flaw allows an authenticated attacker to exploit the system in a manner similar to CVE-2018-1058, potentially executing arbitrary SQL commands in the context of the user used for replication. The implications of this vulnerability are significant, as it can lead to unauthorized data manipulation and compromise the integrity of the database.

How To Fix

Minimum fixed version

11.9-r0

This is the first release that contains the fix.

sudo apk add --upgrade postgresql

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, consider restricting access to the replication user and ensuring that only trusted users have the ability to execute replication commands. This can help mitigate the risk until the package is updated.

Conclusion

CVE-2020-14349 represents a significant security risk for PostgreSQL users, allowing for potential unauthorized SQL command execution. It is crucial to update to the latest patched versions to safeguard against this vulnerability. Utilizing tools like Vulert can help in monitoring and managing such vulnerabilities effectively.

See every vulnerability recorded for postgresql →

Share this vulnerability

FAQ

CVE-2020-14349 is a vulnerability in PostgreSQL that allows authenticated attackers to execute arbitrary SQL commands due to improper sanitization of the search_path during logical replication.

Versions of PostgreSQL prior to 12.4, 11.9, and 10.14 are affected by this vulnerability.

You can use Vulert to monitor and alert in real-time for open-source vulnerabilities. Check your application against this vulnerability using the Vulert playground at Vulert Scanner.

The CVSS score for CVE-2020-14349 is 7.1, indicating a high severity level.

If immediate updates are not possible, restrict access to the replication user and monitor database activity closely to mitigate potential risks.

Related vulnerabilities

Recent vulnerabilities recorded for postgresql.

How To Fix

Minimum fixed version

11.9-r0

This is the first release that contains the fix.

sudo apk add --upgrade postgresql

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback