repmgr 4.0.0 through 5.5.1 is affected by an OS command injection vulnerability (CWE-78) in the pg_basebackup and pg_rewind commands it builds. During repmgr standby clone, the replication user name (repluser) from the upstream node's record in the repmgr.nodes table is inserted into the pg_basebackup command line without escaping. During repmgr node rejoin with --force-rewind, including the rejoin step of repmgr standby switchover --force-rewind, the primary node's connection string (conninfo) is inserted into the pg_rewind command line without escaping. repmgr runs both commands through the shell. An attacker with the credentials of a non-superuser repmgr database user can write a crafted node record and run OS commands, as the operating system user that runs repmgr (usually postgres), on the node being cloned or rejoined. Deployments whose repmgr database user is a superuser gain no new capability, because a superuser can already run OS commands. The issue is fixed in repmgr 5.5.2.

Project Subscriptions

Vendors Products
Enterprisedb Subscribe
Advisories

No advisories yet.

Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Sat, 05 Dec 2026 03:00:00 +0000

Type Values Removed Values Added
First Time appeared Enterprisedb
Enterprisedb repmgr
Vendors & Products Enterprisedb
Enterprisedb repmgr

Fri, 04 Dec 2026 21:30:00 +0000

Type Values Removed Values Added
Description repmgr 4.0.0 through 5.5.1 is affected by an OS command injection vulnerability (CWE-78) in the pg_basebackup and pg_rewind commands it builds. During repmgr standby clone, the replication user name (repluser) from the upstream node's record in the repmgr.nodes table is inserted into the pg_basebackup command line without escaping. During repmgr node rejoin with --force-rewind, including the rejoin step of repmgr standby switchover --force-rewind, the primary node's connection string (conninfo) is inserted into the pg_rewind command line without escaping. repmgr runs both commands through the shell. An attacker with the credentials of a non-superuser repmgr database user can write a crafted node record and run OS commands, as the operating system user that runs repmgr (usually postgres), on the node being cloned or rejoined. Deployments whose repmgr database user is a superuser gain no new capability, because a superuser can already run OS commands. The issue is fixed in repmgr 5.5.2.
Title repmgr OS command injection through node record values in pg_basebackup and pg_rewind commands
Weaknesses CWE-78
References
Metrics cvssV4_0

{'score': 5.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:P/VC:L/VI:H/VA:H/SC:N/SI:N/SA:N'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: EDB

Published:

Updated: 2026-12-04T21:17:37.050Z

Reserved: 2026-12-04T19:48:23.702Z

Link: CVE-2026-145347

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-12-04T22:18:15.660

Modified: 2026-12-04T22:18:15.660

Link: CVE-2026-145347

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-12-05T02:45:02Z

Weaknesses