CVE-2026-33718 Details
Description
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.
A command injection vulnerability has been identified in OpenHands versions through 1.4.0. The issue arises in the 'get_git_diff()' method, where the 'path' parameter from the '/api/conversations/{conversation_id}/git/diff' endpoint is passed to a shell command without proper sanitization. This flaw allows authenticated attackers to execute arbitrary commands within the agent sandbox, bypassing normal execution channels. The vulnerability is rooted in inadequate input validation, enabling attackers to manipulate command execution with shell metacharacters.
Users should update to OpenHands version 1.5.0 or later, which addresses the vulnerability by properly sanitizing the 'path' parameter before it is used in shell commands.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 27, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://docs.python.org/3/library/shlex.html#shlex.quote | [email protected] | Technical Description |
| https://docs.python.org/3/library/subprocess.html#security-considerations | [email protected] | Technical Description |
| https://github.com/OpenHands/OpenHands/pull/13051 | [email protected] | Issue TrackingPatch |
| https://github.com/OpenHands/OpenHands/security/advisories/GHSA-7h8w-hj9j-8rjw | [email protected] | ExploitMitigationVendor Advisory |
| https://owasp.org/www-community/attacks/Command_Injection | [email protected] | Technical Description |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| openhands openhands | < 1.5.0 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 10, 2026 | Initial Analysis | [email protected] |
| Mar 27, 2026 | New CVE Received | [email protected] |