# CVE-2026-40502: HKUDS OpenHarness command injection in gateway handler

Source: https://junglewise.ai/threats/cve-2026-40502-hkuds-openharness-command-injection-in-gateway-handler  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-16. Updated: 2026-07-14  
License: CC BY 4.0 with a link back

CVE-2026-40502 · Severity: high · CVSS 8.8 · Published 2026-04-16

OpenHarness, an AI development and testing framework, contains a security flaw in how it handles remote chat commands. An attacker with basic chat access can bypass security restrictions to execute administrative commands, such as changing the system's permission modes. This could allow unauthorized users to disable safety boundaries, potentially leading to full system compromise or unauthorized data access.

Technologies: [HKUDS OpenHarness](https://junglewise.ai/threats/technologies/openharness). Vendors: [HKUDS](https://junglewise.ai/threats/vendors/hkuds).

## Quick answers

**Is CVE-2026-40502 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-40502 being exploited in the wild.

**How severe is CVE-2026-40502?** High severity, with a CVSS score of 8.8, published 16 April 2026.

**Which products and versions are affected?** HKUDS OpenHarness prior to commit dd1d235450dd987b20bff01b7bfb02fe8620a0af.

**Is there a fix for CVE-2026-40502?** A patch was published on 2026-04-13: Fix committed to main branch (dd1d235) Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-40502 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-40502?** Check whether you run HKUDS OpenHarness at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A command injection vulnerability exists in OpenHarness due to insufficient authorization checks in the gateway handler (CWE-862). The application fails to properly isolate administrative 'slash commands' (like /permissions) from remote chat interfaces, treating them as safe for remote execution by default. A remote attacker with low-privileged chat access can send specially crafted messages to invoke these commands, effectively escalating their privileges to modify the running instance's configuration or safety modes. The vulnerability was addressed in commit dd1d235 by implementing a default-deny policy for administrative commands and requiring an explicit opt-in allowlist for remote administrative access.

## Affected products

- HKUDS OpenHarness prior to commit dd1d235450dd987b20bff01b7bfb02fe8620a0af

## Timeline

- 2026-04-12: other: Vulnerability reported via GitHub Pull Request #127
- 2026-04-13: patched: Fix committed to main branch (dd1d235)
- 2026-04-16: disclosed: CVE published to NVD

## References

- [https://github.com/HKUDS/OpenHarness/commit/dd1d235450dd987b20bff01b7bfb02fe8620a0af](https://github.com/HKUDS/OpenHarness/commit/dd1d235450dd987b20bff01b7bfb02fe8620a0af)
- [https://github.com/HKUDS/OpenHarness/pull/127](https://github.com/HKUDS/OpenHarness/pull/127)
- [https://www.vulncheck.com/advisories/openharness-remote-administrative-command-injection-via-gateway-handler](https://www.vulncheck.com/advisories/openharness-remote-administrative-command-injection-via-gateway-handler)

## Related threats

- [HKUDS OpenHarness prompt injection via slash commands](https://junglewise.ai/threats/cve-2026-56696-hkuds-openharness-prompt-injection-via-slash-commands)
- [HKUDS OpenHarness missing authorization in ohmo gateway slash commands](https://junglewise.ai/threats/cve-2026-56695-hkuds-openharness-missing-authorization-in-ohmo-gateway-slash)
- [HKUDS OpenHarness contains a remote code execution vulnerability in the /bridge slash command that allows remote…](https://junglewise.ai/threats/cve-2026-7551-hkuds-openharness-contains-a-remote-code-execution-vulnerability)
- [HKUDS OpenHarness prior to PR #147 remediation contains an insecure default configuration vulnerability where remote…](https://junglewise.ai/threats/cve-2026-6823-hkuds-openharness-prior-to-pr-147-remediation-contains-an-insecure)
- [HKUDS OpenHarness prior to PR #156 remediation exposes plugin lifecycle commands including /plugin install, /plugin…](https://junglewise.ai/threats/cve-2026-6819-hkuds-openharness-prior-to-pr-156-remediation-exposes-plugin)
