ZeroHour
Security Affairspublished ()ingested @securityaffairs

China-linked APT UNC3886 targets EoL Juniper routers

Vulnerabilities mentionedAll →

CVEVulnerabilityCVSSEPSSFlagsAffectedExposurePublished
CVE-2022-41328
Path Traversal in Fortinet FortiOS Exploited in Targeted Attacks

CVE-2022-41328 is a path traversal flaw (CWE-22) in Fortinet FortiOS in which the system fails to properly limit file paths, allowing crafted CLI commands to escape the restricted directory. A privileged attacker — one who already has CLI access to the device — can issue these crafted commands to read and write arbitrary files on the underlying Linux system, effectively breaking out of the FortiOS CLI sandbox. That post-compromise capability is valuable for stealth and persistence, since changes to system files on the underlying OS may not be visible through normal FortiOS administration. Organizations running FortiOS 7.2.0 through 7.2.3, 7.0.0 through 7.0.9, or any release before 6.4.11 are affected. Exploitation is confirmed in the wild: the flaw was added to CISA's Known Exploited Vulnerabilities Catalog on 2023-03-14, carries a high EPSS score (10.7% probability of exploitation within 30 days, 96th percentile), and public reporting describes its use in targeted cyberattacks on government entities attributed to the espionage group tracked as UNC3886, though no public proof-of-concept code is known.

Do: Upgrade all affected FortiGate/FortiOS devices to a fixed release beyond the affected ranges — 7.2.4 or later, 7.0.10 or later, or 6.4.11 or later — per Fortinet's advisory, as required by the CISA KEV entry. Restrict privileged CLI access (admin accounts, trusted-host/local-in policies) and review CLI logs plus the underlying Linux filesystem for unexpected file changes as signs of compromise, particularly on government or otherwise high-value networks given UNC3886 targeting.

7.111% KEV
  • Fortinet FortiOS 7.2.0 through 7.2.3
  • Fortinet FortiOS 7.0.0 through 7.0.9
  • Fortinet FortiOS all versions before 6.4.11
masshundreds of thousands of FortiGate deployments (well over 100,000 internet-facing FortiGates appear in public scans)
CVE-2025-21590
Kernel Code Injection Flaw in Juniper Junos OS Exploited in the Wild

Juniper Junos OS contains an improper isolation or compartmentalization flaw (CWE-653) in the kernel that allows a local attacker with high privileges to inject arbitrary code and compromise the integrity of the device. The issue cannot be triggered from the Junos CLI, so exploitation requires shell access, such as via a compromised or rogue high-privileged account or as part of a chained attack. Code running in the kernel gives the attacker deep control of the device, enabling persistent tampering such as backdoors or rootkits. All Junos OS releases before the listed fix versions across the 21.2 through 24.2 branches are affected, covering Juniper's routing, switching, and security product lines. The flaw was added to CISA's Known Exploited Vulnerabilities catalog on 2025-03-13, confirming exploitation in the wild, amid headlines reporting China-linked APT UNC3886 breaching Juniper routers with custom backdoors and rootkits.

Do: Upgrade affected systems to 21.2R3-S9, 21.4R3-S10, 22.2R3-S6, 22.4R3-S6, 23.2R2-S3, 23.4R2-S4, or 24.2R1-S2/24.2R2 per branch; releases older than 21.2 have no listed fix and require migration to a supported fixed release. Restrict shell/root access to trusted administrators and, given reported UNC3886 backdoor and rootkit activity on Juniper routers, audit devices for unexpected processes, modified system files, or unusual persistence in the Junos shell. U.S. federal agencies must apply the required remediation per BOD 22-01 due to the KEV listing.

6.72% KEV
  • Juniper Networks Junos OS All versions before 21.2R3-S9
  • Juniper Networks Junos OS 21.4 All 21.4 versions before 21.4R3-S10
  • Juniper Networks Junos OS 22.2 All 22.2 versions before 22.2R3-S6
  • +4 more
