CVE-2025-49809 in mtrinfo

Summary

by MITRE • 07/04/2025

mtr through 0.95, in certain privileged contexts, mishandles execution of a program specified by the MTR_PACKET environment variable. NOTE: mtr on macOS may often have Sudo rules, as an indirect consequence of Homebrew not installing setuid binaries.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 08/01/2025

The vulnerability identified as CVE-2025-49809 affects the mtr network diagnostic tool version 0.95 and earlier, presenting a significant security risk in privileged execution contexts. This flaw specifically relates to how mtr processes the MTR_PACKET environment variable, which is designed to specify an alternative packet generation program for network testing. The issue arises when mtr operates with elevated privileges, creating potential attack vectors for privilege escalation and arbitrary code execution.

The technical root cause of this vulnerability stems from improper handling of environment variable manipulation within the mtr execution flow. When mtr runs with elevated privileges, typically through sudo rules or setuid contexts, it inherits and processes the MTR_PACKET environment variable without adequate sanitization or validation. This behavior creates a path for malicious actors to inject arbitrary programs or commands through the environment variable, potentially leading to unauthorized code execution with the privileges of the mtr process itself. The vulnerability is particularly concerning because it leverages the inherent trust placed in the mtr tool's execution environment, making it difficult to detect and prevent through conventional security measures.

The operational impact of CVE-2025-49809 extends beyond simple privilege escalation, as it can enable attackers to perform comprehensive system compromise operations. In macOS environments where Homebrew installations often include sudo rules for mtr, this vulnerability becomes even more critical since the tool frequently runs with elevated permissions. Attackers could potentially exploit this to execute malicious payloads, establish persistence mechanisms, or escalate privileges to gain full system control. The vulnerability affects not only local privilege escalation scenarios but also remote attack vectors where mtr might be invoked through network services or automated systems that process user input through environment variables.

Security practitioners should consider this vulnerability in the context of CWE-78 and CWE-74, which address improper neutralization of special elements used in OS commands and injection flaws in environment variables respectively. The ATT&CK framework categorizes this as a privilege escalation technique through environment variable manipulation, specifically falling under the T1548.003 sub-technique for abuse of sudo rules and T1059 for execution through command and scripting interpreters. Mitigation strategies should include immediate patching of mtr to version 0.96 or later, where the environment variable handling has been properly addressed. Additionally, system administrators should audit and remove unnecessary sudo rules for mtr, implement proper environment variable sanitization, and consider restricting the execution of mtr in privileged contexts where possible. Regular security monitoring should also be implemented to detect unauthorized modifications to environment variables or unexpected execution patterns that might indicate exploitation attempts.

Responsible

MITRE

Reservation

06/11/2025

Disclosure

07/04/2025

Moderation

accepted

EPSS

0.00175

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!