CVE-2026-145348: repmgr OS command injection through node record values in remote SSH commands

Published Dec 4, 2026
·
Updated

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.

Affected Software

1 affected component
2ndquadrant repmgr>=4.0.0<=5.5.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade repmgr to a version that resolves this vulnerability.

    Fixed in 5.5.2

Event History

Dec 4, 2026
CVE Published
via MITRE·09:17 PM
Data Sourced
via MITRE·09:17 PM
DescriptionWeakness

Frequently Asked Questions

1

Who can exploit this issue, and where does the command execute?

An attacker needs credentials for a non-superuser repmgr database user and must be able to write a crafted record to the repmgr.nodes table. Their command executes as the operating-system user running repmgr, usually postgres, on the node where an operator or automation invokes an affected command.

2

Which operations can trigger exploitation?

The affected remote SSH command construction is used by repmgr cluster matrix, repmgr cluster crosscheck, and repmgr standby switchover. Exploitation requires an operator or automated process to run one of these commands after the crafted node record has been written.

3

Are deployments using a superuser repmgr database account exposed to additional risk?

No additional capability is introduced when the repmgr database user is a superuser, because that user can already execute OS commands. The meaningful privilege-escalation scenario is a non-superuser repmgr database user that can write crafted node records.

4

What should be prioritized if patching cannot happen immediately?

Restrict non-superuser repmgr database users from writing untrusted values into repmgr.nodes, and avoid running the identified cluster and switchover commands against records that may have been modified by untrusted users. Review the config_file and host name values stored in node records before invoking those operations.

5

What version contains the fix?

The issue is fixed in repmgr 5.5.2. Affected versions are 4.0.0 through 5.5.1.

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