Skip to content

potential code execution with tar.vim and special crafted tar files in Vim < 9.1.1164

High
chrisbra published GHSA-wfmf-8626-q3r3 Mar 2, 2025

Package

Vim

Affected versions

Vim < 9.1.1164

Patched versions

9.1.1164

Description

potential code execution with tar.vim and special crafted tar files

Date: 02.03.2025
Severity: High
CVE: CVE-2025-27423
CWE: Improper Input Validation (CWE-20)

Summary

potential code execution with tar.vim and special crafted tar files

Description

Vim is distributed with the tar.vim plugin, that allows easy editing and
viewing of (compressed or uncompressed) tar files.

Since commit 129a844
(Nov 11, 2024 runtime(tar): Update tar.vim to support permissions), the
tar.vim plugin uses the ":read " ex command line to append
below the cursor position, however the is not sanitized and is
taken literaly from the tar archive. This allows to execute shell
commands via special crafted tar archives. Whether this really happens,
depends on the shell being used ('shell' option, which is set using
$SHELL).

Impact

Impact is high but a user must be convinced to edit such a file using
Vim which will reveal the filename, so a careful user may suspect some
strange things going on.

The Vim project would like to thank @Ry0taK (GMO Flatt Security Inc) for reporting this issue.

The issue has been fixed as of Vim patch v9.1.1164

Commit
Github Advisory

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

CVE ID

CVE-2025-27423

Weaknesses

Improper Input Validation

The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. Learn more on MITRE.

Credits