vendor:
top
by:
truefinder
7.5
CVSS
HIGH
Format String Vulnerability
134
CWE
Product Name: top
Affected Version From: top-3.5beta9
Affected Version To: Unknown
Patch Exists: NO
Related CWE: Unknown
CPE: a:goupsys:top:3.5beta9
Platforms Tested: FreeBSD
Unknown
top format-string vulnerability
The top program contains a format-string vulnerability that may lead to a compromise of effective groupid kmem on BSD systems (or similar privileges on other systems). The problem occurs in the printing of error messages to a user's terminal. A string partially composed of user input (the error message) is passed to a printf() function as the format string argument, allowing malicious format specifiers in user input to corrupt stack variables and execute arbitrary code. If a malicious user gains egid kmem, vital information can be read from the kernel memory that may lead to a further elevation of privileges (most certainly root eventually).
Mitigation:
Apply the latest patches or updates from the vendor to fix the format-string vulnerability in the top program. Avoid running the top program with elevated privileges.