CVE-2018-7502 is a local privilege escalation in Beckhoff TwinCAT: 19 kernel drivers accept a pointer from the caller without validating it, so any low-privileged code on a TwinCAT 2 or 3.1 system can gain SYSTEM rights. NVD scores it 7.8. TwinCAT 3.1 Build 4022.14 and TwinCAT 2.11 R3 build 2300 fix it.
Vulnerability summary
CVSS base score
7.8
High severity
EPSS score (FIRST)
0.6%
Probability of exploitation in the wild in the next 30 days
CISA KEV catalog
No
Not listed
Published
Vulnerability ID: CVE-2018-7502 · Source: NVD
Affected components
| Component | CPE | Version range |
|---|---|---|
| Beckhoff TwinCAT 3.1 | cpe:2.3:a:beckhoff:twincat:3.1:*:*:*:*:*:*:* | Build 4022 up to and including 4022.4 (Beckhoff 2018-001, CISA ICSA-18-081-02); fixed in 4022.14 |
| Beckhoff TwinCAT 2.11 R3 | cpe:2.3:a:beckhoff:twincat:2.11:*:*:*:*:*:*:* | Up to and including build 2259; fixed in build 2300 |
| Beckhoff TwinCAT 3.1 C++ / Matlab (TC1210, TC1220, TC1300, TC1320) | cpe:2.3:a:beckhoff:twincat_c\+\+:3.1:*:*:*:*:*:*:* | TwinCAT 3.1 C++ / Matlab modules; recompile after updating TwinCAT |
What does this mean for affected devices?
NVD describes CVE-2018-7502 as follows: "Kernel drivers in Beckhoff TwinCAT 3.1 Build 4022.4, TwinCAT 2.11 R3 2259, and TwinCAT 3.1 lack proper validation of user-supplied pointer values. An attacker who is able to execute code on the target may be able to exploit this vulnerability to obtain SYSTEM privileges." NVD's Primary score is CVSS v3.0 7.8 (CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H), with a v2 score of 7.2. NVD lists CWE-20; the ICS-CERT CNA and CISA list CWE-822 (untrusted pointer dereference). NVD's CPEs cover TwinCAT 2.11, TwinCAT 3.1 and TwinCAT C++ 3.1. The record was published on 2018-03-23 (CVE record).
Which TwinCAT drivers are affected?
Steven Seeley of Source Incite reported it to Beckhoff and ICS-CERT on 2017-09-27, and the advisory SRC-2018-0007 was released on 2018-03-13 with a proof of concept. The flaw is in the handling of IOCTL 0x00222206 in 19 TwinCAT kernel drivers, among them TcRouter.sys, TcPlc30.sys, TcRTime.sys, TcIo.sys, TcIoECat.sys (EtherCAT), TcIoPNet.sys (PROFINET) and TcIoEthIp.sys (EtherNet/IP). The drivers dereference a value supplied by the caller as a pointer without validating it, so a low-privileged local process can run code in the context of SYSTEM. Source Incite scores it CVSS v2 6.9.
Which versions fix CVE-2018-7502?
Beckhoff advisory 2018-001 (version 1.1, 2018-04-06; relevance High) lists TwinCAT 3.1 Build 4022 up to 4022.4, TwinCAT 2.11 R3 up to 2259, and the TwinCAT 3.1 C++ and Matlab modules (TC1210, TC1220, TC1300, TC1320). The fix:
- Update TwinCAT 3.1 Build 4022 to 4022.14 or later.
- Update TwinCAT 2.11 R3 to build 2300 or later.
- Recompile TwinCAT 3.1 C++ and Matlab modules after the update.
CISA's ICSA-18-081-02 (2018-03-22; CSAF) lists the same products, scores it CVSS v3.0 7.8, names the Critical Manufacturing, Energy and Water and Wastewater sectors, and notes that it is not exploitable remotely and that no known public exploits target it. CISA's mitigation is the update plus recompiling Matlab modules.
Why does a local flaw matter on a controller?
The affected drivers are Windows kernel drivers of the TwinCAT runtime, including the real-time, PLC, router and fieldbus I/O drivers, and the affected products include TwinCAT 3.1 engineering modules. Any foothold on such a machine, for example a phishing payload on an engineering laptop or a compromised application on the controller PC, becomes SYSTEM rights next to the real-time system through this bug. That is also why remote ADS code execution (CVE-2019-16871) and the EtherCAT driver memory leak CVE-2020-12494 belong in the same patch review.
It is not in the CISA KEV catalog as of 2026-11-21 (catalog version 2026.11.20, 1,790 entries; no entry names Beckhoff). FIRST EPSS gives it 0.00557, the 47.3rd percentile, in the 2026-11-20 dataset (FIRST EPSS). Our Beckhoff TwinCAT and ADS security guide covers hardening engineering PCs as well as controllers; the network-side design flaw is CVE-2017-16726.
Evidence
- Description quoted; NVD Primary CVSS v3.0 7.8 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H and v2 7.2; CWE-20 (NVD, Primary), CWE-822 (ICS-CERT, Secondary); CPE twincat 2.11, twincat 3.1, twincat_c++ 3.1; status Modified; published 2018-03-23; read 2026-11-21. — NVD
- State PUBLISHED, assigner icscert, published 2018-03-23; affected Beckhoff TwinCAT PLC products: TwinCAT 3.1 Build 4022.4, TwinCAT 2.11 R3 2259, TwinCAT 3.1; checked 2026-11-21. — CVE.org
- 'TwinCAT 2 and 3.1 Kernel Driver Privilege Escalation', published 2018-03-13, version 1.1 of 2018-04-06, relevance High; appearance TwinCAT 3.1 Build 4022 <= 4022.4, TwinCAT 2.11 R3 <= 2259, TwinCAT 3.1 C++ / Matlab (TC1210/TC1220/TC1300/TC1320); solution: update 4022 to >= 4022.14, 2.11 R3 to >= 2300, recompile C++/Matlab modules; credit Steven Seeley of Source Incite; read 2026-11-21. — Beckhoff advisory 2018-001
- ICSA-18-081-02 'Beckhoff TwinCAT', released 2018-03-22: TwinCAT 3.1 Build 4022.4 or prior, 2.11 R3 2259 or prior, 3.1 C++/Matlab (TC1210/TC1220/TC1300/TC1320); CWE-822; CVSS v3.0 7.8; sectors Critical Manufacturing, Energy, Water and Wastewater Systems; no known public exploits specifically target it, not exploitable remotely; mitigation: update and recompile Matlab modules, see Beckhoff 2018-001; read 2026-11-21. — CISA ICS advisory / CSAF
- Untrusted pointer dereference processing IOCTL 0x00222206 in 19 kernel drivers (TcAnalytics, TcCnc, TcIoBACnetR9, TcIoCCat, TcIoDrivers, TcIoECat, TcIoECatSimu, TcIoESlv, TcIoEth, TcIoEthIp, TcIoPNet, TcIotDrivers, TcNcObjects, TcPlc30, TcRouter, TcRtsObjects, TcIo, TcNc, TcRTime .sys); code execution as SYSTEM; CVSS v2 6.9; reported 2017-09-27, released 2018-03-13; PoC published; discovered by Steven Seeley; read 2026-11-21. — Source Incite SRC-2018-0007
- Not in the CISA KEV catalog version 2026.11.20 (1,790 entries, released 2026-11-20); no entry with Beckhoff as vendor; checked 2026-11-21. — CISA KEV
- EPSS 0.00557, percentile 0.47317, dataset 2026-11-20, read 2026-11-21. — FIRST EPSS

