CVE-2026-122043 · Runtime
NO FIX YET · SEE WHAT TO DO
repmgr passes node names and connection strings from its database into shell commands for event notifications without proper escaping. A non-superuser with repmgr database credentials can insert a crafted node record and run OS commands as the repmgr or postgres system user on other cluster nodes.
first public Nov 11, 2026 · 1 source
Could this affect your app?
Free first check from your website. Connect your repo for the full answer.
Only clusters running repmgr 4.0.0 through 5.5.0 that use event_notification_command or failover_validation_command with the %a, %c or %d placeholders are exposed. The attacker needs credentials for a non-superuser repmgr database user, and deployments where that user is a superuser gain nothing new. Clusters without these placeholders can skip it.
Not affected if no-event-notification-command, no-placeholders, superuser-db-user
Who cares postgresql, repmgr, self-hosted
repmgr --version; versions 4.0.0 through 5.5.0 are affected.event_notification_command or failover_validation_command in repmgr.conf that use the %a, %c or %d placeholders.5.5.1.repmgr 4.0.0 through 5.5.0 is affected by an OS command injection vulnerability (CWE-78) in event notifications. When event_notification_command 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 failover_validation_command 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.
Check it with your coding agent
It reads this page and tells you if your code is affected.
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
This page as .md · .json · CVSS:4.0/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
NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.