Skip to main content
← All vulnerabilities
CVE-2026-61791GHSA-9C2R-9J95-22PR

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

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 1.2.1
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

OCO-Server, a self-hosted endpoint management application for computer inventory, software deployment, and mobile device management, is affected. An attacker who holds the shared agent registration key can store a malicious computer hostname that runs script in an administrator's logged-in session when they click a default command button (such as VNC, RDP, SSH, or Ping) on the computer details page, potentially letting the attacker act with that administrator's privileges, including deploying software to managed computers.

Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.

Read the original 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.

Timeline

  1. CVE published
  2. First seen by cve.now
  3. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  4. Record last updated

Affected versions

  • schorschii OCO-Server

    fixed in 1.2.1

References 3

GitHub · schorschii/OCO-Server