CVE-2005-1740 in net-snmpinfo

Summary

by MITRE

fixproc in Net-snmp 5.x before 5.2.1-r1 creates temporary files insecurely, which allows local users to modify the contents of those files to execute arbitrary commands, or overwrite arbitrary files via a symlink attack.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 07/03/2019

The vulnerability identified as CVE-2005-1740 affects the fixproc component within Net-snmp versions 5.x prior to 5.2.1-r1, representing a critical insecure temporary file creation flaw that enables local privilege escalation through symlink attacks. This vulnerability resides in the manner in which the fixproc utility handles temporary file creation, creating a path that adversaries can exploit to gain unauthorized access to system resources and execute malicious code with elevated privileges.

The technical flaw manifests in the insecure creation of temporary files by the fixproc utility, which does not properly validate or secure the temporary file paths before creating them. This insecure practice creates a race condition vulnerability that allows local attackers to establish symbolic links in the expected temporary file locations, effectively redirecting the write operations to arbitrary files on the system. The vulnerability specifically targets the temporary file creation process where the utility creates files without proper permissions or atomic operations, making it susceptible to manipulation through symlink attacks.

The operational impact of this vulnerability is significant as it allows local users to execute arbitrary commands with the privileges of the process running fixproc, potentially leading to complete system compromise. Attackers can leverage this weakness to overwrite critical system files, inject malicious code into legitimate processes, or escalate privileges to gain root access. The vulnerability affects systems where Net-snmp is installed and running with sufficient privileges to create temporary files, making it particularly dangerous in environments where the service runs with elevated permissions.

This vulnerability maps directly to CWE-377: Insecure Temporary File and CWE-378: Creation of Temporary File With Insecure Permissions, both of which are categorized under the broader weakness of insecure file handling practices in software development. The attack vector aligns with ATT&CK technique T1059.007 for Command and Scripting Interpreter: PowerShell and T1548.001 for Abuse of Functionality, as attackers can leverage the compromised process to execute malicious commands. The vulnerability also corresponds to ATT&CK technique T1078.002 for Valid Accounts: Domain Accounts, as the exploitation typically occurs through legitimate system accounts with appropriate permissions.

Mitigation strategies for this vulnerability include immediately upgrading to Net-snmp version 5.2.1-r1 or later, which contains the necessary patches to address the insecure temporary file creation behavior. System administrators should also implement proper file permission controls and ensure that temporary file directories have restricted write permissions. Additional protective measures include monitoring for suspicious symbolic link creation patterns in temporary directories and implementing mandatory access controls through security modules like SELinux or AppArmor. The vulnerability highlights the importance of secure coding practices in system utilities, particularly when dealing with temporary file operations, and serves as a reminder of the critical need for proper input validation and atomic file creation methods in security-sensitive applications.

Reservation

05/24/2005

Disclosure

05/24/2005

Moderation

accepted

Entry

VDB-1509

CPE

ready

EPSS

0.08640

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!