OCO-Server: Stored XSS through agent hostnames in command buttons
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-61791
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 10:37 UTC · Revision 1
Source evidence
OCO-Server: Stored XSS through agent hostnames in command buttons
core-osv · Original sourcePublished 22 Oct 2026, 14:55 UTC
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.
osv:CVE-2026-61791
Complete source record
{
"id": "5defe9bb200d6de783addb7e723254ec15b04d8abddba4f21c69c951df02959d",
"url": "https://osv.dev/vulnerability/CVE-2026-61791",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "OCO-Server: Stored XSS through agent hostnames in command buttons",
"summary": "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.",
"evidence": "osv:CVE-2026-61791",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-61791",
"aliases": [
"CVE-2026-61791",
"GHSA-9c2r-9j95-22pr"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/schorschii/oco-server",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "7a95fea147dc315596a3b596c67c1f012aa465e7"
},
{
"fixed": "ef02f9768e5e1792c3ee53c72e8d7e4ea58ddaa8"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "1.2.1"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "ef02f9768e5e1792c3ee53c72e8d7e4ea58ddaa8"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "7a95fea147dc315596a3b596c67c1f012aa465e7"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v1.2.1"
}
]
}
}
],
"versions": [
"v1.2.0",
"v1.1.13",
"v1.1.12",
"v1.1.11",
"v1.1.10",
"v1.1.7",
"v1.1.6",
"v1.1.3",
"v1.1.2",
"v1.1.1",
"v1.1.0",
"v1.0.4",
"v1.0.3",
"v1.0.2",
"v1.0.1",
"v1.0.0",
"v0.16.3",
"v0.16.2",
"v0.16.1",
"v0.16.0",
"v0.15.5",
"v0.15.4",
"v0.15.3",
"v0.15.2",
"v0.15.1",
"v0.15.0",
"v0.14.4",
"v0.14.3",
"v0.14.2",
"v0.14.1",
"v0.14.0",
"v0.13.8",
"v0.13.7",
"v0.13.6",
"v0.13.5",
"v0.13.4",
"v0.13.3",
"v0.13.2",
"v0.13.1",
"v0.13.0",
"v0.12.1",
"v0.12.0",
"v0.11.0",
"v0.10.0",
"v0.9.4",
"v0.9.3",
"v0.9.2",
"v0.9.0",
"v0.8.0",
"v0.7.0",
"v0.6.0",
"v0.5.0",
"v0.4.0",
"v0.1.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-61791.json"
}
}
],
"modified": "2026-10-31T02:30:47.354821899Z",
"provider": "osv",
"references": [
"https://github.com/schorschii/OCO-Server/releases/tag/v1.2.1",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/61xxx/CVE-2026-61791.json",
"https://github.com/schorschii/OCO-Server/security/advisories/GHSA-9c2r-9j95-22pr",
"https://nvd.nist.gov/vuln/detail/CVE-2026-61791",
"https://github.com/schorschii/OCO-Server/commit/ef02f9768e5e1792c3ee53c72e8d7e4ea58ddaa8"
],
"provider_metadata": {
"cwe_ids": [
"CWE-83"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/61xxx/CVE-2026-61791.json"
}
},
"related_cves": [
{
"value": "CVE-2026-61791",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 494408,
"published_at": "2026-10-22T14:55:54.269+00:00"
}