{"id":"CVE-2026-33718","published":"2026-03-27T00:12:24Z","modified":"2026-03-27T20:04:54Z","title":"OpenHands is Vulnerable to Command Injection through its Git Diff Handler","vendor":"OpenHands","product":"OpenHands","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.6,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.02193,"percentile":0.82916,"provenance":"source"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"references":[{"url":"https://github.com/OpenHands/OpenHands/security/advisories/GHSA-7h8w-hj9j-8rjw","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/OpenHands/OpenHands/pull/13051","tags":["x_refsource_MISC"]},{"url":"https://docs.python.org/3/library/shlex.html#shlex.quote","tags":["x_refsource_MISC"]},{"url":"https://docs.python.org/3/library/subprocess.html#security-considerations","tags":["x_refsource_MISC"]},{"url":"https://owasp.org/www-community/attacks/Command_Injection","tags":["x_refsource_MISC"]}],"priority":{"score":26.9,"factors":[{"name":"EPSS percentile","points":16.58},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":5.32}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-07-29","earliestUrl":"https://github.com/HORKimhab/CVE-2026-33718","repos":[{"name":"HORKimhab/CVE-2026-33718","url":"https://github.com/HORKimhab/CVE-2026-33718","stars":0,"created":"2026-07-29"}]},"first":{"date":"2026-07-29","source":"PoC-in-GitHub","url":"https://github.com/HORKimhab/CVE-2026-33718"},"provenance":"source"},"vendorSlug":"openhands","affectedVersions":[{"vendor":"OpenHands","product":"OpenHands","versions":["< 1.5.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-03-27T20:04:41.208442Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"openhands-ai","vulnerableRanges":["<1.5.0"],"patched":["1.5.0"],"from":["GHSA-7h8w-hj9j-8rjw","PYSEC-2026-106"],"provenance":"source"}],"summary":{"text":"OpenHands, an AI-driven development tool, has a command injection flaw in its get_git_diff() method (openhands/runtime/utils/git_handler.py), where the path parameter of the /api/conversations/{conversation_id}/git/diff API endpoint is passed unsanitized to a shell command. An authenticated attacker who can reach that endpoint over the network, with no user interaction required, can execute arbitrary commands inside the agent sandbox, a route that bypasses the normal instruction channel the user already has.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T05:38:17Z"},"euvd":{"id":"EUVD-2026-16500","exploited":false,"provenance":"source"}}