{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "source": "REFERENCES"
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "dd1d235450dd987b20bff01b7bfb02fe8620a0af"
            }
          ],
          "repo": "https://github.com/hkuds/openharness",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-862"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40502.json",
    "unresolved_ranges": [
      {
        "extracted_events": [
          {
            "fixed": "dd1d235450dd987b20bff01b7bfb02fe8620a0af"
          }
        ],
        "source": "AFFECTED_FIELD"
      }
    ]
  },
  "details": "OpenHarness prior to commit dd1d235 contains a command injection vulnerability that allows remote gateway users with chat access to invoke sensitive administrative commands by exploiting insufficient distinction between local-only and remote-safe commands in the gateway handler. Attackers can execute administrative commands such as /permissions full_auto through remote chat sessions to change permission modes of a running OpenHarness instance without operator authorization.",
  "id": "CVE-2026-40502",
  "modified": "2026-07-15T01:48:56.243314135Z",
  "published": "2026-04-16T00:08:34.463Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40502.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40502"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/openharness-remote-administrative-command-injection-via-gateway-handler"
    },
    {
      "type": "REPORT",
      "url": "https://github.com/HKUDS/OpenHarness/pull/127"
    },
    {
      "type": "FIX",
      "url": "https://github.com/HKUDS/OpenHarness/commit/dd1d235450dd987b20bff01b7bfb02fe8620a0af"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/HKUDS/OpenHarness"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "OpenHarness Remote Administrative Command Injection via Gateway Handler"
}