CVE-2020-14349 SQL injection in PostgreSQL

High 7.1 Published Updated

An authenticated attacker can execute arbitrary SQL commands during logical replication due to improper search_path sanitization in PostgreSQL.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2020-14349?

CVE-2020-14349 is a high-severity SQL injection vulnerability in Opensuse Leap, published on 24 Aug 2020. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

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. An authenticated attacker could use this flaw in an attack similar to CVE-2018-1058, in order to execute arbitrary SQL command in the context of the user used for replication.

Weakness: CWE-89, CWE-427

Which versions are affected by CVE-2020-14349?

1 open source package ship an affected version, including postgresql. It affects 2 products.

PackageAffectedFixed in
postgresql BitnamiFrom 10.0.010.14.0, 11.9.0, 12.4.0

Products include Opensuse Leap, Postgresql Postgresql.

How do I fix CVE-2020-14349?

Upgrade postgresql to a fixed version for your release line: 10.14.0, 11.9.0 or 12.4.0.

Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.

Is CVE-2020-14349 being exploited?

There is no known exploitation of CVE-2020-14349 in the wild and no public exploit code.

All Opensuse Leap vulnerabilities

Sources

Also known as ALPINE-CVE-2020-14349, BIT-postgresql-2020-14349, CLEANSTART-2026-EG52606, GHSA-2783-h34h-q54q, JLSEC-2026-24, UBUNTU-CVE-2020-14349.

Is CVE-2020-14349 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free