---
id: "CVE-2026-54161"
kind: "vulnerability"
aliases: ["CVE-2026-54161"]
title: "Network UPS Tools: upsmon alarm text lets a server run OS commands"
severity: "high"
cvss: 8.1
epss: null
exploited: false
status: "open"
category: "infrastructure"
products: []
ecosystems: []
tags: ["infrastructure", "linux", "network-ups-tools", "nut", "ups", "upsmon"]
not_affected_if: ["no-alarm-notify-flag", "no-notifycmd-exec", "version-outside-2.8.3-2.8.5"]
published_at: "2026-11-03T20:18:14+00:00"
first_seen_at: "2026-11-03T20:49:22+00:00"
updated_at: "2026-11-03T20:49:56+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-54161", "first_seen_at": "2026-11-03T20:49:22+00:00"}]
---

# Network UPS Tools: upsmon alarm text lets a server run OS commands

Network UPS Tools (NUT) upsmon from 2.8.3 to 2.8.5 puts the alarm value sent by upsd into shell commands run by notify, so shell metacharacters in that text get evaluated. An attacker who controls the alarm value, through a malicious or compromised upsd, a plaintext man-in-the-middle, or a compromised UPS device, can run arbitrary commands as the upsmon account, commonly root.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed NUT version with `upsmon -V` and see whether it falls between `2.8.3` and `2.8.5`.
- Look in `upsmon.conf` for a `NOTIFYCMD` line and check whether `NOTIFYFLAG ALARM` includes `EXEC`.

## Fix

- Upgrade Network UPS Tools to `2.8.6`.

## Timeline

- 2026-11-03T20:49:22+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-54161

## Documents

- [advisory] Vendor advisory: github.com https://github.com/networkupstools/nut/security/advisories/GHSA-mjgp-j4gm-6qg5
- [fix] Patch: github.com https://github.com/networkupstools/nut/commit/98e073d4cc31f9c73e2fa0c2677540487d902fe7
- [fix] Patch: github.com https://github.com/networkupstools/nut/commit/dffba911504866695be698bb5ec49eac40d0f66a
- [fix] Patch: github.com https://github.com/networkupstools/nut/commit/ecf98e7542e4ae2b62b211622ee26989274b2220

## From the sources

Network UPS Tools is a collection of programs which provide a common interface for monitoring and administering UPS, PDU and SCD hardware. From 2.8.3 to 2.8.5, upsmon in clients/upsmon.c inserts the server-supplied ups.alarm value into shell commands executed by notify(), async_notify(), and wall(). When a monitored device reports an ALARM state and an operator has configured NOTIFYCMD with EXEC in NOTIFYFLAG ALARM, shell metacharacters in the alarm text are evaluated on POSIX or Windows and can execute arbitrary operating-system commands as the upsmon account, which is commonly root. An attacker can control the value through a malicious or compromised upsd, a man-in-the-middle on a plaintext upsd to upsmon connection, or a compromised UPS device whose driver supplies the alarm upstream of upsd; TLS between upsd and upsmon does not mitigate the compromised-device path. This vulnerability is fixed in 2.8.6.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
