OpenHands is software for AI-driven development. Starting in version 1.5.0, a Command Injection vulnerability exists in the `get_git_diff()` method at `openhands/runtime/utils/git_handler.py:134`. The `path` parameter from the `/api/conversations/{conversation_id}/git/diff` API endpoint is passed unsanitized to a shell command, allowing authenticated attackers to execute arbitrary commands in the agent sandbox. The user is already allowed to instruct the agent to execute commands, but this bypasses the normal channels. Version 1.5.0 fixes the issue.
References
| Link | Resource |
|---|---|
| https://docs.python.org/3/library/shlex.html#shlex.quote | Technical Description |
| https://docs.python.org/3/library/subprocess.html#security-considerations | Technical Description |
| https://github.com/OpenHands/OpenHands/pull/13051 | Issue Tracking Patch |
| https://github.com/OpenHands/OpenHands/security/advisories/GHSA-7h8w-hj9j-8rjw | Exploit Mitigation Vendor Advisory |
| https://owasp.org/www-community/attacks/Command_Injection | Technical Description |
Configurations
History
10 Apr 2026, 15:23
| Type | Values Removed | Values Added |
|---|---|---|
| First Time |
Openhands openhands
Openhands |
|
| CPE | cpe:2.3:a:openhands:openhands:*:*:*:*:*:python:*:* | |
| References | () https://docs.python.org/3/library/shlex.html#shlex.quote - Technical Description | |
| References | () https://docs.python.org/3/library/subprocess.html#security-considerations - Technical Description | |
| References | () https://github.com/OpenHands/OpenHands/pull/13051 - Issue Tracking, Patch | |
| References | () https://github.com/OpenHands/OpenHands/security/advisories/GHSA-7h8w-hj9j-8rjw - Exploit, Mitigation, Vendor Advisory | |
| References | () https://owasp.org/www-community/attacks/Command_Injection - Technical Description |
30 Mar 2026, 13:26
| Type | Values Removed | Values Added |
|---|---|---|
| Summary |
|
27 Mar 2026, 01:16
| Type | Values Removed | Values Added |
|---|---|---|
| New CVE |
Information
Published : 2026-03-27 01:16
Updated : 2026-04-10 15:23
NVD link : CVE-2026-33718
Mitre link : CVE-2026-33718
CVE.ORG link : CVE-2026-33718
JSON object : View
Products Affected
openhands
- openhands
CWE
CWE-78
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
