Critical Vulnerability in VIM Package: Umask Ignored When Creating Swap Files

vim Updated 03 Oct 2025

Summary

31/10/2017
N/A
No i
Medium
5.5

UBUNTU-CVE-2017-1000382: VIM version 8.0.1187 (and other versions most likely) ignores umask when creating a swap file ("[ORIGINAL_FILENAME].swp") resulting in files that may be world readable or otherwise accessible in ways not intended by the... Affects vim versions 2:7.4.000-1ubuntu2 – 2:7.4.052-1ubuntu3.1+esm9. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

VIM is a highly configurable text editor built to enable efficient text editing. It is widely used by developers and system administrators for its powerful features, including syntax highlighting, multi-level undo, and extensive plugin support. However, a vulnerability has been identified in certain versions of VIM that compromises file security by ignoring the umask setting when creating swap files, potentially exposing sensitive data.

Vulnerability Detail

The vulnerability, identified as CVE-2017-1000382, arises from VIM version 8.0.1187 and possibly other versions, which fails to respect the umask setting when generating swap files. This oversight can lead to swap files being created with permissions that allow unauthorized access, making them world-readable or accessible in unintended ways. As a result, sensitive information may be exposed to other users on the system, posing a significant security risk.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can manually adjust the permissions of the swap files after they are created to restrict access. This can be done using the command: 'chmod 600 [ORIGINAL_FILENAME].swp', where [ORIGINAL_FILENAME] is the name of the file being edited.

Conclusion

The vulnerability in VIM, CVE-2017-1000382, poses a significant risk by allowing unauthorized access to swap files due to improper handling of umask settings. It is crucial for users to update their VIM installations to the latest patched versions to mitigate this risk. In the meantime, applying the suggested workaround can help secure sensitive data.

See every vulnerability recorded for vim →

Share this vulnerability

FAQ

CVE-2017-1000382 is a vulnerability in VIM that allows swap files to be created with insecure permissions, potentially exposing sensitive data.

Versions of VIM starting from 8.0.1187 and possibly earlier versions are affected by this vulnerability.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

If an immediate update is not possible, consider using the workaround to change the permissions of swap files to restrict access.

The CVSS score for this vulnerability is 5.5, indicating a moderate level of risk.

Related vulnerabilities

Recent vulnerabilities recorded for vim.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback