Where
-Infinity
0
OS Command Injection, Command Injection

repmgr 4.0.0 through 5.5.1 is affected by an OS command injection vulnerability (CWE-78) in the pgbasebackup and pgrewind 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 pgbasebackup 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 pgrewind 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.

First published (updated )
OS Command Injection, Command Injection

repmgr 4.0.0 through 5.5.1 is affected by an OS command injection vulnerability (CWE-78) in the commands it runs on other cluster nodes over SSH. Commands such as repmgr cluster matrix, repmgr cluster crosscheck and repmgr standby switchover build an ssh command line that includes the configuration file path (configfile) and the host name from other nodes' records in the repmgr.nodes table, and run it through the shell without quoting these values. 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 where an operator or automation runs one of these commands. 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.

First published (updated )
Severity
6
OS Command Injection, Command Injection
AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

repmgr 4.0.0 through 5.5.0 is affected by an OS command injection vulnerability (CWE-78) in event notifications. When eventnotificationcommand is configured, repmgr substitutes the %a (node name), %c (connection string) and %d (details) placeholders into the command and runs it through the shell. %a and %c are inserted without escaping, and %d escapes only double quotes, so shell command substitution still works inside the quoting the documentation recommends. The node name and connection string come from node records in the repmgr.nodes table. 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 or repmgrd (usually postgres), on other cluster nodes that process an event using these placeholders. The %a placeholder of failovervalidationcommand has the same flaw. Deployments whose repmgr database user is a superuser gain no new capability, because a superuser can already run OS commands, and deployments that do not use these placeholders are not affected. The issue is fixed in repmgr 5.5.1. After upgrading, operators must remove any quotes they placed around these placeholders, because a placeholder left inside double quotes is still open to command injection.

First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203