CVE-2021-3515 Command injection in pglogical
An attacker with CREATEDB privileges can execute shell commands as the postgresql user by crafting a malicious database name in pglogical.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-3515?
CVE-2021-3515 is a medium-severity command injection vulnerability in pglogical, published on 1 Jun 2021. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
A shell injection flaw was found in pglogical in versions before 2.3.4 and before 3.6.26. An attacker with CREATEDB privileges on a PostgreSQL server can craft a database name that allows execution of shell commands as the postgresql user when calling pglogical.create_subscription().
Which versions are affected by CVE-2021-3515?
It affects 1 product.
Products include 2ndquadrant Pglogical.
How do I fix CVE-2021-3515?
Upgrade to a fixed version.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2021-3515 being exploited?
There is no known exploitation of CVE-2021-3515 in the wild and no public exploit code.
Sources
Also known as DEBIAN-CVE-2021-3515, GHSA-pg8h-w6r7-prw8, UBUNTU-CVE-2021-3515.