On November 17, 2026, CISA published ICS Advisory ICSA-26-321-06 disclosing a high-severity code injection vulnerability in Siemens ROS# (ROS-Sharp), a widely deployed .NET library that bridges Robot Operating System (ROS) environments with Siemens industrial automation ecosystems. Tracked as CVE-2026-109097 with a CVSS v3 score of 8.2, this vulnerability allows an attacker to inject arbitrary code into generated programs by supplying a crafted message definition file to a user or build process.
ROS# is not a peripheral tool. It sits at the intersection of IT and OT, enabling .NET applications to communicate with robotic systems in critical manufacturing environments worldwide. In these environments, a successful code injection can translate directly into manipulated robotic behavior, disrupted production lines, safety system interference, or lateral movement from engineering workstations into operational networks. The vulnerability affects all versions prior to 2.3.1, and given the library's integration into automated build pipelines and human-machine interface (HMI) development workflows, the attack surface extends beyond runtime servers to developer workstations and CI/CD infrastructure.
Defenders must act quickly. The vulnerability class—improper control of code generation (CWE-94)—is particularly dangerous in automated environments where message definitions are frequently imported from external vendors, open-source repositories, or third-party integrators without rigorous validation.
Technical Analysis
Affected Products and Versions
- Product: Siemens ROS# (ROS-Sharp)
- Affected Versions: All versions prior to 2.3.1
- CVE: CVE-2026-109097
- CVSS v3: 8.2 (High)
- Vendor: Siemens
- Sector Impact: Critical Manufacturing (worldwide deployment)
Vulnerability Mechanics
The vulnerability resides in how ROS# handles message definition files (.msg files) used to generate .NET code for serialization and deserialization. ROS# includes a code generation component that parses these text-based message definitions and produces C# classes that applications use to communicate with ROS nodes.
The Flaw: Affected versions do not properly escape or sanitize text within message definition files before using that text as input to the code generation engine. An attacker who can influence the content of a .msg file—whether by hosting a malicious repository, compromising a vendor's file share, or tricking an engineer into importing a poisoned definition—can inject malicious code constructs directly into the generated C# output.
Attack Chain:
- Attacker crafts a malicious
.msgfile containing code injection payloads embedded in field comments, default values, or string literals. - Victim imports or references this file in a ROS# project, or an automated build pipeline pulls the file from a compromised upstream source.
- During the build or code generation phase, ROS# processes the malicious definition and emits C# code containing the attacker's payload.
- The generated code is compiled and executed, granting the attacker arbitrary code execution within the context of the build service or application runtime.
Exploitation Requirements
Exploitation requires the ability to pass a crafted message definition file to the target user or system. This is not a remote, unauthenticated vulnerability in the traditional sense; it requires either social engineering (convincing a developer to import a malicious file) or supply-chain positioning (compromising a repository or file share that the target trusts). However, in industrial environments where third-party integrators frequently exchange ROS packages and message definitions, this barrier is lower than it appears.
Exploitation Status
As of the advisory publication, there are no confirmed reports of active exploitation in the wild. The vulnerability is not currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog. However, the public disclosure of the exact vulnerability class and affected component significantly lowers the barrier for weaponization. Threat actors targeting industrial supply chains, particularly those with interests in critical manufacturing, are likely to develop proof-of-concept exploits rapidly.
Detection & Response
Sigma Rules
The following Sigma rules target the behavioral indicators of exploitation: suspicious compilation activity following ROS# code generation, and the presence of potentially malicious message definition files.
---
title: Siemens ROS# Code Generation Followed by Suspicious Compilation
id: 8b5c2d14-3f7a-4b9e-9c1d-5e6f7a8b9c0d
status: experimental
description: Detects execution of C# compiler (csc.exe) or Roslyn compiler (csc.dll via dotnet) shortly after ROS# code generation activity, potentially indicating injected code being compiled.
references:
- https://www.cisa.gov/news-events/ics-advisories/icsa-26-321-06
- https://attack.mitre.org/techniques/T1059/
author: Security Arsenal
date: 2026/11/17
tags:
- attack.execution
- attack.t1059.001
logsource:
category: process_creation
product: windows
detection:
selection_compiler:
Image|endswith:
- '\csc.exe'
- '\dotnet.exe'
CommandLine|contains:
- 'csc.dll'
- '/t:library'
- '/t:exe'
selection_ros_context:
CommandLine|contains:
- 'ros#'
- 'rossharp'
- '.msg'
condition: selection_compiler and selection_ros_context
falsepositives:
- Legitimate ROS# development and build processes
level: medium
---
title: Suspicious ROS Message Definition File Creation
id: 9c6d3e25-4a8b-5c0f-af2e-6f7a8b9c0d1e
status: experimental
description: Detects creation or modification of .msg files outside of standard ROS package directories or by unusual processes, potentially indicating delivery of malicious message definitions.
references:
- https://www.cisa.gov/news-events/ics-advisories/icsa-26-321-06
- https://attack.mitre.org/techniques/T1078/
author: Security Arsenal
date: 2026/11/17
tags:
- attack.persistence
- attack.t1078
logsource:
category: file_event
product: windows
detection:
selection:
TargetFilename|endswith: '.msg'
filter_standard_paths:
TargetFilename|contains:
- '\opt\ros\'
- '\catkin_ws\src\'
- '\ros_ws\src\'
- '\dev\ros\'
condition: selection and not filter_standard_paths
falsepositives:
- Custom development directories
- Temporary build artifacts
level: low
---
title: Build Process Spawning Unexpected Child Processes
id: 0d7e4f36-5b9c-6d1e-bf3a-7a8b9c0d1e2f
status: experimental
description: Detects MSBuild, Visual Studio, or dotnet build processes spawning cmd.exe, powershell.exe, or other command interpreters, which may indicate injected code execution during ROS# project compilation.
references:
- https://www.cisa.gov/news-events/ics-advisories/icsa-26-321-06
- https://attack.mitre.org/techniques/T1059/
author: Security Arsenal
date: 2026/11/17
tags:
- attack.execution
- attack.t1059.003
logsource:
category: process_creation
product: windows
detection:
selection_parent:
ParentImage|endswith:
- '\msbuild.exe'
- '\devenv.exe'
- '\dotnet.exe'
selection_child:
Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\wscript.exe'
- '\cscript.exe'
condition: selection_parent and selection_child
falsepositives:
- Legitimate build scripts with pre/post-build events
level: medium
KQL (Microsoft Sentinel / Defender)
Use the following KQL query to hunt for evidence of ROS# exploitation across your environment. This query looks for compilation events involving ROS# components followed by suspicious child process creation.
// Hunt for suspicious compilation activity related to ROS# projects
let timeframe = 7d;
DeviceProcessEvents
| where Timestamp > ago(timeframe)
| where FileName in~ ("csc.exe", "dotnet.exe", "MSBuild.exe", "devenv.exe")
| where ProcessCommandLine has_any ("ros#", "rossharp", ".msg")
| project Timestamp, DeviceName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine, ReportId
| join kind=inner (
DeviceProcessEvents
| where Timestamp > ago(timeframe)
| where InitiatingProcessFileName in~ ("csc.exe", "dotnet.exe", "MSBuild.exe")
| where FileName in~ ("cmd.exe", "powershell.exe", "pwsh.exe", "wscript.exe", "cscript.exe")
| project ChildTimestamp=Timestamp, ChildDeviceName=DeviceName, ChildFileName=FileName, ChildCommandLine=ProcessCommandLine, InitiatingProcessId, ReportId
) on $left.ReportId == $right.ReportId
| project Timestamp, DeviceName, Compiler=FileName, CompilerCommand=ProcessCommandLine, ChildProcess=ChildFileName, ChildCommand=ChildCommandLine
| order by Timestamp desc
Velociraptor VQL
Deploy this VQL artifact to hunt for suspicious process execution chains and file artifacts associated with ROS# exploitation across Windows endpoints.
-- Hunt for ROS# exploitation indicators: suspicious compilation and message file access
SELECT
Pid,
Name,
CommandLine,
Exe,
Username,
CreateTime,
ParentPid,
(SELECT Name FROM pslist() WHERE Pid = ParentPid) AS ParentName
FROM pslist()
WHERE
(Name =~ '(?i)csc|dotnet|msbuild|devenv' AND CommandLine =~ '(?i)ros#|rossharp|\.msg')
OR
(Name =~ '(?i)cmd|powershell|pwsh|wscript|cscript' AND ParentName =~ '(?i)csc|dotnet|msbuild|devenv')
ORDER BY CreateTime DESC
Remediation Script
Use the following PowerShell script to inventory ROS# installations, verify versions, and temporarily restrict build process child process creation until patching is complete.
#Requires -RunAsAdministrator
# CVE-2026-109097 Siemens ROS# Detection and Mitigation Script
$ErrorActionPreference = 'SilentlyContinue'
$ReportPath = "$env:TEMP\ROSharp_CVE-2026-109097_Report_$(Get-Date -Format 'yyyyMMdd_HHmmss').txt"
Write-Host "[+] Scanning for ROS# installations and vulnerable versions..." -ForegroundColor Cyan
"ROS# CVE-2026-109097 Assessment Report - $(Get-Date)" | Out-File $ReportPath
"=" * 60 | Out-File $ReportPath -Append
# 1. Search for ROS# assemblies in common locations
$SearchPaths = @(
"${env:ProgramFiles}",
"${env:ProgramFiles(x86)}",
"$env:USERPROFILE\.nuget\packages\ros-sharp",
"$env:USERPROFILE\source\repos",
"C:\opt\ros",
"D:\ros"
)
$ROSharpFound = $false
foreach ($Path in $SearchPaths) {
if (Test-Path $Path) {
$Files = Get-ChildItem -Path $Path -Recurse -Filter "*ROSSharp*" -ErrorAction SilentlyContinue | Select-Object -First 10
if ($Files) {
$ROSharpFound = $true
"[FOUND] ROS# artifacts in $Path" | Out-File $ReportPath -Append
$Files | ForEach-Object { " - $($_.FullName)" | Out-File $ReportPath -Append }
# Check for .msg files (potential attack vector)
$MsgFiles = Get-ChildItem -Path $Path -Recurse -Filter "*.msg" -ErrorAction SilentlyContinue | Select-Object -First 5
if ($MsgFiles) {
" [WARNING] Message definition files found - validate integrity:" | Out-File $ReportPath -Append
$MsgFiles | ForEach-Object { " - $($_.FullName)" | Out-File $ReportPath -Append }
}
}
}
}
if (-not $ROSharpFound) {
"[INFO] No ROS# installations found in standard paths." | Out-File $ReportPath -Append
}
# 2. Check for suspicious recent .msg file modifications
"`n[+] Checking for recently modified .msg files (last 7 days)..." | Out-File $ReportPath -Append
$RecentMsg = Get-ChildItem -Path $env:USERPROFILE -Recurse -Filter "*.msg" -ErrorAction SilentlyContinue |
Where-Object { $_.LastWriteTime -gt (Get-Date).AddDays(-7) } |
Select-Object -First 20
if ($RecentMsg) {
"[ALERT] Recent .msg files detected - verify source integrity:" | Out-File $ReportPath -Append
$RecentMsg | ForEach-Object { " - $($_.FullName) (Modified: $($_.LastWriteTime))" | Out-File $ReportPath -Append }
} else {
"[INFO] No recent .msg file modifications detected." | Out-File $ReportPath -Append
}
# 3. Hardening: Create temporary Windows Defender Exploit Guard rule to block child processes from compilers
"`n[+] Applying temporary hardening (Audit mode recommended first)..." | Out-File $ReportPath -Append
try {
# Check if Exploit Guard is available
$ExploitGuard = Get-MpPreference | Select-Object -ExpandProperty AttackSurfaceReductionRules_Ids -ErrorAction SilentlyContinue
if ($ExploitGuard) {
# Block Office applications from creating child processes (similar logic applies to build tools)
# Note: Adjust rule GUIDs based on your specific build environment
"[INFO] Windows Defender Exploit Guard detected. Recommend enabling 'Block process creations originating from PSExec and WMI commands' (GUID: d1e49aac-8f56-4280-b9ba-993a6d77406c) in Audit mode." | Out-File $ReportPath -Append
}
} catch {
"[WARNING] Could not query Exploit Guard status." | Out-File $ReportPath -Append
}
# 4. Check for suspicious child processes in recent process creation logs (if available)
"`n[+] Checking security event log for suspicious compiler child processes..." | Out-File $ReportPath -Append
$SuspiciousEvents = Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4688; StartTime=(Get-Date).AddDays(-7)} -ErrorAction SilentlyContinue |
Where-Object { $_.Message -match 'csc\.exe|dotnet\.exe|msbuild\.exe' -and $_.Message -match 'cmd\.exe|powershell\.exe' } |
Select-Object -First 10
if ($SuspiciousEvents) {
"[CRITICAL] Suspicious process execution chains detected:" | Out-File $ReportPath -Append
$SuspiciousEvents | ForEach-Object { " - $($_.TimeCreated): $($_.Message.Substring(0, [Math]::Min(200, $_.Message.Length)))" | Out-File $ReportPath -Append }
} else {
"[INFO] No suspicious compiler child processes found in event log." | Out-File $ReportPath -Append
}
Write-Host "[+] Assessment complete. Report saved to: $ReportPath" -ForegroundColor Green
Write-Host "[!] ACTION REQUIRED: Update ROS# to version 2.3.1 or later immediately." -ForegroundColor Red
Remediation
Immediate Actions
-
Update ROS# to Version 2.3.1 or Later
- Siemens has released ROS# version 2.3.1 which addresses this vulnerability by properly escaping text in message definition files during code generation.
- Update all development workstations, build servers, and deployed applications that include ROS# libraries.
- Verify the update by checking the assembly version or package reference in your .NET projects.
-
Audit Third-Party Message Definitions
- Inventory all
.msgfiles in your environment, particularly those received from external vendors or downloaded from public repositories. - Validate the integrity of message definition files against known-good checksums before importing them into ROS# projects.
- Implement a policy requiring security review of all third-party ROS packages before inclusion in production builds.
- Inventory all
-
Isolate Build Environments
- Run ROS# code generation and compilation in isolated, sandboxed environments (containers or VMs) with restricted network access and no connectivity to production OT networks.
- Ensure build service accounts operate with least privilege and cannot access sensitive industrial control system segments.
-
Network Segmentation
- Verify that development and engineering workstations used for ROS# development are segmented from critical manufacturing execution systems (MES) and safety instrumented systems (SIS).
- Implement application whitelisting on build servers to prevent unauthorized child process execution during compilation.
Long-Term Defensive Measures
- Supply Chain Security: Establish software bill of materials (SBOM) tracking for all ROS# dependencies and third-party ROS packages.
- Code Review: Implement mandatory peer review for all
.msgfiles and generated code before production deployment. - Monitoring: Deploy the Sigma rules and KQL queries provided above to detect anomalous compilation activity.
- Vendor Advisory Monitoring: Subscribe to Siemens ProductCERT and CISA ICS advisories for updates on ROS# and related industrial automation software.
References
- CISA ICS Advisory ICSA-26-321-06: https://www.cisa.gov/news-events/ics-advisories/icsa-26-321-06
- Siemens ProductCERT: https://www.siemens.com/cert
- CVE-2026-109097: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-109097
Related Resources
Security Arsenal Managed SOC Services AlertMonitor Platform Book a SOC Assessment soc-mdr Intel Hub
Is your security operations ready?
Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.