CVE-2026-122043: OS Command Injection

Published Nov 11, 2026
·
Updated

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.

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.1
  2. Configuration

    After upgrading, remove any quotes around the %a, %c, and %d placeholders in event_notification_command, and around the %a placeholder in failover_validation_command, because quoted placeholders remain vulnerable to command injection.

    repmgr event_notification_command and failover_validation_command = placeholders unquoted

Event History

Nov 11, 2026
CVE Published
via MITRE·04:21 PM
Data Sourced
via MITRE·04:21 PM
DescriptionWeakness
Data Sourced
via NVD·05:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Deployments are affected only when event_notification_command uses the %a, %c, or %d placeholders, or when failover_validation_command uses %a. Deployments using a superuser as the repmgr database user gain no new capability, and deployments that do not use these placeholders are not affected.

2

What access does an attacker need to exploit it?

An attacker needs credentials for a non-superuser repmgr database user that can write a crafted node record in repmgr.nodes. The vulnerable command is then executed by another cluster node processing an event, as the operating system account running repmgr or repmgrd, usually postgres.

3

What is the remediation, and is follow-up configuration required?

Upgrade to repmgr 5.5.1. After upgrading, operators must remove any quotes they placed around placeholders in the affected commands.

4

What can be done if upgrading cannot happen immediately?

Avoid using the affected placeholders: %a, %c, and %d in event_notification_command, and %a in failover_validation_command. Restricting the ability of non-superuser repmgr database users to write crafted records in repmgr.nodes also addresses the described attack prerequisite.

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