CVE-2025-27024
Executive Summary
CVE-2025-27024 is a critical security vulnerability in Infinera G42 network equipment running version R6.1.3. The flaw resides in the SFTP service, where authenticated users with the Network Administrator profile can bypass the intended chroot jail and access the entire OS file system. This allows for unrestricted read and write operations on OS files, leading to potential data exfiltration, configuration tampering, and lateral movement within the network. The vulnerability has a CVSS score of 6.5 (Medium), but its impact is amplified by the high privileges required and the sensitive nature of the affected device. No public exploit code or patch is currently available.
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
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N
- Base Score: 6.5 (Medium)
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): High (H) – Requires Network Administrator credentials.
- User Interaction (UI): None (N) – No user action needed.
- Scope (S): Unchanged (U) – The vulnerable component and the affected resource are the same.
- Confidentiality (C): High (H) – Complete read access to OS files.
- Integrity (I): High (H) – Complete write access to OS files.
- Availability (A): None (N) – No direct impact on availability.
Threat Level: High. While the CVSS score is Medium, the actual risk is elevated due to the high-value target (network infrastructure) and the potential for complete compromise of the device.
Deep Dive & Mechanics
The vulnerability is a classic chroot jail escape combined with insufficient access control. The Infinera G42 SFTP service is designed to restrict authenticated users to a specific directory (chroot jail) for file transfers. However, due to a misconfiguration or a flaw in the chroot implementation, the SFTP service does not properly enforce this restriction.
Root Cause: The SFTP service uses the same authentication credentials as the SSH CLI. When a Network Administrator connects via SFTP, the service fails to apply the chroot jail correctly. Instead, it grants access to the root filesystem (/), allowing the user to navigate and manipulate any file that the OS permissions allow.
Attack Flow:
- Authentication: An attacker obtains valid Network Administrator credentials (e.g., through phishing, credential stuffing, or insider threat).
- SFTP Connection: The attacker connects to the Infinera G42 on port 22 (SFTP) using these credentials.
- Chroot Bypass: The SFTP session is not confined to the intended directory. The attacker can use commands like
cd /andlsto browse the entire filesystem. - File Operations: The attacker can read sensitive configuration files (e.g.,
/etc/passwd,/etc/shadow, network configs), write malicious scripts, or modify system binaries. - Persistence & Lateral Movement: The attacker can plant backdoors, create new user accounts, or pivot to other devices on the network.
Vulnerable vs. Patched Code
No patch is currently available. The vulnerable code is likely in the SFTP server configuration or the chroot implementation within the Infinera G42 firmware.
Vulnerable (R6.1.3):
# SFTP server configuration (likely in /etc/ssh/sshd_config or similar)
Subsystem sftp /usr/lib/openssh/sftp-server
# Missing or incorrect ChrootDirectory directive for Network Admin users
Expected Patched Behavior:
# Correct SFTP configuration with chroot
Subsystem sftp internal-sftp
Match Group network-admin
ChrootDirectory /home/sftp/%u
ForceCommand internal-sftp
X11Forwarding no
AllowTcpForwarding no
The patch would enforce a strict chroot jail for all SFTP users, ensuring they cannot escape to the root filesystem.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- Valid Network Administrator credentials (username/password).
- Network access to the Infinera G42 (port 22).
Exploitation Steps:
- Connect via SFTP:
sftp networkadmin@<target_ip> - Verify Chroot Bypass:
If you see the root filesystem (e.g.,sftp> pwd Remote working directory: / sftp> ls -la /bin,etc,usr), the chroot is bypassed. - Read Sensitive Files:
sftp> get /etc/shadow sftp> get /etc/ssh/sshd_config - Write Malicious Payload:
sftp> put malicious_script.sh /tmp/ - Execute via SSH (if possible):
ssh networkadmin@<target_ip> "bash /tmp/malicious_script.sh"
No public exploit code is available. The above steps demonstrate the manual exploitation process.
Blue Team (Detection & Hardening)
Detection:
- Monitor SFTP sessions for unusual directory traversal (e.g.,
cd /,cd ..). - Alert on SFTP connections from unexpected IP addresses or at unusual times.
- Log all SFTP file operations and correlate with known user behavior.
Hardening (until patch is available):
- Restrict SFTP Access: Limit SFTP access to only necessary users and from trusted IPs.
# In /etc/ssh/sshd_config Match Address 192.168.1.0/24 AllowUsers networkadmin - Use a Separate SFTP Server: Consider using a dedicated SFTP server (e.g., vsftpd) with proper chroot configuration.
- Enable Auditing: Use
auditdto monitor file access and system calls.auditctl -w /etc/ -p wa -k etc_changes auditctl -w /bin/ -p wa -k bin_changes - Implement MFA: Require multi-factor authentication for SSH/SFTP access.
- Network Segmentation: Place the Infinera G42 in a separate VLAN with strict firewall rules.
Indicators of Compromise (IOCs)
Network IOCs:
- SFTP connections from unusual IP addresses (e.g., external IPs, non-management subnets).
- Multiple failed SFTP login attempts followed by successful login.
- Large file transfers from the device (e.g., configuration dumps).
File System IOCs:
- Unexpected files in
/tmp/or/var/tmp/. - Modified system binaries (e.g.,
/bin/ls,/usr/bin/ssh). - New user accounts in
/etc/passwdor/etc/shadow. - Unauthorized SSH keys in
/root/.ssh/authorized_keys.
- Unexpected files in
Log IOCs:
- SFTP log entries showing directory traversal outside the expected chroot.
- SSH log entries with unusual command execution (e.g.,
bash,wget,curl).
Detection Engineering
YARA Rule
rule CVE_2025_27024_SFTP_Chroot_Escape {
meta:
description = "Detects SFTP chroot escape attempts on Infinera G42"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-27024"
strings:
$sftp_cd_root = "cd /" ascii wide nocase
$sftp_ls_root = "ls -la /" ascii wide nocase
$sftp_get_etc = "get /etc/" ascii wide nocase
$sftp_put_tmp = "put " ascii wide nocase
condition:
any of ($sftp_*) and filesize < 10KB
}
Sigma Rule
title: Infinera G42 SFTP Chroot Escape
id: 8a4b3c2d-1e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects SFTP commands indicating chroot jail escape on Infinera G42
author: Valters IT
date: 2025-04-10
references:
- CVE-2025-27024
logsource:
product: linux
service: sshd
detection:
selection:
EventID: 6000 # SFTP session log
Message|contains:
- 'cd /'
- 'ls -la /'
- 'get /etc/'
- 'put '
condition: selection
falsepositives:
- Legitimate administrative tasks (rare)
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET 22 (msg:"CVE-2025-27024 Infinera G42 SFTP Chroot Escape Attempt"; flow:to_server,established; content:"SSH-2.0-"; depth:6; content:"sftp"; within:10; content:"cd /"; within:100; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Isolate Affected Devices: If possible, disconnect the Infinera G42 from the network or place it behind a strict firewall.
- Change Credentials: Immediately change all Network Administrator passwords.
- Audit User Accounts: Review and remove any unnecessary or suspicious user accounts.
- Monitor Logs: Enable detailed logging for SSH and SFTP and review for any signs of exploitation.
Long-Term Fix:
- Vendor Patch: Await an official firmware update from Infinera. Contact Infinera support for an ETA.
- Workaround: If a patch is not available, consider disabling SFTP and using a secure alternative (e.g., SCP with restricted commands) or implementing a third-party SFTP server with proper chroot support.
Valters IT
Securing Your Digital Frontier
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.