Security Advisory

CVE-2019-5636: TwinCAT ADS Discovery Shutdown

Last updated:
  • CVE-2019-5636

CVE-2019-5636 is a denial-of-service flaw in Beckhoff TwinCAT: an empty UDP packet sent to the ADS discovery port 48899 shuts down the ADS Discovery Service, so the controller drops out of network searches while the PLC keeps running. NVD scores it 7.5, Rapid7 5.3. Beckhoff fixes it in TwinCAT 2 Build 2305 and TwinCAT 3.1 Build 4024.4.

Vulnerability summary

CVSS base score

7.5

High severity

EPSS score (FIRST)

1.4%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2019-5636 · Source: NVD

Affected components

ComponentCPEVersion range
Beckhoff TwinCAT 2 runtimecpe:2.3:a:beckhoff:twincat:2.0:build2304:*:*:*:*:*:*Build 2304 and earlier; fixed in Build 2305 (Beckhoff advisory 2019-004). NVD CPE lists Build 2304 only
Beckhoff TwinCAT 3.1 runtimecpe:2.3:a:beckhoff:twincat:3.1:build4024.0:*:*:*:*:*:*Build 4024.0 and earlier; fixed in Build 4024.4 (Beckhoff advisory 2019-004). NVD CPE lists Build 4024.0 only

What does this mean for affected devices?

NVD's description reads: "When a Beckhoff TwinCAT Runtime receives a malformed UDP packet, the ADS Discovery Service shuts down. Note that the TwinCAT devices are still performing as normal." NVD's Primary score is CVSS v3.1 7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H); Rapid7, the CNA, scores it 5.3 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L). Both class it CWE-404 (improper resource shutdown or release). The record was published on 2019-11-21 (NVD, CVE record). The NVD and CVE.org texts give the TwinCAT 3.1 version as "4204.0"; Beckhoff's advisory and NVD's own CPE use Build 4024.0.

What happens when the packet arrives?

Beckhoff advisory 2019-004 (V1.1, 30 July 2020) says that when a UDP packet with a data length of 0 bytes reaches the discovery port, the service shuts down. Routes that already exist keep working and new ADS routes can still be added by hostname or IP address, but the TwinCAT broadcast search no longer shows the device. Rapid7's R7-2019-32 write-up explains the cause: the discovery handler thread exits when recvfrom returns 0, which for UDP means an empty datagram rather than a closed connection. Rapid7 adds that switching the runtime into CONFIG or RUN mode restarts the handler, and that zero-byte UDP probes from nmap and similar scanners can trigger the flaw.

Why do NVD and Rapid7 score it differently?

The only difference is the availability impact. NVD rates it high; Rapid7 rates it low, because the control program and process data exchange continue and only discovery and route modification over UDP stop. The impact on your plant depends on whether anything, such as an engineering workflow or a monitoring tool, relies on the broadcast search.

Which versions are affected and how do you fix it?

Product Affected Fixed
TwinCAT 2 Build 2304 and earlier Build 2305 or newer
TwinCAT 3.1 Build 4024.0 and earlier Build 4024.4 or newer

Rapid7 verified the flaw on TwinCAT 3.1.4022.30 on Beckhoff CX2030 and CX5140 embedded PCs running Windows 10 LTSC and on 3.1.4022.29 on a CX5140 running Windows CE. Where you cannot update, Beckhoff's mitigation is to block UDP port 48899 at the (perimeter) firewall so these packets cannot arrive from untrusted networks, and it repeats its advisory 2017-001 guidance that ADS belongs only in trusted environments.

Our Beckhoff TwinCAT ADS protocol guide covers route tables, Secure ADS and what to monitor on 48899/udp. Rapid7 reported this flaw together with CVE-2019-5637, a PROFINET DCP crash in the same runtime. Other TwinCAT and Beckhoff embedded PC pages are CVE-2019-16871, CVE-2020-12494 and CVE-2014-5415.

