CVE-2026-54161

upsmon: remote OS command injection (RCE) via attacker-controlled ups.alarm in NOTIFYCMD execution

Published Nov 3, 2026 CVSS 3.1 · 8.1 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability lies in upsmon, which accepts the ups.alarm string from the upsd server and interpolates it directly into shell commands defined by NOTIFYCMD. Because the string is not sanitized, an attacker can inject shell metacharacters that are then evaluated by the operating system. This allows execution of arbitrary commands with the privileges of the upsmon process, which is often running as root. The weakness is a classic operating-system command injection (CWE‑78) and the nominal CVSS score of 8.1 reflects its high impact on confidentiality, integrity, and availability.

Affected Systems

Network UPS Tools (NUT) versions 2.8.3 through 2.8.5 are affected. The issue occurs in the upsmon component of NUT, specifically the files clients/upsmon.c, and is resolved in 2.8.6 and later releases.

Risk and Exploitability

The practical exploitation requires an attacker to supply a malicious ups.alarm value, which can be achieved if the attacker controls the upsd process, subverts a UPS device that supplies the alarm, or performs a man‑in‑the‑middle attack on the plaintext connection between upsmon and upsd. TLS between the two daemons does not protect a compromised UPS source. In any of these scenarios the attacker can execute commands as the upsmon user, typically root. Although the EPSS score is not available and the vulnerability is not listed in CISA's KEV, the high CVSS score and the ease of establishing the required conditions make the risk fairly significant for installations that expose upsmon to untrusted devices or networks.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade NUT to 2.8.6 or later, which removes the unsanitized alarm interpolation.
  • Restrict or remove the NOTIFYCMD configuration, or configure it to use a safe wrapper that escapes or validates the ups.alarm string before execution.
  • Enable TLS or otherwise secure the communication path between upsd and upsmon and restrict network access so only trusted devices can send UPS‐monitoring data.

Generated by OpenCVE AI on November 3, 2026 at 23:38 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Networkupstools
Networkupstools nut
Vendors & Products Networkupstools
Networkupstools nut
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title upsmon: remote OS command injection (RCE) via attacker-controlled ups.alarm in NOTIFYCMD execution
Weaknesses CWE-78
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 3, 2026, 10:39 PM
Reserved
Jun 11, 2026, 9:46 PM
Status
Awaiting Analysis
Published
Nov 3, 2026, 8:18 PM
Modified
Nov 12, 2026, 8:04 PM
Severity
Important
Public date
Nov 3, 2026, 7:57 PM