CVE-2026-138341 — Smb4K Project Smb4k — CWE-424
In KDE Smb4K before 4.0.7, the mount helper allows mounting shares with an SMB protocol version before 2.1 (e.g., version 1). NOTE: this issue exists because of an incomplete fix for CVE-2025-66003.
In KDE Smb4K before 4.0.7, the mount helper allows mounting shares with an SMB protocol version before 2.1 (e.g., version 1). NOTE: this issue exists because of an incomplete fix for CVE-2025-66003.
🎯 What is this vulnerability?
Technical flaw
Smb4K is a KDE front‑end for the SMB/CIFS protocol. The mount helper is the component that negotiates the SMB protocol version with the target server before mounting a share. In versions < 4.0.7 the helper contains an incomplete fix for the earlier CVE‑2025‑66003. The code path that validates the negotiated SMB version is bypassed, so the helper will happily accept a server that advertises SMB 1.0 (or any protocol version < 2.1).
Because SMB 1.0 is a legacy protocol that is known to contain multiple remote‑code‑execution (RCE) and denial‑of‑service (DoS) vulnerabilities (e.g., EternalBlue, SMBv1 “Null Session” issues, etc.), allowing a client to connect to an SMB 1.0 server effectively re‑introduces those risks to the local user.
CWE – CWE‑424 (Improper Control of a Resource Through an Untrusted Input).
CVSS – 7.0 (High).
Vector – AV:L / AC:H / PR:L / UI:N / S:U / C:H / I:H / A:H
- Local access (the attacker must be able to run Smb4K on the target machine).
- High attack complexity (requires knowledge of the target SMB server and the ability to mount a share).
- Low privilege (any local user can mount a share).
- No user interaction (the mount helper can be invoked automatically, e.g., via a desktop shortcut or a script).
- Unchanged scope (the vulnerability does not affect other components).
- High confidentiality, integrity, availability (once a malicious SMBv1 share is mounted, the attacker can read/write any file on the share, potentially trigger RCE in the file‑manager or other KDE components, and disrupt the user’s workflow).
- CVSS Score: 7.0 (High) – indicates a serious vulnerability that can lead to full compromise of the local machine.
- CISA KEV: No – the vulnerability is not listed as a known exploit kit.
- Exploit Complexity: High – requires local user access and knowledge of SMB configuration.
- Patch Availability: 4.0.7 is already released; no delay in patching.
⚡ Attack Chain
Note: The following chain assumes the attacker already has local user access to the target machine (e.g., a compromised workstation or a user with a weak password). The mount helper can be invoked from the command line or via a GUI shortcut; the PoC below uses the command‑line interface for clarity. The exact command syntax is illustrative – the real Smb4K binary accepts similar arguments but may differ slightly.
1. Discovery & Reconnaissance
| Step | Technique | Tools / Commands | ||
|---|---|---|---|---|
| a. Identify Smb4K installation | Enumerate installed packages or check the binary path | dpkg -l | grep smb4k (Debian/Ubuntu) <br> rpm -qa | grep smb4k (RHEL/CentOS) <br> which smb4k |
| b. Verify version | Query the binary’s version string | smb4k --version → Smb4K 4.0.6 | ||
| c. Confirm vulnerability | Check if version < 4.0.7 | If true, the system is vulnerable. |
Result: The attacker now knows the target is running a vulnerable Smb4K client.
2. Exploitation
The goal is to mount an SMB share that uses SMB 1.0 and then use that share to deliver malicious content.
| Step | Action | Example |
|---|---|---|
| a. Prepare a malicious SMBv1 share | Set up a local SMB server (e.g., samba) configured to advertise SMB 1.0. Place a malicious executable or a file that triggers a known KDE vulnerability (e.g., a specially crafted .desktop file that auto‑executes). | smb.conf snippet:<br>[malshare]<br> path = /srv/malshare<br> guest ok = yes<br> smb2 max protocol = SMB2_02 (disables SMB 2+) |
| b. Mount the share with the vulnerable helper | Invoke the mount helper with a protocol override that forces SMB 1.0. The helper will ignore the restriction and mount the share. | ``bash\n# Illustrative command – actual flags may differ\nsmb4k --mount \\\n --server=192.168.1.50 \\\n --share=malshare \\\n --protocol=1.0\n` |
| c. Verify mount | Check that the share is mounted under /mnt/smb4k (or the configured mount point). | ls /mnt/smb4k → shows files from the malicious share. |
| d. Trigger local code execution | If the share contains a file that auto‑executes (e.g., a .desktop file with Exec= pointing to a malicious binary), simply opening the file in the file manager will run the payload. | xdg-open /mnt/smb4k/evil.desktop` |
PoC Summary
The PoC demonstrates that a local user can mount an SMBv1 share using the vulnerable Smb4K client, thereby exposing the machine to all SMBv1‑related risks. The PoC is illustrative – the exact command‑line flags may vary, but the core idea (forcing SMB 1.0) remains valid.
3. Post‑Exploitation
Once the share is mounted, the attacker can:
1. Read/Write Sensitive Data – If the share contains credentials or other secrets, the attacker can copy them to the local machine.
2. Execute Malicious Code – By placing a malicious binary or script on the share and executing it locally (or via auto‑exec mechanisms), the attacker gains local code execution with the privileges of the mounting user.
3. Pivot to Remote SMB Servers – The attacker can use the SMBv1 share as a foothold to connect to other SMBv1 servers on the network, potentially exploiting known RCEs (e.g., EternalBlue) on those servers.
4. Denial of Service – The attacker can flood the share with large files or malformed SMB packets, causing the local Smb4K client or the SMB server to crash, thereby disrupting the user’s workflow.
🌍 Real World Impact
| Impact | Explanation |
|---|---|
| Confidentiality (C:H) | SMBv1 is susceptible to “null session” enumeration and can expose file contents. A malicious share can leak sensitive data. |
| Integrity (I:H) | The attacker can modify files on the share or inject malicious binaries that overwrite legitimate files on the client. |
| Availability (A:H) | Mounting a malicious share can crash the Smb4K client or the underlying SMB library, causing the user’s desktop to become unusable. |
| Practical Consequences | • Local users can inadvertently mount a malicious SMBv1 share and execute code. <br>• In environments where SMBv1 is still enabled on servers (e.g., legacy Windows 2003 machines), the attacker can exploit remote SMBv1 vulnerabilities from the client side. <br>• In highly regulated environments (e.g., finance, healthcare), the ability to read/write sensitive files via SMBv1 can lead to data breaches. |
🛡️ Remediation & Mitigation
1. Exact Affected Versions
| Product | Affected Versions |
|---|---|
| Smb4K | 4.0.0 – 4.0.6 (inclusive) |
Upgrade Recommendation – Install Smb4K 4.0.7 or later. The patch removes the protocol‑version bypass and enforces SMB 2.1+ by default.
2. Workarounds
| Approach | How to Implement | Notes |
|---|---|---|
| Disable SMBv1 in the mount helper | Edit the Smb4K configuration file (typically ~/.config/smb4k/smb4krc) and add: <br>[Mount]<br>SMBProtocol=2.1 | This forces the helper to negotiate SMB 2.1+. |
Use smbclient instead of Smb4K | smbclient //server/share -U user%pass -m SMB2 | -m SMB2 forces SMB 2.0+. |
| Block SMBv1 traffic at the network level | Configure firewalls to drop SMBv1 packets (TCP ports 445, 139). | Prevents any SMBv1 traffic, including from other clients. |
| Disable the mount helper | Remove or rename the smb4k binary (sudo mv /usr/bin/smb4k /usr/bin/smb4k.disabled). | Users must use alternative tools. |
| Use a desktop shortcut that enforces SMBv2 | Create a launcher that calls smb4k --protocol=2.1. | Requires user awareness. |
3. Detection
| Indicator | Log Source | Example |
|---|---|---|
| Mount attempts with SMBv1 | KDE system logs (~/.xsession-errors or /var/log/kde4/), syslog | smb4k: Negotiated SMB protocol version 1.0 |
| SMBv1 traffic | Network IDS/IPS (Snort, Suricata) | SMBv1 in packet payload |
| Unexpected SMB share mounts | mount command output | //192.168.1.50/malshare on /mnt/smb4k type cifs (rw,vers=1.0,...) |
Tip: Enable verbose logging for Smb4K (smb4k --debug) to capture the negotiated protocol version.4. Patch Management
| Priority | Action | Rationale |
|---|---|---|
| High | Apply the Smb4K 4.0.7 update immediately | CVSS 7.0, local privilege escalation, high confidentiality/integrity/availability impact. |
| Medium | If upgrade is not possible, apply the workarounds above | Reduces risk but does not eliminate it. |
| Low | Monitor for SMBv1 traffic and educate users | Helps detect potential exploitation attempts. |
⚠️ Urgency
1. Patch Smb4K immediately.
2. Disable SMBv1 on all servers (Windows: Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters' -Name SMB1 -Value 0).
3. Audit network traffic for SMBv1 packets.
By following the remediation steps above, the risk of local code execution, data exfiltration, or service disruption caused by this vulnerability can be effectively mitigated.
[🤖 CVE Professor AI Security Engine]
FOFA Query