# CVE-2025-13902 - Cross-Site Scripting (CWE-79) in Schneider Electric Modicon M241/M251/M258/LMC058 Controllers

> CVE-2025-13902 is a cross-site scripting flaw (CWE-79) in the embedded web server of Schneider Electric Modicon M241, M251, M258 and LMC058 controllers (Claroty also lists M262). An authenticated attacker can plant a crafted element so that a victim's browser runs arbitrary JavaScript when the victim hovers over it. No exploitation or public PoC is known; firmware 5.4.13.12 fixes M241/M251 only.

- **Author:** Threadlinqs Team
- **Published:** 2026-12-02T21:52:08Z
- **Last updated:** 2026-12-02T21:52:08Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-7322
- **Card image:** https://intel.threadlinqs.com/og/threat/TL-2026-7322.png
- **ID:** TL-2026-7322
- **Severity:** MEDIUM (CVSS 5.4)
- **Category:** ICS_SCADA
- **Status:** MONITORING
- **Detections:** 9 (1 shown free below) · **IOCs:** 10
- **CVEs:** CVE-2025-13902, CVE-2025-13901

## Description

CVE-2025-13902 is an improper neutralization of input during web page generation (CWE-79) in the web server of Schneider Electric Modicon programmable logic controllers. Per the NVD/CVE record and the Schneider Electric CPCERT advisory SEVD-2026-069-02 (republished by CISA as ICSA-26-078-02), authenticated attackers can have a victim's browser run arbitrary JavaScript when the victim hovers over a maliciously crafted element on a web server containing the injected payload. The vulnerability was reported to Schneider Electric by Noam Moshe of Claroty Team82; Schneider Electric CPCERT reported it to CISA.

Scoring: NVD (primary) assigns CVSS 3.1 base 5.4 (Medium), vector CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N. Schneider Electric (CNA) assigns CVSS 4.0 base 5.1 (Medium), vector CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N. The scope-changed, low confidentiality/integrity impact reflects that the impact lands in the victim's browser session rather than on the controller's own process-control function. CISA's SSVC entry records Exploitation: none, Automatable: no, Technical Impact: partial. Tenable reports no known exploits.

Affected products and fixes (vendor advisory SEVD-2026-069-02 as republished by CISA): Modicon M241 and M251 firmware prior to 5.4.13.12 are fixed in 5.4.13.12, delivered with EcoStruxure Machine Expert v2.5.0.1 (update the controller firmware and reboot). Modicon M258 and LMC058 firmware, all versions, are affected and no fix is listed; only mitigations are provided. Source discrepancy: the Claroty Team82 dashboard lists the affected product as Modicon M241/M251/M262, but the CVE record, NVD, CISA and Tenable list M241/M251/M258/LMC058 and do not name M262 for this CVE; M262 should be verified against the vendor notice. The Claroty page also links SEVD-2026-069-01, which per GCVE is a separate advisory for CVE-2025-13901 (CWE-404 Machine Expert protocol partial DoS, M241/M251 <5.4.13.12, M262 <5.4.10.12) and not for this CVE.

Defensive notes: exploitation requires an authenticated attacker (PR:L) and user interaction (UI:R), so exposure is highest where the controller web server is reachable from corporate or untrusted networks and where engineers or operators browse the controller web UI from workstations holding other sessions. Mitigations from the advisory: keep controllers in a protected environment, use user management and strong passwords, deactivate the web server when unused, use encrypted links, block ports 80 and 443 with segmentation or firewall, and use VPNs for remote access. No network IOCs (IPs, domains, hashes) are published for this vulnerability, so BeaconBeagle C2 correlation was not applicable.

## MITRE ATT&CK

- T1190 Exploit Public-Facing Application
- T1078 Valid Accounts
- T1204 User Execution
- T1059.007 JavaScript
- T1539 Steal Web Session Cookie
- T0819 Exploit Public-Facing Application

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**CVE-2025-13902 Modicon Web Server XSS Payload Injection (Splunk) - Exploitation** (`TL-2026-7322-SPL-001`)

Detects HTTP requests to private-address Modicon M241/M251/M258/LMC058 embedded web servers (TCP/80, TCP/443) whose body or query string carries script or event-handler markup (onmouseover, onmouseenter, onerror, <script, javascript:, <svg, <img, <iframe). This is the injection precondition for CVE-2025-13902 (CWE-79, TL-2026-7322): an authenticated low-privilege user plants a crafted element that fires JavaScript in a victim browser on hover. No public PoC or exploitation is known, so detection is behaviour-first on the payload shape rather than a tool signature. Requires HTTP body visibility (Splunk Stream or equivalent) or a TLS-terminating inspection point for HTTPS.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1190, T1059.007, T1078
- **Data sources:** splunk_stream_http, ot_network_taps, proxy_logs
- **Severity:** medium
- **Confidence:** medium

### Splunk SPL