Related advisories
Sources
- NVD: CVE-2018-7502
- CVE.org record CVE-2018-7502 (CNA: ICS-CERT)
- Beckhoff Security Advisory 2018-001: TwinCAT 2 and 3.1 Kernel Driver Privilege Escalation
- CISA ICSA-18-081-02: Beckhoff TwinCAT
- CISA CSAF: ICSA-18-081-02 (machine-readable advisory)
- Source Incite SRC-2018-0007: TwinCAT3 multiple kernel drivers untrusted pointer dereference
- CISA KEV
- FIRST EPSS
Frequently asked questions
Which TwinCAT versions fix CVE-2018-7502?
TwinCAT 3.1 Build 4022.14 or later and TwinCAT 2.11 R3 build 2300 or later. TwinCAT 3.1 C++ and Matlab modules (TC1210, TC1220, TC1300, TC1320) must be recompiled after the update (per Beckhoff advisory 2018-001 and CISA ICSA-18-081-02).
Can CVE-2018-7502 be exploited over the network?
Not on its own. The attacker must already run code on the TwinCAT system; CISA states it is not exploitable remotely. It turns any local foothold into SYSTEM rights (per NVD and CISA ICSA-18-081-02).
Which drivers are affected?
Source Incite lists 19 TwinCAT kernel drivers that mishandle IOCTL 0x00222206, including TcRouter.sys, TcPlc30.sys, TcRTime.sys, TcIo.sys and the EtherCAT, PROFINET and EtherNet/IP I/O drivers (per Source Incite SRC-2018-0007).
Is CVE-2018-7502 exploited in the wild?
It is not in the CISA KEV catalog as of 2026-11-21 (catalog version 2026.11.20). A proof of concept was published with the 2018 advisory; FIRST EPSS gives it 0.00557, the 47.3rd percentile, in the 2026-11-20 dataset (per CISA KEV, Source Incite and FIRST EPSS).
Questions about this page?