CVE-2026-61791

OCO-Server: Stored XSS through agent hostnames in command buttons

Published Oct 22, 2026 CVSS 3.1 · 7.4 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

A stored cross‑site scripting flaw exists in OCO‑Server’s command button helper. The server embeds an unvalidated computer hostname into a JavaScript string inside an inline onclick handler. Only HTML entity escaping is performed; browsers unescape the string before executing the script, allowing a crafted hostname to break out of the string and inject arbitrary JavaScript. The injected script runs with the privileges of an authenticated administrator, enabling the attacker to perform administrative operations such as deploying software jobs or accessing sensitive data.

Affected Systems

Instances of OCO‑Server produced by schorschii running any version prior to the public 1.2.1 release are affected. The vulnerability was fixed in v1.2.1; all earlier releases remain vulnerable.

Risk and Exploitability

The CVSS score of 7.4 signifies a moderate to high severity, and the EPSS score is not available. Exploitation requires an attacker to possess the shared agent‑registration‑key to register a malicious hostname when the agent‑self‑registration feature is enabled. The attacker then needs an administrator to click the vulnerable command button, which means the attack is user‑interactive. Because the script executes in the context of a privileged session, the impact is severe, but the overall risk is moderated by the requirement for administrators to trigger the button. The vulnerability is not listed in CISA KEV.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade OCO‑Server to version 1.2.1 or later
  • If an immediate upgrade is not possible, disable agent‑self‑registration and revoke any shared agent‑registration‑key to prevent hostile hostname registration
  • Limit administrative access to the web interface and monitor for anomalous command button activity; consider implementing a content security policy to mitigate XSS impact

Generated by OpenCVE AI on October 22, 2026 at 16:18 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Schorschii
Schorschii oco-server
Vendors & Products Schorschii
Schorschii oco-server
Type Values Removed Values Added
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.
Title OCO-Server: Stored XSS through agent hostnames in command buttons
Weaknesses CWE-83
References
Metrics cvssV3_1

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

Weaknesses
  • CWE-83

    Improper Neutralization of Script in Attributes in a Web Page

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 29, 2026, 11:46 AM
Reserved
Jul 10, 2026, 8:06 PM
Status
Deferred
Published
Oct 22, 2026, 3:17 PM
Modified
Oct 29, 2026, 12:17 PM