CVE-2001-1562 in nviinfo

Summary

by MITRE

Format string vulnerability in nvi before 1.79 allows local users to gain privileges via format string specifiers in a filename.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 10/21/2024

The vulnerability described in CVE-2001-1562 represents a critical format string flaw in the nvi text editor version 1.78 and earlier. This vulnerability exists within the filename handling mechanism of the nvi editor, which is a widely used vi-compatible text editor in unix-like operating systems. The flaw stems from improper input validation and handling of user-supplied data when processing filenames, creating an exploitable condition that can be leveraged by local attackers to execute arbitrary code with elevated privileges.

The technical implementation of this vulnerability occurs when nvi processes filenames containing format string specifiers such as %s, %d, or %x within the file path. When the editor attempts to display or process these filenames, it fails to properly sanitize the input before passing it to functions like printf or similar formatting routines. This improper handling allows attackers to inject malicious format specifiers that can cause the program to read from memory locations or write to arbitrary memory addresses. The vulnerability specifically affects the local privilege escalation aspect because nvi often runs with elevated privileges, particularly when used in system contexts or when invoked by privileged users.

The operational impact of this vulnerability is significant as it enables local attackers to escalate their privileges from regular user level to root or administrative privileges. Attackers can exploit this by creating specially crafted filenames that contain format string specifiers, which when processed by nvi, can lead to information disclosure, stack corruption, or arbitrary code execution. The vulnerability is particularly dangerous because nvi is commonly installed system-wide and often used with elevated privileges, making it an attractive target for privilege escalation attacks. This flaw can be exploited in various scenarios including when users edit files in directories where they have write access, or when nvi is used in setuid contexts.

Mitigation strategies for this vulnerability should focus on immediate patching of the nvi editor to version 1.79 or later where the format string handling has been properly addressed. System administrators should also implement proper input validation and sanitization measures to prevent format string specifiers from being processed in filename inputs. The vulnerability aligns with CWE-134 which specifically addresses the use of format strings in a context that can be controlled by an attacker, and it maps to ATT&CK technique T1068 which covers privilege escalation through local exploits. Additional defensive measures include implementing proper file permissions, monitoring for suspicious file creation patterns, and ensuring that all system utilities are kept up to date with the latest security patches to prevent exploitation of known vulnerabilities.

Reservation

07/14/2005

Disclosure

12/31/2001

Moderation

accepted

Entry

VDB-17881

CPE

ready

EPSS

0.00047

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!