CVE-2025-48395
Executive Summary
CVE-2025-48395 is a path traversal vulnerability in the limited shell of the Command Line Interface (CLI) of Eaton Network Management Card (NMC) G2 devices. An attacker with authenticated and privileged access can exploit this flaw to modify the contents of a non-sensitive file by traversing the path. The vulnerability has a CVSS score of 4.7 (Medium), indicating a moderate risk due to the requirement for high privileges and local access. The vendor, Eaton, has released a fix in the latest version of NMC G2, available on their download center.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to NPM, PyPI, Go, or Ruby packages. It affects Eaton's proprietary firmware for network management cards.
CVSS Breakdown & Threat Level
- CVSS Score: 4.7 (Medium)
- Vector: CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:N
- Attack Vector (AV): Local (L) – The attacker must have local access to the device's CLI.
- Attack Complexity (AC): Low (L) – No special conditions are required for exploitation.
- Privileges Required (PR): High (H) – The attacker must have authenticated and privileged access.
- User Interaction (UI): None (N) – No user interaction is required.
- Scope (S): Unchanged (U) – The vulnerability does not affect resources beyond the vulnerable component.
- Confidentiality (C): None (N) – No impact on data confidentiality.
- Integrity (I): Low (L) – The attacker can modify non-sensitive files.
- Availability (A): None (N) – No impact on system availability.
Threat Level: Medium. The requirement for high privileges significantly reduces the attack surface, but once obtained, exploitation is straightforward.
Deep Dive & Mechanics
The vulnerability resides in the limited shell of the CLI on Eaton NMC G2 devices. The shell is designed to restrict user commands to a predefined set, but it fails to properly sanitize file path inputs. By using path traversal sequences (e.g., ../), an authenticated privileged user can escape the intended directory and modify files outside the allowed scope.
Root Cause: Insufficient input validation in the CLI's file handling functions. The shell does not check for directory traversal patterns before processing file operations.
Attack Flow:
- The attacker gains authenticated privileged access to the NMC G2 CLI (e.g., via default credentials or a separate compromise).
- The attacker issues a command that accepts a file path, such as
editorwrite. - The attacker includes path traversal sequences (e.g.,
../../etc/passwd) to target a file outside the intended directory. - The shell processes the request and modifies the target file.
Impact: The attacker can modify non-sensitive files, potentially altering device configuration or logs. While the description states "non-sensitive," this could still lead to operational disruption or serve as a stepping stone for further attacks.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
void handle_file_command(char *user_path) {
char full_path[256];
snprintf(full_path, sizeof(full_path), "/allowed/dir/%s", user_path);
// No validation of user_path for traversal sequences
modify_file(full_path);
}
Patched Code (Conceptual):
void handle_file_command(char *user_path) {
char full_path[256];
// Validate and sanitize input
if (strstr(user_path, "..") != NULL || strchr(user_path, '/') != NULL) {
printf("Invalid path\n");
return;
}
snprintf(full_path, sizeof(full_path), "/allowed/dir/%s", user_path);
modify_file(full_path);
}
The patched version checks for .. and / characters in the user-supplied path, preventing directory traversal.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- Access to an Eaton NMC G2 device with CLI enabled.
- Valid privileged credentials (e.g., admin/admin).
Exploitation Steps:
- Connect to the device via SSH or serial console.
- Log in with privileged credentials.
- Identify a command that accepts a file path (e.g.,
edit,write,copy). - Execute the command with a path traversal payload:
edit ../../etc/passwd - Modify the file content as desired (e.g., add a new user).
Example Session:
$ ssh admin@192.168.1.100
Password:
NMC G2> enable
Password:
NMC G2# edit ../../etc/passwd
Enter file content:
newuser:x:1001:1001:New User:/home/newuser:/bin/sh
^D
File modified successfully.
Blue Team (Defensive)
Detection:
- Monitor CLI logs for path traversal patterns (e.g.,
../,..\\). - Alert on file modification commands targeting unexpected paths.
- Use file integrity monitoring (FIM) on critical system files.
Prevention:
- Apply the vendor patch immediately.
- Restrict CLI access to authorized personnel only.
- Enforce strong password policies and multi-factor authentication.
- Implement network segmentation to limit access to NMC devices.
Indicators of Compromise (IOCs)
- File Paths: Any file modification involving
../or..\\sequences in CLI commands. - Log Entries: CLI logs showing commands like
edit ../../etc/passwdorwrite ../../var/log/syslog. - Modified Files: Unexpected changes to system files (e.g.,
/etc/passwd,/etc/shadow,/var/log/). - Network Traffic: SSH or serial connections from unusual IP addresses or at odd hours.
Detection Engineering
YARA Rule
rule CVE_2025_48395_Path_Traversal {
meta:
description = "Detects path traversal attempts in Eaton NMC G2 CLI logs"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-48395"
strings:
$traversal1 = "../"
$traversal2 = "..\\"
$cmd1 = "edit"
$cmd2 = "write"
$cmd3 = "copy"
condition:
any of ($cmd*) and any of ($traversal*)
}
Sigma Rule
title: Eaton NMC G2 CLI Path Traversal Attempt
id: 8a4b3c2d-1e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects path traversal attempts in Eaton NMC G2 CLI logs
author: Valters IT
date: 2025-04-10
references:
- CVE-2025-48395
logsource:
product: eaton
service: nmc_g2_cli
detection:
selection:
Command|contains:
- '../'
- '..\\'
Command|startswith:
- 'edit'
- 'write'
- 'copy'
condition: selection
falsepositives:
- Legitimate use of path traversal in allowed directories (unlikely)
level: high
Suricata Rule
alert tcp $EXTERNAL_NET any -> $HOME_NET 22 (msg:"Eaton NMC G2 CLI Path Traversal Attempt"; flow:to_server,established; content:"|2e 2e 2f|"; distance:0; content:"edit|20|"; distance:0; within:100; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Update Eaton NMC G2 firmware to the latest version available on the Eaton download center.
- If patching is not immediately possible, restrict CLI access to trusted IP addresses only.
- Change all default credentials and enforce strong password policies.
Long-Term Measures:
- Implement network segmentation to isolate NMC devices from untrusted networks.
- Enable logging and monitoring of all CLI commands.
- Conduct regular security audits of device configurations.
- Subscribe to Eaton security advisories for future updates.
Valters IT Signature
This report was generated by Valters IT DevSecOps AI Assistant. For questions or support, contact security@valters-it.com.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.