# CVE-2026-122043: Command injection in repmgr

> A non-superuser repmgr database user can inject OS commands via node records when event notification placeholders are configured, running commands on other cluster nodes.

- **Severity:** Medium 6.0 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Harmful if only installed:** No
- **Needs a specific call:** No
- **Fix available:** No
- **Published:** 11 Nov 2026
- **Updated:** 11 Nov 2026
- **Also known as:** GHSA-9jp5-pcg8-5x3c

## What is CVE-2026-122043?

CVE-2026-122043 is a medium-severity command injection vulnerability in EnterpriseDB repmgr, published on 11 Nov 2026. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

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.

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command)

## Which versions are affected by CVE-2026-122043?

Only installations with a non-default setting turned on are exposed.


## How do I fix CVE-2026-122043?

No fix has been published for CVE-2026-122043 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-122043 being exploited?

There is no known exploitation of CVE-2026-122043 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-122043 and fix it if it is affected.

What it is: CVE-2026-122043 is a medium-severity command injection vulnerability in EnterpriseDB repmgr, published on 11 Nov 2026. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-122043 in the wild and no public exploit code.
Exposure: Only installations with a non-default setting turned on are exposed.

Affected product: EnterpriseDB repmgr. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-122043/ (Markdown: https://insights.sbomify.com/CVE-2026-122043/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-122043
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-122043
- OSV: https://osv.dev/vulnerability/CVE-2026-122043

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-122043/
Summaries are generated and may contain mistakes; the official description above is the record.
