CVE-2026-33718

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.
Configurations

Configuration 1 (hide)

cpe:2.3:a:openhands:openhands:*:*:*:*:*:python:*:*

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 - () https://docs.python.org/3/library/shlex.html#shlex.quote - Technical Description
References () https://docs.python.org/3/library/subprocess.html#security-considerations - () https://docs.python.org/3/library/subprocess.html#security-considerations - Technical Description
References () https://github.com/OpenHands/OpenHands/pull/13051 - () https://github.com/OpenHands/OpenHands/pull/13051 - Issue Tracking, Patch
References () https://github.com/OpenHands/OpenHands/security/advisories/GHSA-7h8w-hj9j-8rjw - () https://github.com/OpenHands/OpenHands/security/advisories/GHSA-7h8w-hj9j-8rjw - Exploit, Mitigation, Vendor Advisory
References () https://owasp.org/www-community/attacks/Command_Injection - () https://owasp.org/www-community/attacks/Command_Injection - Technical Description

30 Mar 2026, 13:26

Type Values Removed Values Added
Summary
  • (es) OpenHands es un software para el desarrollo impulsado por IA. A partir de la versión 1.5.0, existe una vulnerabilidad de inyección de comandos en el método 'get_git_diff()' en 'openhands/runtime/utils/git_handler.py:134'. El parámetro 'path' del endpoint de API '/api/conversations/{conversation_id}/git/diff' se pasa sin sanear a un comando de shell, permitiendo a atacantes autenticados ejecutar comandos arbitrarios en el sandbox del agente. Al usuario ya se le permite instruir al agente para ejecutar comandos, pero esto elude los canales normales. La versión 1.5.0 corrige el problema.

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')