{"id":"CVE-2026-61791","kind":"vulnerability","aliases":["CVE-2026-61791"],"related":[],"title":"OCO-Server: crafted hostname runs script in administrator sessions","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.","summary":"OCO-Server, a self-hosted endpoint management app, puts a stored computer hostname unsafely into an inline onclick handler on its default command buttons. A crafted hostname can run script in an administrator's logged-in session when that button is clicked.","severity":"high","cvss":7.4,"epss":0.00287,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["endpoint-management","oco-server","package","php","self-hosted"],"not_affected_if":["agent-self-registration-disabled","version-1.2.1-or-later"],"how_to_check":"- Check the installed OCO-Server version against `1.2.1`\n- Check whether `agent-self-registration-enabled` is set to on in the server settings; unknown if the sources give the setting location\n- Review stored computer hostnames for script-like characters such as quotes or angle brackets","fix":"- Upgrade OCO-Server to `1.2.1` or later\n- Keep `agent-self-registration-enabled` disabled, the default, until upgraded\n- Rotate the `agent-registration-key` if it may have been shared beyond trusted agents","status":"open","published_at":"2026-10-22T15:17:05+00:00","first_seen_at":"2026-10-23T21:57:31+00:00","triaged_at":"2026-10-25T03:25:37+00:00","updated_at":"2026-10-25T03:25:37+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-10-25T03:25:37Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade OCO-Server to `1.2.1` or later\n- Keep `agent-self-registration-enabled` disabled, the default, until upgraded\n- Rotate the `agent-registration-key` if it may have been shared beyond trusted agents","reach":"network","title":"OCO-Server: crafted hostname runs script in administrator sessions","impact":"high","summary":"OCO-Server, a self-hosted endpoint management app, puts a stored computer hostname unsafely into an inline onclick handler on its default command buttons. A crafted hostname can run script in an administrator's logged-in session when that button is clicked.","category":"package","nicknames":[],"who_cares":["self-hosted","endpoint-management","oco-server","php"],"confidence":0.7,"needs_auth":"yes","worst_case":"Script runs in an administrator's session and can deploy software to managed computers","analyst_note":"Confirm the exact settings path for agent-self-registration-enabled and whether any patch note or advisory gives a hostname validation detail.","how_to_check":"- Check the installed OCO-Server version against `1.2.1`\n- Check whether `agent-self-registration-enabled` is set to on in the server settings; unknown if the sources give the setting location\n- Review stored computer hostnames for script-like characters such as quotes or angle brackets","needs_analyst":true,"not_affected_if":["version-1.2.1-or-later","agent-self-registration-disabled"],"who_is_affected":"Any self-hosted OCO-Server instance before 1.2.1 is exposed, because the default VNC, RDP, SSH and Ping buttons are vulnerable with no custom configuration. Exploitation needs a stored hostname, which an attacker can set through the agent hello handler only if self-registration is on and they hold the shared agent registration key. Instances on 1.2.1 or later, or with no shared agent key in circulation, are not at risk.","user_interaction":"yes","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.00072,"input_tokens":3738,"output_tokens":693,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2026':12A,15A '-61791':13A,16A '1.2.1':95C,263C 'abus':243C 'action':102C 'activ':160C 'administr':9A,62B,150C,245C 'affect':156C 'agent':199C,216C 'agent-registration-key':198C 'agent-self-registration-en':215C 'allow':137C 'app':37B 'applic':83C 'attack':193C 'authent':152C 'branch':190C 'browser':126C 'button':53B,70B,158C,233C 'click':72B 'command':52B,157C,172C,232C,237C 'commandbutton':97C 'comput':41B,85C,107C,163C,169C,171C,256C 'configur':238C 'contain':104C 'craft':4A,55B,139C 'custom':236C 'cve':11A,14A 'decod':127C 'default':51B,170C,228C,231C 'deploy':88C,251C 'devic':91C 'disabl':226C 'emb':100C 'enabl':219C,221C 'endpoint':18B,35B,81C 'endpoint-manag':17B 'ent':120C 'entiti':130C 'entri':181C 'escap':125C,142C 'execut':146C 'fals':185C 'fix':260C 'frontend/api-agent.php':208C 'frontend/views/computer-details.php':161C 'handler':48B,117C,134C,206C 'helper':167C 'host':27B,34B,80C 'hostnam':5A,42B,56B,108C,140C,164C,213C 'html':96C,124C,129C 'htmlspecialchar':119C 'includ':248C 'inject':240C 'inlin':46B,115C 'interpret':132C 'inventori':86C 'issu':258C 'javascript':111C,136C 'job':253C 'key':201C 'lib/html.class.php':99C 'lib/models/computer.class.php':174C 'log':65B 'logged-in':64B 'manag':19B,36B,82C,92C,255C 'mobil':90C 'new':183C 'oco':2A,21B,29B,74C 'oco-serv':1A,20B,28B,73C 'oco.agent.hello':205C 'onclick':47B,116C 'packag':23B 'pass':162C 'permiss':249C 'php':24B 'ping':180C 'possess':195C 'prior':93C 'privileg':247C 'put':38B 'quot':121C 'rdp':177C 'registr':200C,218C,224C 'remot':192C 'requir':234C 'run':6A,58B 'script':7A,59B,147C,241C 'self':26B,33B,79C,217C,223C 'self-host':25B,32B,78C 'self-registr':222C 'server':3A,22B,30B,75C 'session':10A,67B,153C 'share':197C 'softwar':87C,252C 'ssh':178C 'store':40B,106C,210C 'string':112C,144C 'tab':184C 'uncheck':212C 'unsaf':43B 'url':103C 'use':118C,168C,182C,203C 'version':262C 'vnc':176C 'vulner':188C,230C 'whose':175C 'window.location':189C","nicknames":[],"mitigations":[],"who_affected":"Any self-hosted OCO-Server instance before 1.2.1 is exposed, because the default VNC, RDP, SSH and Ping buttons are vulnerable with no custom configuration. Exploitation needs a stored hostname, which an attacker can set through the agent hello handler only if self-registration is on and they hold the shared agent registration key. Instances on 1.2.1 or later, or with no shared agent key in circulation, are not at risk.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-22T15:17:05+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-61791","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-61791","severity":null,"published_at":"2026-10-22T15:17:05+00:00","modified_at":"2026-10-22T17:40:46+00:00","first_seen_at":"2026-10-23T21:57:31+00:00","fetched_at":"2026-10-23T22:29:02+00:00","note":null},{"source":"epss","external_id":"CVE-2026-61791","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-61791","severity":null,"published_at":null,"modified_at":null,"first_seen_at":"2026-10-24T07:15:51+00:00","fetched_at":"2026-10-24T07:15:51+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}