CVE-2026-145348 in repmgrinfo

Summary

by MITRE • 12/05/2026

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 (config_file) 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.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 12/05/2026

The vulnerability identified as CWE-78 represents an operating system command injection flaw within the repmgr utility, specifically affecting versions ranging from 4.0.0 through 5.5.1. This security defect arises from improper neutralization of special elements used in shell commands, a classic input validation failure where user-controllable data is incorporated into a command string without adequate sanitization or quoting. In this specific context, the vulnerability manifests when repmgr constructs SSH command lines to execute operations on remote cluster nodes. The utility retrieves configuration file paths and hostnames from its internal database records, specifically within the repmgr.nodes table, and concatenates these values directly into the shell command execution string. Because these variables are not properly quoted or escaped before being passed to the operating system's command interpreter, an attacker can inject malicious payloads that alter the intended behavior of the SSH connection process.

The operational impact of this vulnerability is significant for deployments where the repmgr database user lacks superuser privileges but possesses write access to the cluster node configuration records. An adversary with such credentials can craft a malicious entry in the repmgr.nodes table, embedding shell metacharacters within either the hostname or the configuration file path fields. When an operator or automated system subsequently executes commands that trigger remote execution on other nodes—such as repmgr cluster matrix, repmgr cluster crosscheck, or repmgr standby switchover—the utility will process these tainted records and pass them to the shell. Consequently, arbitrary operating system commands are executed with the privileges of the user running the repmgr service, which is typically the postgres database user in standard PostgreSQL deployments. This allows for full remote code execution on any node targeted by these administrative actions, potentially leading to complete compromise of the cluster infrastructure.

It is critical to note that this vulnerability does not provide new capabilities if the repmgr database user already holds superuser privileges within the PostgreSQL instance. A superuser inherently possesses the ability to execute operating system commands through other mechanisms available in the database engine, rendering this specific injection vector redundant for such high-privilege accounts. However, for standard deployments utilizing a dedicated non-superuser account for cluster management, this flaw represents a critical escalation path from database-level access to full host-level control. The attack aligns with ATT&CK techniques related to command and script interpretation, where attackers leverage legitimate administrative tools to execute unauthorized commands on remote systems.

To mitigate this risk, organizations must immediately upgrade repmgr to version 5.5.2 or later, which includes patches that properly quote and escape variables before shell execution. Until the update is applied, administrators should restrict write access to the repmgr.nodes table strictly to trusted superuser accounts and avoid using non-superuser database roles for cluster management tasks if possible. Additionally, implementing strict input validation on any custom scripts or integrations interacting with the repmgr API can provide an additional layer of defense against injection attempts. Regular auditing of node records in the configuration database is also recommended to detect any unauthorized modifications that may indicate a successful exploitation attempt prior to patching.

Responsible

EDB

Reservation

12/04/2026

Disclosure

12/05/2026

Moderation

accepted

CPE

ready

EPSS

0.01171

KEV

no

Activities

very low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!