```spl
index=ot_network sourcetype="stream:http" (http_method=POST OR http_method=PUT) (dest_port=80 OR dest_port=443) | eval payload=lower(urldecode(coalesce(form_data,"")." ".coalesce(uri_query,""))) | where match(payload,"onmouseover|onmouseenter|onmouseout|onfocus|onerror|onload|<script|javascript:|<svg|<img|<iframe") | where cidrmatch("10.0.0.0/8",dest_ip) OR cidrmatch("172.16.0.0/12",dest_ip) OR cidrmatch("192.168.0.0/16",dest_ip) | stats count min(_time) as first_seen max(_time) as last_seen values(uri_path) as uri_paths values(http_user_agent) as user_agents by src_ip dest_ip dest_port | eval first_seen=strftime(first_seen,"%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen,"%Y-%m-%d %H:%M:%S")
```

### Microsoft KQL

```kql
CommonSecurityLog
| where TimeGenerated > ago(24h)
| where DestinationPort in (80, 443)
| where ipv4_is_private(DestinationIP)
| extend Payload = tolower(url_decode(RequestURL))
| where Payload matches regex @"onmouseover|onmouseenter|onmouseout|onfocus|onerror|onload|<script|javascript:|<svg|<img|<iframe"
| project TimeGenerated, DeviceVendor, SourceIP, SourceUserName, DestinationIP, DestinationPort, RequestMethod, RequestURL, RequestClientApplication
```

### Sigma

```yaml
title: Modicon Embedded Web Server XSS Payload in HTTP Request (CVE-2025-13902)
id: 7a1c3e52-4b0d-4f6a-9c11-2e5d8a7b3f01
status: experimental
description: Detects script or event-handler markup in HTTP requests to web servers, intended for Schneider Electric Modicon M241/M251/M258/LMC058 controllers affected by CVE-2025-13902 (CWE-79). Scope the rule to controller destinations.
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2025-13902
    - https://db.gcve.eu/vuln/icsa-26-078-02
author: Threadlinqs Team
date: 2026/12/02
tags:
    - attack.initial-access
    - attack.t1190
    - attack.execution
    - attack.t1059.007
    - cve.2025.13902
logsource:
    category: webserver
detection:
    selection:
        c-uri|contains:
            - 'onmouseover'
            - 'onmouseenter'
            - 'onmouseout'
            - 'onerror='
            - 'onfocus='
            - '<script'
            - '%3Cscript'
            - 'javascript:'
            - '<svg'
            - '<iframe'
    condition: selection
falsepositives:
    - Authorised web application security testing against controllers
    - Vulnerability scanners such as Tenable OT
level: medium
```

**Known false positives:**

- Authorised penetration tests or web security scans against the controller web UI
- Engineers uploading legitimate HTML or JavaScript-bearing project content to the controller web server

**Tuning notes:** Replace the RFC1918 cidrmatch filters with the actual Modicon controller subnet or an asset lookup. Allowlist scanner source IPs (for example Tenable OT, plugin 505937). Confirm Splunk Stream exposes form_data; if only metadata is available, rely on uri_query. HTTPS controllers need TLS inspection or a reverse proxy to see the payload.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- CVE-2025-13902 Modicon Web Server XSS Payload Injection (Sentinel KQL) - Exploitation (locked: unlock with TL Creds)
- CVE-2025-13902 Modicon Web Session Theft Script Patterns (Sentinel KQL) - Post-Exploitation (locked: unlock with TL Creds)
- Modicon Controller Outbound Internet Connection (Sentinel KQL) - C2 / Exfiltration (locked: unlock with TL Creds)
- CVE-2025-13902 Modicon Web Server XSS Payload Injection (Sigma) - Exploitation (locked: unlock with TL Creds)
- CVE-2025-13902 Modicon Web Session Theft Script Patterns (Sigma) - Post-Exploitation (locked: unlock with TL Creds)
- Modicon Controller Outbound Internet Connection (Sigma) - C2 / Exfiltration (locked: unlock with TL Creds)
- CVE-2025-13902 Modicon Web Session Theft Script Patterns (Splunk) - Post-Exploitation (locked: unlock with TL Creds)
- Modicon Controller Outbound Internet Connection (Splunk) - C2 / Exfiltration (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sources

- [CVE-2025-13902 | Claroty Team82 Disclosure Dashboard](https://de.claroty.com/team82/disclosure-dashboard/cve-2025-13902)
- [Claroty Team82 Disclosure Dashboard (English)](https://claroty.com/team82/disclosure-dashboard/cve-2025-13902)
- [Schneider Electric Security Notice SEVD-2026-069-02](https://download.schneider-electric.com/files?p_Doc_Ref=SEVD-2026-069-02&p_enDocType=Security+and+Safety+Notice&p_File_Name=SEVD-2026-069-02.pdf)
- [NVD - CVE-2025-13902](https://nvd.nist.gov/vuln/detail/CVE-2025-13902)
- [CVE Record CVE-2025-13902 (CVE Program)](https://cveawg.mitre.org/api/cve/CVE-2025-13902)
- [CISA ICS Advisory ICSA-26-078-02 - Schneider Electric Modicon Controllers M241, M251, M258, and LMC058 (via GCVE)](https://db.gcve.eu/vuln/icsa-26-078-02)
- [Tenable OT Plugin 505937 - Schneider Electric Modicon XSS (CVE-2025-13902)](https://www.tenable.com/plugins/ot/505937)
- [Schneider Electric SEVD-2026-069-01 (related advisory for CVE-2025-13901, not this CVE) via GCVE](https://db.gcve.eu/vuln/sevd-2026-069-01)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-7322