CVE-2019-5636 is not in the CISA KEV catalog as of 2026-11-20 (catalog version 2026.11.18, 1,786 entries). FIRST EPSS gives it 0.01427, the 73.5th percentile, in the 2026-11-19 dataset (CISA KEV, FIRST EPSS).

How to fix this class of issueNo dedicated SoftWSP guide covers this weakness class; the fix is usually the vendor patch or firmware update referenced above. Our related guide explains how to plan and verify it: NIST SP 800-40 Rev. 4: enterprise patch management planning, explained.

Evidence

  • NVD (read 2026-11-20): status Modified; published 2019-11-21; NVD Primary CVSS v3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, v2 5.0; Rapid7 Secondary CVSS v3.1 5.3 (A:L); CWE-404 (NVD and Rapid7); CPE twincat 2.0 build2304 and 3.1 build4024.0; description names version 4204.0; references Rapid7 blog and Beckhoff advisory 2019-004. — NVD
  • Beckhoff Security Advisory 2019-004 V1.1 (published 2019-08-07, updated 2020-07-30), read 2026-11-20: UDP packet with 0-byte data length shuts down the ADS Discovery Service, devices keep performing; affected TwinCAT 2 Build 2304 and TwinCAT 3.1 Build 4024.0 and below; update to 2305 or 4024.4 or newer; mitigation: block UDP port 48899 at the perimeter firewall; ADS only in trustful environments (advisory 2017-001); credits Andreas Galauner of Rapid7. — Beckhoff advisory 2019-004
  • Rapid7 R7-2019-32 (2019-10-08), read 2026-11-20: empty packet to UDP 48899 makes the ADS UDP handler thread exit (recvfrom returns 0); PLC no longer discoverable, existing routes keep working; restart by switching runtime to CONFIG or RUN; nmap zero-byte UDP probes can trigger it; CVSSv3 5.3; verified on 3.1.4022.30 on CX2030 and CX5140 (Windows 10 LTSC) and 3.1.4022.29 on CX5140 (Windows CE). — Rapid7
  • CVE record (checked 2026-11-20): state PUBLISHED, CNA Rapid7, published 2019-11-21; CNA CVSS v3.1 5.3, CWE-404; affected TwinCAT 2 2304 and TwinCAT 3.1 4204.0. — CVE.org
  • Not in the CISA KEV catalog, version 2026.11.18 (1,786 entries, released 2026-11-18), checked 2026-11-20. — CISA KEV
  • EPSS 0.01427, percentile 0.73538, dataset 2026-11-19, read 2026-11-20. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. Beckhoff Security Advisory 2019-004: ADS Discovery Service Shutdown by special UDP packet (PDF)
  3. Rapid7 R7-2019-32: Denial-of-Service Vulnerabilities in Beckhoff TwinCAT PLC Environment
  4. Beckhoff Security Advisory 2017-001: ADS is only designed for use in protected environments (PDF)
  5. CVE.org record CVE-2019-5636 (CNA: Rapid7)
  6. CISA KEV
  7. FIRST EPSS

Frequently asked questions

Does CVE-2019-5636 stop the PLC program?

No. Beckhoff advisory 2019-004 says TwinCAT devices keep performing as normal. Only the ADS Discovery Service stops, so the controller disappears from the TwinCAT broadcast search; existing routes keep working and new routes can still be added by hostname or IP address.

Which TwinCAT builds fix it?

TwinCAT 2 Build 2305 or newer and TwinCAT 3.1 Build 4024.4 or newer, per Beckhoff advisory 2019-004. TwinCAT 2 Build 2304 and TwinCAT 3.1 Build 4024.0 and earlier are affected.

Can a vulnerability scan trigger it?

Yes. Rapid7 notes that nmap and other scanners send zero-byte UDP packets to test whether a UDP port is open, so a routine scan of 48899/udp can shut the discovery service down on an unpatched runtime. Switching the runtime to CONFIG or RUN mode restarts it.

How do I mitigate it without updating?

Block UDP port 48899 at the perimeter firewall so packets from untrusted networks cannot reach the runtime, as Beckhoff advisory 2019-004 recommends, and keep ADS inside a trusted, segmented network.