CVE-2004-1138: VIM before 6.3 and gVim before 6.3 allow local users to execute arbitrary commands via a file containing a cra
CVE-2004-1138 is a high-severity flaw (CVSS 7.2) affecting vim. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
VIM before 6.3 and gVim before 6.3 allow local users to execute arbitrary commands via a file containing a crafted modeline that is executed when the file is viewed using options such as (1) termcap, (2) printdevice, (3) titleold, (4) filetype, (5) syntax, (6) backupext, (7) keymap, (8) patchmode, or (9) langmenu.
Why this priority
- High severity
No fix is published yet: follow the downgrade or mitigation steps.
Risk facts
| CVSS score | 7.2 (High) |
| EPSS exploit chance | 0.4% (top 65%) |
| CISA exploited list | No |
| Published | 2005-01-10 |
| Last modified | 2026-06-16 |
Last updated 2026-06-16 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2004-1138?
vim: downgrade or apply the listed mitigation. Exact commands for each OS are on this page.
Is CVE-2004-1138 being exploited?
CVE-2004-1138 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2004-1138 affect?
CVE-2004-1138 affects vim. Severity is high (CVSS 7.2). VIM before 6.3 and gVim before 6.3 allow local users to execute arbitrary commands via a file containing a crafted modeline that is executed when the file is viewed using options such as (1) termcap, (2) printdevice, (3) titleold, (4) filet
How urgent is CVE-2004-1138?
Priority 34/100. High severity
Software pages
Related CVEs
- CVE-2022-3235 HIGH 7.8 UPGRADE MITIGATE Use After Free in GitHub repository vim/vim prior to 9.0.0490.
- CVE-2022-3234 HIGH 7.8 UPGRADE MITIGATE Heap-based Buffer Overflow in GitHub repository vim/vim prior to 9.0.0483.
- CVE-2022-3153 MEDIUM 5.5 UPGRADE NULL Pointer Dereference in GitHub repository vim/vim prior to 9.0.0404.
- CVE-2022-3134 HIGH 7.8 UPGRADE UPGRADE Use After Free in GitHub repository vim/vim prior to 9.0.0389.
- CVE-2022-3099 HIGH 7.8 UPGRADE MITIGATE Use After Free in GitHub repository vim/vim prior to 9.0.0360.