Description
vim before patch 8.0.0056 does not properly validate values for the 'filetype', 'syntax' and 'keymap' options, which may result in the execution of arbitrary code if a file with a specially crafted modeline is opened.
In plain language
AI Worth attentionCVE-2016-1248 is a Vim bug where opening a carefully crafted text file can trick Vim into running arbitrary code via “modeline” settings; most small businesses should treat this as a medium-term risk and update Vim if you use it to open files from untrusted sources.
CVE-2016-1248 is a Vim input-validation flaw (CWE-20) in how “filetype”, “syntax”, and “keymap” modeline values are validated; a specially crafted modeline in a text file can lead to arbitrary code execution when the file is opened in Vim, and the fixed version is 8.0.0056.
What to do now
- Check which Vim you run (for example, run
vim --version) and confirm whether it is older than 8.0.0056. - If your Vim version is older than 8.0.0056, plan an upgrade to Vim 8.0.0056 or later.
- Pay special attention to workflows where staff open files from outside your organization (email attachments, downloaded archives, shared documents) in Vim, and restrict that if possible until you upgrade.
- After upgrading, test that your usual Vim usage still works (especially any reliance on modelines or filetype/syntax auto-detection) and remove any unusually configured modeline behavior if you had it customized.
CVSS Vector Breakdown
AV:LAttack VectorAC:LAttack ComplexityPR:NPrivileges RequiredUI:RUser InteractionS:UScopeC:HConfidentialityI:HIntegrityA:HAvailabilityWeaknesses
Affected Products
Exploitability
Attack Graph
Click technique nodes for MITRE ATT&CK details · drag to pan · Ctrl/⌘ + scroll to zoom, or go fullscreen.
MITRE ATT&CK
1 techniqueReferences
Unlock Complete Vulnerability Intelligence
Get the full picture for CVE-2016-1248 and every CVE in our database. Create a free account — no credit card required.
Create Free Account