CVE-2026-61791

7.4High

Published 22 Oct 2026 · NVD status: Deferred · AI triage by gemini-3.8-flash

7.4CVSS

High

0CVSS v3.110

Attack vector
Network
Complexity
Low
Privileges
None
User action
Required
Impact
High impact on integrity
Weakness
CWE-83

What an attacker gets

Remote attackers can execute arbitrary JavaScript in an administrator's browser session to deploy unauthorized software jobs to managed hosts. To exploit this, the attacker needs the shared agent-registration-key while agent self-registration is enabled, plus an administrator clicking a default command button on the compromised device's page.

Root cause

The command button helper relies solely on htmlspecialchars for an inline JavaScript onclick handler, allowing stored computer hostnames to decode and escape the script string context.

Affected versions

OCO-Server prior to 1.2.1

CVSS v3.1 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N

Fix & remediation

Upgrade OCO-Server to version 1.2.1. If you cannot upgrade immediately, mitigate the attack surface by disabling agent self-registration (agent-self-registration-enabled).

remediation — bash
$ git pull && git checkout v1.2.1

AI-suggested. Run it in staging first and check it against the vendor advisory. Why?

NVD description

OCO-Server is a self-hosted endpoint management application for computer inventory, software deployment, and mobile device management. Prior to 1.2.1, `Html::commandButton()` in `lib/Html.class.php` embeds an action URL containing a stored computer hostname into a JavaScript string in an inline `onclick` handler, using `htmlspecialchars(ENT_QUOTES)` only for HTML escaping. Browsers decode the HTML entities before interpreting the handler as JavaScript, allowing a crafted hostname to escape the string and execute script in an administrator's authenticated session when an affected command button is activated. `frontend/views/computer-details.php` passes `$computer->hostname` to this helper using `Computer::DEFAULT_COMPUTER_COMMANDS` in `lib/Models/Computer.class.php`, whose VNC, RDP, SSH, and Ping entries use `new_tab=false` and the vulnerable `window.location` branch. A remote attacker who possesses the shared `agent-registration-key` can use the `oco.agent.hello` handler in `frontend/api-agent.php` to store an unchecked hostname when `agent-self-registration-enabled` is enabled; self-registration is disabled by default. The vulnerable default command buttons require no custom command configuration. The injected script can abuse the administrator's privileges, including permission to deploy software jobs to managed computers. This issue is fixed in version 1.2.1.

References

Source: nvd.nist.gov/vuln/detail/CVE-2026-61791