masson the order of 1M+ devices running affected Junos OS releases (Junos spans Juniper's global installed base of routers, switches, and firewalls at service…
Full article586 words · extracted from securityaffairs.com · click to collapse

Mandiant researchers warn that China-linked actors are deploying custom backdoors on Juniper Networks Junos OS MX routers.

In mid-2024, Mandiant identified custom backdoors on Juniper Networks’ Junos OS routers, and attributed the attacks to a China-linked espionage group tracked as UNC3886. These TINYSHELL-based backdoors had various capabilities, including active and passive access and a script to disable logging. Mandiant collaborated with Juniper Networks to investigate, finding that the affected Juniper MX routers were running outdated hardware and software, making them vulnerable to exploitation.

UNC3886 is a sophisticated China-linked cyber espionage group that targets network devices and virtualization technologies using zero-day exploits. Its primary focus is on defense, technology, and telecommunications sectors in the US and Asia.

In 2023, the APT group targeted multiple government organizations using the Fortinet zero-day CVE-2022-41328 to deploy custom backdoors.

The group’s latest operation on Juniper Networks’ Junos OS routers demonstrates a deep knowledge of system internals. UNC3886 prioritizes stealth by using passive backdoors and tampering with logs and forensic artifacts to ensure long-term persistence while evading detection.

Mandiant observed UNC3886 using compromised credentials to access Junos OS CLI from terminal servers managing network devices, escalating to FreeBSD shell mode. Junos OS includes a Verified Exec (veriexec) subsystem, adapted from NetBSD Veriexec, to ensure file integrity by preventing unauthorized code execution, including binaries, libraries, and scripts. To deploy malware, the threat actor had to first bypass this security mechanism. UNC3886 bypassed it by injecting malicious code into trusted processes. This allowed them to install six TinyShell-based backdoors named appid, to, irad, jdosd, oemd, and lmpad. Each backdoor was designed for remote access, persistence, and stealth, enabling attackers to evade detection and maintain long-term control.

“Veriexec protection prevents unauthorized binaries from executing. This poses a challenge for threat actors, as disabling veriexec can trigger alerts. However, execution of untrusted code is still possible if it occurs within the context of a trusted process. Mandiant’s investigation revealed that UNC3886 was able to circumvent this protection by injecting malicious code into the memory of a legitimate process.” reads the report published by Mandiant “This specific technique is now tracked as CVE-2025-21590, as detailed in Juniper Network’s security bulletin JSA93446.”

Below are the descriptions of the backdoors provided by Mandiant:

  1. appid – TINYSHELL-based active backdoor, mimicking a legitimate binary named appidd (Application Identification Daemon)
  2. to – TINYSHELL-based active backdoor, mimicking a legitimate binary named top (Table of Processes)
  3. irad – TINYSHELL-based passive backdoor, mimicking a legitimate binary named irsd (Interface Replication and Synchronization Daemon)
  4. lmpad – TINYSHELL-based utility and passive backdoor, mimicking a legitimate binary named lmpd (Link Management Protocol Daemon)
  5. jdosd – TINYSHELL-based passive backdoor, mimicking a legitimate binary named jddosd (Juniper DDOS protection Daemon)
  6. oemd – TINYSHELL-based passive backdoor, mimicking a legitimate binary named oamd (Operation, Administration and Maintenance Daemon)

“China-nexus espionage actors  are continuing to compromise networking infrastructure with custom malware ecosystems. While UNC3886 previously focused their operations on network edge devices, this activity demonstrated they’re also targeting internal networking infrastructure, such as Internet Service Provider (ISP) routers. Mandiant observed the threat actor targeting network authentication services, including the Terminal Access Controller Access-Control System (TACACS+), and terminal servers with access to the routers to gain privileged initial access.” concludes the report published by Mandiant. “This privileged access allowed the threat actor to enter Junos OS shell mode and perform restricted operations.”

Mandiant also provided Indicators of Compromise (IoCs) and Yara rules to detect these backdoors.

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, backdoor)



Text extracted automatically; images, tables and formatting may be missing. Original: https://securityaffairs.com/175308/apt/china-linked-apt-unc3886-targets-eol-juniper-routers.html