Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
Back to intelligence
endpoint-software-vulnerabilitywidely-deployed-product-advisorypatch-regressionproof-of-concept-release

Vim Python Omni-Completion Flaws Enable Local Code Execution

Updated 11d agoFirst seen May 29, 20264 sources

Vim disclosed two medium-severity local code execution flaws in its Python omni-completion feature that can run attacker-controlled code when a user opens a malicious Python file and manually triggers completion, such as with CTRL-X CTRL-O. The first issue affects versions before 9.2.0561 and stems from the completer re-executing harvested import statements, which can load attacker-controlled sibling modules from the working directory in builds compiled with +python3 or legacy +python and with filetype plugins enabled. Vim fixed that behavior in patch 9.2.0561 by disabling execution of harvested imports by default and allowing trusted users to re-enable it with g:pythoncomplete_allow_import = 1.

A second flaw, later assigned CVE-2026-52860, affects versions before 9.2.0597 and bypasses that earlier mitigation because Vim reconstructs Python function and class definitions from the current buffer and executes them with exec(). That allows attacker-controlled default values, annotations, and class base expressions to run inside the user's Vim process when omni-completion is invoked, including by plugins that call the completion function. Vim said the issue does not affect builds without Python support and released patch 9.2.0597; the disclosures credit tonghuaroot for the earlier bug and DavidCarliez for reporting and analyzing the later exec()-based issue.

Share:
Vim Python Omni-Completion Flaws Enable Local Code Execution
Stay ahead

Get ahead of threats like this

Mallory correlates global threat intelligence with your attack surface — know if you’re exposed before adversaries strike.

EVENT TIMELINE

How this story unfolded

2 events from the most recent confirmed update back to the earliest known activity.

2 EVENTS
Jun 4, 202619d ago

Vim discloses second Python omni-completion RCE fixed in v9.2.597

Vim disclosed a second medium-severity arbitrary code execution vulnerability affecting versions earlier than 9.2.597, where Python omni-completion reconstructs definitions from the current buffer and executes them with exec(), allowing attacker-controlled expressions to run. The issue was fixed in patch v9.2.597, and the advisory noted the earlier g:pythoncomplete_allow_import mitigation did not prevent this attack path.

oss-sec: [vim-security] Arbitrary Code Execution via Python Omni-Completion in Vim < 9.2.597
May 29, 202625d ago

Vim fixes Python omni-completion import execution flaw in v9.2.0561

A medium-severity arbitrary local code execution vulnerability in Vim's Python omni-completion was disclosed for versions prior to 9.2.0561. Vim fixed the issue in patch v9.2.0561 by disabling execution of harvested import statements by default, and credited GitHub user tonghuaroot with reporting, analysis, a proof of concept, and a suggested fix.

oss-sec: [vim-security] Arbitrary Code Execution via Python Omni-Completion in Vim < 9.2.561
LINKED ENTITIES

Related entities

Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.

5 LINKEDOpen in app
Affected products
2 linked
VimVim
Organizations
2 linked
Vim projectGitHub
The operational view lives in Mallory

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t — which of your assets are affected, which threat actors are using it right now, which detections to deploy, and what to do next.
Exposure mapping

Map indicators from this story to your assets and identify affected systems in minutes.

Threat actor evidence

Every observed campaign, victim, and pivot linked to actors named in this story.

Associated malware

Malware, exploits, and IOCs connected to the activity described here.

Detection signatures

YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.

Scheduled alerts

Get matching new stories delivered to your team as they break — not the next morning.

AI threads

Ask questions about this story and take action on the answers.

Vim Python Omni-Completion Flaws Enable Local Code Execution | Mallory