VARIoT IoT vulnerabilities database

Affected products: vendor, model and version
CWE format is 'CWE-number'. Threat type can be: remote or local
Look up free text in title and description

VAR-202405-0157 CVE-2024-33499 Siemens SIMATIC RTLS Locating Manager Critical Resource Permission Assignment Improper Vulnerability CVSS V2: 8.3
CVSS V3: 9.1
Severity: CRITICAL
A vulnerability has been identified in SIMATIC RTLS Locating Manager (6GT2780-0DA00) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-0DA10) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-0DA20) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-0DA30) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-1EA10) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-1EA20) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-1EA30) (All versions < V3.0.1.1). The affected application assigns incorrect permissions to a user management component. This could allow a privileged attacker to escalate their privileges from the Administrators group to the Systemadministrator group. SIMATIC RTLS Locating Manager is used to configure, operate, and maintain SIMATIC RTLS devices, which are real-time wireless location systems that provide location solutions
VAR-202405-0158 CVE-2024-33498 Siemens SIMATIC RTLS Locating Manager Resource Consumption Uncontrolled Vulnerability CVSS V2: 5.0
CVSS V3: 5.3
Severity: MEDIUM
A vulnerability has been identified in SIMATIC RTLS Locating Manager (6GT2780-0DA00) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-0DA10) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-0DA20) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-0DA30) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-1EA10) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-1EA20) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-1EA30) (All versions < V3.0.1.1). Affected applications do not properly release memory that is allocated when handling specifically crafted incoming packets. This could allow an unauthenticated remote attacker to cause a denial of service condition by crashing the service when it runs out of memory. The service is restarted automatically after a short time. SIMATIC RTLS Locating Manager is used to configure, operate, and maintain SIMATIC RTLS devices, which is a real-time wireless location system that provides location solutions
VAR-202405-0153 CVE-2024-33497 Siemens SIMATIC RTLS Locating Manager Insufficient Protected Credentials Vulnerability (CNVD-2024-24518) CVSS V2: 5.7
CVSS V3: 6.3
Severity: MEDIUM
A vulnerability has been identified in SIMATIC RTLS Locating Manager (6GT2780-0DA00) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-0DA10) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-0DA20) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-0DA30) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-1EA10) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-1EA20) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-1EA30) (All versions < V3.0.1.1). Affected SIMATIC RTLS Locating Manager Track Viewer Client do not properly protect credentials that are used to authenticate to the server. This could allow an authenticated local attacker to extract the credentials and use them to escalate their access rights from the Manager to the Systemadministrator role. SIMATIC RTLS Locating Manager is used to configure, operate, and maintain SIMATIC RTLS devices, which is a real-time wireless location system that provides location solutions
VAR-202405-0159 CVE-2024-33496 Siemens SIMATIC RTLS Locating Manager Insufficient Protected Credentials Vulnerability CVSS V2: 7.2
CVSS V3: 6.3
Severity: MEDIUM
A vulnerability has been identified in SIMATIC RTLS Locating Manager (6GT2780-0DA00) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-0DA10) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-0DA20) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-0DA30) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-1EA10) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-1EA20) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-1EA30) (All versions < V3.0.1.1). Affected SIMATIC RTLS Locating Manager Report Clients do not properly protect credentials that are used to authenticate to the server. This could allow an authenticated local attacker to extract the credentials and use them to escalate their access rights from the Manager to the Systemadministrator role. SIMATIC RTLS Locating Manager is used to configure, operate, and maintain SIMATIC RTLS devices, which is a real-time wireless location system that provides location solutions
VAR-202405-0156 CVE-2024-33495 Siemens SIMATIC RTLS Locating Manager Resource Allocation Error Vulnerability CVSS V2: 6.8
CVSS V3: 6.5
Severity: MEDIUM
A vulnerability has been identified in SIMATIC RTLS Locating Manager (6GT2780-0DA00) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-0DA10) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-0DA20) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-0DA30) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-1EA10) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-1EA20) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-1EA30) (All versions < V3.0.1.1). The affected application does not properly limit the size of specific logs. This could allow an unauthenticated remote attacker to exhaust system resources by creating a great number of log entries which could potentially lead to a denial of service condition. A successful exploitation requires the attacker to have access to specific SIMATIC RTLS Locating Manager Clients in the deployment. SIMATIC RTLS Locating Manager is used to configure, operate, and maintain SIMATIC RTLS devices, which is a real-time wireless location system that provides location solutions
VAR-202405-0154 CVE-2024-33494 Siemens SIMATIC RTLS Locating Manager Insufficient Data Authenticity Verification Vulnerability CVSS V2: 6.4
CVSS V3: 6.5
Severity: MEDIUM
A vulnerability has been identified in SIMATIC RTLS Locating Manager (6GT2780-0DA00) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-0DA10) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-0DA20) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-0DA30) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-1EA10) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-1EA20) (All versions < V3.0.1.1), SIMATIC RTLS Locating Manager (6GT2780-1EA30) (All versions < V3.0.1.1). Affected components do not properly authenticate heartbeat messages. This could allow an unauthenticated remote attacker to affected the availability of secondary RTLS systems configured using a TeeRevProxy service and potentially cause loss of data generated during the time the attack is ongoing. SIMATIC RTLS Locating Manager is used to configure, operate, and maintain SIMATIC RTLS devices, which is a real-time wireless location system that provides location solutions. Siemens SIMATIC RTLS Locating Manager has an insufficient data authenticity verification vulnerability, which is due to the affected component failing to properly verify the heartbeat message
VAR-202405-0203 CVE-2024-32742 Siemens SIMATIC CN 4100 has an unspecified vulnerability CVSS V2: 8.3
CVSS V3: 7.6
Severity: HIGH
A vulnerability has been identified in SIMATIC CN 4100 (All versions < V3.0). The affected device contains an unrestricted USB port. An attacker with local access to the device could potentially misuse the port for booting another operating system and gain complete read/write access to the filesystem. Siemens SIMATIC CN 4100 is a communication node of the German company Siemens
VAR-202405-0204 CVE-2024-32741 Siemens SIMATIC CN 4100 Hard-coded Password Vulnerability CVSS V2: 10.0
CVSS V3: 10.0
Severity: CRITICAL
A vulnerability has been identified in SIMATIC CN 4100 (All versions < V3.0). The affected device contains hard coded password which is used for the privileged system user `root` and for the boot loader `GRUB` by default . An attacker who manages to crack the password hash gains root access to the device. Siemens SIMATIC CN 4100 is a communication node of the German company Siemens
VAR-202405-0205 CVE-2024-32740 Siemens SIMATIC CN 4100 Hard-coded Credentials Vulnerability CVSS V2: 10.0
CVSS V3: 9.8
Severity: CRITICAL
A vulnerability has been identified in SIMATIC CN 4100 (All versions < V3.0). The affected device contains undocumented users and credentials. An attacker could misuse the credentials to compromise the device locally or over the network. Siemens SIMATIC CN 4100 is a communication node of Siemens, a German company. Siemens SIMATIC CN 4100 has a security vulnerability
VAR-202405-0279 CVE-2024-32639 Siemens Tecnomatix Plant Simulation MODEL File Parsing Out-Of-Bounds Write Remote Code Execution Vulnerability CVSS V2: 7.2
CVSS V3: 7.8
Severity: HIGH
A vulnerability has been identified in Tecnomatix Plant Simulation V2302 (All versions < V2302.0011). The affected application contains an out of bounds write past the end of an allocated buffer while parsing a specially crafted MODEL file. This could allow an attacker to execute code in the context of the current process. (ZDI-CAN-22974). This vulnerability allows remote attackers to execute arbitrary code on affected installations of Siemens Tecnomatix Plant Simulation. User interaction is required to exploit this vulnerability in that the target must visit a malicious page or open a malicious file.The specific flaw exists within the parsing of MODEL files. Siemens Tecnomatix Plant Simulation is an industrial control device of Siemens, Germany. It uses the function of discrete event simulation to analyze and optimize production volume, thereby improving the performance of manufacturing systems
VAR-202405-1117 CVE-2024-32355 TOTOLINK X5000R password parameter command injection vulnerability CVSS V2: 7.7
CVSS V3: 8.0
Severity: HIGH
TOTOLINK X5000R V9.1.0cu.2350_B20230313 was discovered to contain a command injection vulnerability via the 'password' parameter in the setSSServer function. TOTOLINK X5000R is a router of China's TOTOLINK Electronics. Attackers can exploit this vulnerability to cause arbitrary command execution
VAR-202405-1262 CVE-2024-32354 TOTOLINK X5000R timeout parameter command injection vulnerability CVSS V2: 5.9
CVSS V3: 6.0
Severity: MEDIUM
TOTOLINK X5000R V9.1.0cu.2350_B20230313 was discovered to contain a command injection vulnerability via the 'timeout' parameter in the setSSServer function at /cgi-bin/cstecgi.cgi. TOTOLINK X5000R is a router of China's TOTOLINK Electronics. Attackers can exploit this vulnerability to cause arbitrary command execution
VAR-202405-0963 CVE-2024-32353 TOTOLINK X5000R port parameter command injection vulnerability CVSS V2: 10.0
CVSS V3: 9.8
Severity: CRITICAL
TOTOLINK X5000R V9.1.0cu.2350_B20230313 was discovered to contain a command injection vulnerability via the 'port' parameter in the setSSServer function at /cgi-bin/cstecgi.cgi. TOTOLINK X5000R is a router of China's TOTOLINK Electronics. Attackers can exploit this vulnerability to cause arbitrary command execution
VAR-202405-1423 CVE-2024-32352 TOTOLINK X5000R ipsecL2tpEnable parameter code execution vulnerability CVSS V2: 9.0
CVSS V3: 8.8
Severity: HIGH
TOTOLINK X5000R V9.1.0cu.2350_B20230313 was discovered to contain an authenticated remote command execution (RCE) vulnerability via the "ipsecL2tpEnable" parameter in the "cstecgi.cgi" binary. TOTOLINK X5000R is a router of China's TOTOLINK Electronics. The vulnerability is caused by the ipsecL2tpEnable parameter of cstecgi.cgi failing to properly filter special elements of the constructed code segment. An attacker can exploit this vulnerability to cause arbitrary code execution
VAR-202405-1577 CVE-2024-32351 TOTOLINK X5000R mru parameter code execution vulnerability CVSS V2: 9.0
CVSS V3: 8.8
Severity: HIGH
TOTOLINK X5000R V9.1.0cu.2350_B20230313 was discovered to contain an authenticated remote command execution (RCE) vulnerability via the "mru" parameter in the "cstecgi.cgi" binary. TOTOLINK X5000R is a router of China's TOTOLINK Electronics. TOTOLINK X5000R has a code execution vulnerability, which is caused by the parameter mru of cstecgi.cgi failing to properly filter special elements in the constructed code segment. Attackers can exploit this vulnerability to cause arbitrary code execution
VAR-202405-0384 CVE-2024-32350 TOTOLINK X5000R ipsecPsk parameter code execution vulnerability CVSS V2: 9.0
CVSS V3: 8.8
Severity: HIGH
TOTOLINK X5000R V9.1.0cu.2350_B20230313 was discovered to contain an authenticated remote command execution (RCE) vulnerability via the "ipsecPsk" parameter in the "cstecgi.cgi" binary. TOTOLINK X5000R is a router of China's TOTOLINK Electronics. TOTOLINK X5000R has a code execution vulnerability, which is caused by the ipsecPsk parameter of cstecgi.cgi failing to properly filter special elements of the constructed code segment. Attackers can exploit this vulnerability to cause arbitrary code execution
VAR-202405-0812 CVE-2024-32349 TOTOLINK X5000R mtu parameter code execution vulnerability CVSS V2: 5.9
CVSS V3: 6.0
Severity: MEDIUM
TOTOLINK X5000R V9.1.0cu.2350_B20230313 was discovered to contain an authenticated remote command execution (RCE) vulnerability via the "mtu" parameters in the "cstecgi.cgi" binary. TOTOLINK X5000R is a router of China's TOTOLINK Electronics. The vulnerability is caused by the mtu parameter of cstecgi.cgi failing to properly filter the special elements of the constructed code segment. An attacker can exploit this vulnerability to cause arbitrary code execution
VAR-202405-0175 CVE-2024-31486 Siemens SICAM product sensitive information plaintext storage vulnerability CVSS V2: 4.9
CVSS V3: 5.3
Severity: Medium
A vulnerability has been identified in OPUPI0 AMQP/MQTT (All versions < V5.30). The affected devices stores MQTT client passwords without sufficient protection on the devices. An attacker with remote shell access or physical access could retrieve the credentials leading to confidentiality loss. SICAM 8 Power automation platform is a universal, all-in-one hardware and software-based solution for all applications in the power supply sector. The SICAM A8000 RTU (Remote Terminal Unit) series is a modular device family for telecontrol and automation applications in all areas of energy supply. SICAM EGS (Enhanced Grid Sensor) is a gateway for local substations in distribution networks. Siemens SICAM products have a sensitive information plaintext storage vulnerability. SEC Consult Vulnerability Lab Security Advisory < 20240626-0 > ======================================================================= title: Multiple Vulnerabilities in Power Automation Products product: Siemens CP-8000/CP-8021/CP8-022/CP-8031/CP-8050/SICORE vulnerable version: CPC80 < V16.41 / CPCI85 < V5.30 / OPUPI0 < V5.30 / SICORE < V1.3.0 / CPCX26 < V06.02 for CP-2016 and PCCX26 < V06.05 for CP-2019 in SICAM AK3 / ETA4 < V10.46 and ETA5 < V03.27 for SM-2558 ins SICAM AK3, SICAM BC and SICAM TM fixed version: CPC80 V16.41 / CPCI85 V5.30 / OPUPI V5.30 / SICORE V1.3.0 / CPCX26 V06.02 / PCCX26 V06.05 / ETA4 V10.46 / ETA5 V03.27 CVE number: CVE-2024-31484, CVE-2024-31485, CVE-2024-31486 impact: high homepage: https://www.siemens.com/global/en/products/energy/energy-automation-and-smart-grid.html found: 2023-04-03 and 2024-01-12 by: Stefan Viehboeck (Office Vienna) Steffen Robertz (Office Vienna) Gerhard Hechenberger (Office Vienna) Constantin Schieber-Knoebl (Office Vienna) SEC Consult Vulnerability Lab An integrated part of SEC Consult, an Eviden business Europe | Asia https://www.sec-consult.com ======================================================================= Vendor description: ------------------- "We are a technology company focused on industry, infrastructure, transport, and healthcare. From more resource-efficient factories, resilient supply chains, and smarter buildings and grids, to cleaner and more comfortable transportation as well as advanced healthcare, we create technology with purpose adding real value for customers." Source: https://new.siemens.com/global/en/company/about.html Business recommendation: ------------------------ The vendor provides a patch which should be installed immediately. SEC Consult highly recommends to perform a thorough security review of the product conducted by security professionals to identify and resolve potential further security issues. Vulnerability overview/description: ----------------------------------- 1) Buffer Overread (Only CP-8000/CP-8021/CP-8022/CP-8031/CP-8050/CPCX26/PCCX26/ETA4/ETA5, CVE-2024-31484) The webserver running on the CP-8050 and CP-8031 is vulnerable to a buffer overread vulnerability. The value of the HTTP header "Session-ID" is processed and used in a "strncpy" call without proper termination. Thus, data structures from the BSS segment will be leaked in the response. Attackers might be able to read sensitive data from memory. 2) Privilege Escalation (Only CP-8031/CP-8050 and SICORE devices, CVE-2024-31485) An attacker with an account with the viewer (or higher) role can intercept unencrypted traffic of other users of the web interface. Thus, the attacker can intercept higher privileged user accounts and passwords and might gain access to their accounts to perform tasks with elevated privileges. 3) Unsafe Storage of MQTT Client Passwords (Only CP-8031/CP-8050, CVE-2024-31486) A PLC with the OPUPI0 MQTT application installed is able to connect to an MQTT server. The configured MQTT password for the server is stored in cleartext on the device and can be read by exploiting a potential code execution or file disclosure vulnerability or with physical access to the device. Proof of concept: ----------------- 1) Buffer Overread (Only CP-8000/CP-8021/CP-8022/CP-8031/CP-8050/CPCX26/PCCX26/ETA4/ETA5, CVE-2024-31484) The buffer overread can be triggered by sending a "Session-ID" in the HTTP request header with exactly 20 bytes. This can be done with e.g. this request: POST /SICAM_TOOLBOX_1703_remote_connection_00.htm HTTP/1.1 User-Agent: SICAM TOOLBOX II Version: 1 Session-ID: 3814280BA9921c6cAAAA Sequence-ID: 1 Content-Length: 8 Content-Type: text/plain KeepAlive: 5 Connection: close type=3 The server answers with following response: HTTP/1.1 200 OK Server: SICAM 1703 Version: 1 Session-ID: 3814280BA9921c6cAAAAæk¤ Cache-Control: max-age=0, private X-Frame-Options: sameorigin Strict-Transport-Security: max-age=31536000; includeSubdomains Content-Security-Policy: default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' X-XSS-Protection: 1; mode=block X-Permitted-Cross-Domain-Policies: none Content-Length: 71 Connection: close Date: Wed, 30 Mar 2022 01:38:37 GMT Sequence-ID: 1 Content-Type: text/plain Content-Length: 8 type=4 The Session-ID in the response leaks at least 4 additional bytes. Further, the structure of the response is broken, as some HTTP headers are suddenly part of the body. The vulnerability most likely stems from a misuse of the strncpy function. The following code segment was analyzed (RTUM85.elf, Offset 0x1d50de): ptr_fcgi_header = get_fcgi_param(fcgi_struct, "HTTP_SESSION_ID); if (ptr_fcgi_header == (char*) 0x00) goto LAB_001d4a66; if ( is_a_session_available == 0 ) { strncpy(&session_id, ptr_fcgi_header, 0x14); } strncpy is called with a length parameter of 0x14. To trigger the vulnerability, we are sending exactly 0x14 bytes. Thus, we believe that the global session_id variable is never properly terminated with a Null-pointer. libc's documentation even contains a warning for this case: "If there is no null byte among the first n bytes of src, the string placed in dest will not be null-terminated." Thus, if the response is built, every data structure in BSS following the session_id global will be printed as string until a Null byte is encountered. 2) Privilege Escalation (Only CP-8031/CP-8050 and SICORE devices, CVE-2024-31485) An attacker with an account with the viewer (or higher) role can intercept unencrypted traffic of other users of the web interface. Thus, the attacker can intercept higher privileged user accounts and passwords. By starting the Ethernet Packet Capture (Home -> Monitoring & Simulation -> Ethernet Packet Capture), a request is sent. This request can be modified by an interceptor proxy (e.g. Burp Suite). POST /sicweb-ajax/rtum85/cview HTTP/1.1 Host: HOST User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0 Accept: */* Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Content-Type: application/xml SICWEB-SID: xNG1v825qFmCMo8hpjfISlVARKipW1B+lz9d5FoBxipR87VT Content-Length: 198 Origin: http:// HOST Connection: close Referer: http:// HOST/ <?xml version="1.0" encoding="UTF-8"?> <Cmd_SetCustomViewValue><view id="packet_capture"><parameter id="p0"> <value>lo</value> </parameter></view></Cmd_SetCustomViewValue> The attacker can then send the parameter id p0 to the value "lo" and start the packet capture in order to dump from the loopback interface. It is a valid interface, as it only consist of lowercase characters and numbers (fix for CVE-2023-33919). However, the webserver implements TLS in a stunnel fashion. It accepts all TLS traffic on port 443, then decrypts it and forwards it via loopback interface to port 80. By being able to read the loopback traffic, an attacker can now see all communication, including passwords of higher privileged users. 3) Unsafe Storage of MQTT Passwords (Only CP-8031/CP-8050, CVE-2024-31486) To demonstrate the issue, the following parameters were set for the MQTT client using the Siemens Toolbox II: * "8 MQTT password" mqtt_pw_sectest * "9 MQTT username" mqtt_sectest The password (together with the username) can be located in the /ies/data/local/system/iescfg.iar file on the device, which can be retrieved by shell access/code execution on the device or by desoldering and reading its unencrypted flash memory chip: ----------------------------------------------------------------------- grep -rain "mqtt_pw_sectest" /ies/data/local/system/iescfg.iar [...] mqtt mqtt_sectest. mqtt_pw_sectest. < �MQTT_Broker [...] ----------------------------------------------------------------------- Vulnerable / tested versions: ----------------------------- The following version has been tested which was the latest version available at the time of the test: Vulnerability 1 and 2 were confirmed on Siemens SICAM A8000 CP-8031 V05.12 Vulnerability 3 was confirmed on Siemens A8000 CP-8050 V04.92 Vendor contact timeline: ------------------------ 2023-04-18: Contacting vendor through productcert@siemens.com for vulnerability 3 2023-04-19: Advisory will be handled as case #92461. 2023-06-13: Siemens releases advisory for other vulnerabilities, see https://sec-consult.com/vulnerability-lab/advisory/multiple-vulnerabilities-siemens-a8000/ 2023-10-09: Requesting status update 2024-04-03: Requesting status update. 2024-04-04: Unsafe Storage of MQTT password: fix will be released in April 2024, Siemens advisory scheduled for May 2024 2024-04-11: Contacting vendor through productcert@siemens.com for Vulnerability 1 and 2 2024-04-12: Siemens assigned case #68662 for Vulnerability 1,2 2024-05-14: Siemens publishes SSA-871704 for vulnerability 1,2,3 2024-06-11: Siemens publishes SSA-620338 for Vulnerability 1 2024-06-26: Public release of advisory Solution: --------- The vendor provides a patch which can be downloaded at the following URLs depending on the affected device: CPC80 Central Processing/Communication: The firmware CPC80 V16.41 is present within “CP-8000/CP-8021/CP-8022 Package” V16.41 https://support.industry.siemens.com/cs/ww/en/view/109812178/ CPCI85 Central Processing/Communication: The firmware CPCI85 V5.30 is present within "CP-8031/CP-8050 Package" V5.30 https://support.industry.siemens.com/cs/ww/en/view/109804985/ SICORE Base system: The firmware SICORE V1.3.0 is present within "SICAM 8 Software Solution Package" V5.30 https://support.industry.siemens.com/cs/ww/en/view/109818240/ OPUPI0 AMQP/MQTT: The firmware OPUPI0 V5.30 is present within "CP-8031/CP-8050 Package" V5.30 https://support.industry.siemens.com/cs/ww/en/view/109804985/ CPCX26 Central Processing/Communication: The firmware CPCX26 V06.02 is present within “SICAM RTUs AK3 Package” V06.02 https://support.industry.siemens.com/cs/ww/en/view/109813252/ PCCX26 Ax 1703 PE, Contr, Communication Element: The firmware PCCX26 V06.05 is present within “SICAM RTUs AK3 Package” V06.02 https://support.industry.siemens.com/cs/ww/en/view/109813252/ ETA4 Ethernet Interface IEC60870-5-104: The firmware ETA4 V10.46 is present within “SICAM RTUs AK3 Package” V06.02 https://support.industry.siemens.com/cs/ww/en/view/109813252/ ETA5 Ethernet Int. 1x100TX IEC61850 Ed.2: The firmware ETA5 V03.27 is present within “SICAM RTUs AK3 Package” V06.02 https://support.industry.siemens.com/cs/ww/en/view/109813252/ Additional information from the vendor can be found in their advisories: https://cert-portal.siemens.com/productcert/html/ssa-871704.html https://cert-portal.siemens.com/productcert/html/ssa-620338.html Workaround: ----------- Limit network and physical access to the PLC. Advisory URL: ------------- https://sec-consult.com/vulnerability-lab/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SEC Consult Vulnerability Lab An integrated part of SEC Consult, an Eviden business Europe | Asia About SEC Consult Vulnerability Lab The SEC Consult Vulnerability Lab is an integrated part of SEC Consult, an Eviden business. 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: security-research at sec-consult dot com Web: https://www.sec-consult.com Blog: https://blog.sec-consult.com Twitter: https://twitter.com/sec_consult EOF Stefan Viehboeck, Steffen Robertz, Gerhard Hechenberger, Constantin Schieber-Knoebl / @2024
VAR-202405-0176 CVE-2024-31485 Siemens SICAM Product Command Injection Vulnerability CVSS V2: 8.3
CVSS V3: 7.2
Severity: High
A vulnerability has been identified in CPCI85 Central Processing/Communication (All versions < V5.30), SICORE Base system (All versions < V1.3.0). The web interface of affected devices is vulnerable to command injection due to missing server side input sanitation. This could allow an authenticated privileged remote attacker to execute arbitrary code with root privileges. SICAM 8 Power automation platform is a universal, all-in-one hardware and software-based solution for all applications in the power supply sector. The SICAM A8000 RTU (Remote Terminal Unit) series is a modular device family for telecontrol and automation applications in all areas of energy supply. SICAM EGS (Enhanced Grid Sensor) is a gateway for local substations in distribution networks. SEC Consult Vulnerability Lab Security Advisory < 20240626-0 > ======================================================================= title: Multiple Vulnerabilities in Power Automation Products product: Siemens CP-8000/CP-8021/CP8-022/CP-8031/CP-8050/SICORE vulnerable version: CPC80 < V16.41 / CPCI85 < V5.30 / OPUPI0 < V5.30 / SICORE < V1.3.0 / CPCX26 < V06.02 for CP-2016 and PCCX26 < V06.05 for CP-2019 in SICAM AK3 / ETA4 < V10.46 and ETA5 < V03.27 for SM-2558 ins SICAM AK3, SICAM BC and SICAM TM fixed version: CPC80 V16.41 / CPCI85 V5.30 / OPUPI V5.30 / SICORE V1.3.0 / CPCX26 V06.02 / PCCX26 V06.05 / ETA4 V10.46 / ETA5 V03.27 CVE number: CVE-2024-31484, CVE-2024-31485, CVE-2024-31486 impact: high homepage: https://www.siemens.com/global/en/products/energy/energy-automation-and-smart-grid.html found: 2023-04-03 and 2024-01-12 by: Stefan Viehboeck (Office Vienna) Steffen Robertz (Office Vienna) Gerhard Hechenberger (Office Vienna) Constantin Schieber-Knoebl (Office Vienna) SEC Consult Vulnerability Lab An integrated part of SEC Consult, an Eviden business Europe | Asia https://www.sec-consult.com ======================================================================= Vendor description: ------------------- "We are a technology company focused on industry, infrastructure, transport, and healthcare. From more resource-efficient factories, resilient supply chains, and smarter buildings and grids, to cleaner and more comfortable transportation as well as advanced healthcare, we create technology with purpose adding real value for customers." Source: https://new.siemens.com/global/en/company/about.html Business recommendation: ------------------------ The vendor provides a patch which should be installed immediately. SEC Consult highly recommends to perform a thorough security review of the product conducted by security professionals to identify and resolve potential further security issues. Vulnerability overview/description: ----------------------------------- 1) Buffer Overread (Only CP-8000/CP-8021/CP-8022/CP-8031/CP-8050/CPCX26/PCCX26/ETA4/ETA5, CVE-2024-31484) The webserver running on the CP-8050 and CP-8031 is vulnerable to a buffer overread vulnerability. The value of the HTTP header "Session-ID" is processed and used in a "strncpy" call without proper termination. Thus, data structures from the BSS segment will be leaked in the response. Attackers might be able to read sensitive data from memory. 2) Privilege Escalation (Only CP-8031/CP-8050 and SICORE devices, CVE-2024-31485) An attacker with an account with the viewer (or higher) role can intercept unencrypted traffic of other users of the web interface. Thus, the attacker can intercept higher privileged user accounts and passwords and might gain access to their accounts to perform tasks with elevated privileges. 3) Unsafe Storage of MQTT Client Passwords (Only CP-8031/CP-8050, CVE-2024-31486) A PLC with the OPUPI0 MQTT application installed is able to connect to an MQTT server. The configured MQTT password for the server is stored in cleartext on the device and can be read by exploiting a potential code execution or file disclosure vulnerability or with physical access to the device. Proof of concept: ----------------- 1) Buffer Overread (Only CP-8000/CP-8021/CP-8022/CP-8031/CP-8050/CPCX26/PCCX26/ETA4/ETA5, CVE-2024-31484) The buffer overread can be triggered by sending a "Session-ID" in the HTTP request header with exactly 20 bytes. This can be done with e.g. this request: POST /SICAM_TOOLBOX_1703_remote_connection_00.htm HTTP/1.1 User-Agent: SICAM TOOLBOX II Version: 1 Session-ID: 3814280BA9921c6cAAAA Sequence-ID: 1 Content-Length: 8 Content-Type: text/plain KeepAlive: 5 Connection: close type=3 The server answers with following response: HTTP/1.1 200 OK Server: SICAM 1703 Version: 1 Session-ID: 3814280BA9921c6cAAAAæk¤ Cache-Control: max-age=0, private X-Frame-Options: sameorigin Strict-Transport-Security: max-age=31536000; includeSubdomains Content-Security-Policy: default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' X-XSS-Protection: 1; mode=block X-Permitted-Cross-Domain-Policies: none Content-Length: 71 Connection: close Date: Wed, 30 Mar 2022 01:38:37 GMT Sequence-ID: 1 Content-Type: text/plain Content-Length: 8 type=4 The Session-ID in the response leaks at least 4 additional bytes. Further, the structure of the response is broken, as some HTTP headers are suddenly part of the body. The vulnerability most likely stems from a misuse of the strncpy function. The following code segment was analyzed (RTUM85.elf, Offset 0x1d50de): ptr_fcgi_header = get_fcgi_param(fcgi_struct, "HTTP_SESSION_ID); if (ptr_fcgi_header == (char*) 0x00) goto LAB_001d4a66; if ( is_a_session_available == 0 ) { strncpy(&session_id, ptr_fcgi_header, 0x14); } strncpy is called with a length parameter of 0x14. To trigger the vulnerability, we are sending exactly 0x14 bytes. Thus, we believe that the global session_id variable is never properly terminated with a Null-pointer. libc's documentation even contains a warning for this case: "If there is no null byte among the first n bytes of src, the string placed in dest will not be null-terminated." Thus, if the response is built, every data structure in BSS following the session_id global will be printed as string until a Null byte is encountered. 2) Privilege Escalation (Only CP-8031/CP-8050 and SICORE devices, CVE-2024-31485) An attacker with an account with the viewer (or higher) role can intercept unencrypted traffic of other users of the web interface. Thus, the attacker can intercept higher privileged user accounts and passwords. By starting the Ethernet Packet Capture (Home -> Monitoring & Simulation -> Ethernet Packet Capture), a request is sent. This request can be modified by an interceptor proxy (e.g. Burp Suite). POST /sicweb-ajax/rtum85/cview HTTP/1.1 Host: HOST User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0 Accept: */* Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Content-Type: application/xml SICWEB-SID: xNG1v825qFmCMo8hpjfISlVARKipW1B+lz9d5FoBxipR87VT Content-Length: 198 Origin: http:// HOST Connection: close Referer: http:// HOST/ <?xml version="1.0" encoding="UTF-8"?> <Cmd_SetCustomViewValue><view id="packet_capture"><parameter id="p0"> <value>lo</value> </parameter></view></Cmd_SetCustomViewValue> The attacker can then send the parameter id p0 to the value "lo" and start the packet capture in order to dump from the loopback interface. It is a valid interface, as it only consist of lowercase characters and numbers (fix for CVE-2023-33919). However, the webserver implements TLS in a stunnel fashion. It accepts all TLS traffic on port 443, then decrypts it and forwards it via loopback interface to port 80. By being able to read the loopback traffic, an attacker can now see all communication, including passwords of higher privileged users. 3) Unsafe Storage of MQTT Passwords (Only CP-8031/CP-8050, CVE-2024-31486) To demonstrate the issue, the following parameters were set for the MQTT client using the Siemens Toolbox II: * "8 MQTT password" mqtt_pw_sectest * "9 MQTT username" mqtt_sectest The password (together with the username) can be located in the /ies/data/local/system/iescfg.iar file on the device, which can be retrieved by shell access/code execution on the device or by desoldering and reading its unencrypted flash memory chip: ----------------------------------------------------------------------- grep -rain "mqtt_pw_sectest" /ies/data/local/system/iescfg.iar [...] mqtt mqtt_sectest. mqtt_pw_sectest. < �MQTT_Broker [...] ----------------------------------------------------------------------- Vulnerable / tested versions: ----------------------------- The following version has been tested which was the latest version available at the time of the test: Vulnerability 1 and 2 were confirmed on Siemens SICAM A8000 CP-8031 V05.12 Vulnerability 3 was confirmed on Siemens A8000 CP-8050 V04.92 Vendor contact timeline: ------------------------ 2023-04-18: Contacting vendor through productcert@siemens.com for vulnerability 3 2023-04-19: Advisory will be handled as case #92461. 2023-06-13: Siemens releases advisory for other vulnerabilities, see https://sec-consult.com/vulnerability-lab/advisory/multiple-vulnerabilities-siemens-a8000/ 2023-10-09: Requesting status update 2024-04-03: Requesting status update. 2024-04-04: Unsafe Storage of MQTT password: fix will be released in April 2024, Siemens advisory scheduled for May 2024 2024-04-11: Contacting vendor through productcert@siemens.com for Vulnerability 1 and 2 2024-04-12: Siemens assigned case #68662 for Vulnerability 1,2 2024-05-14: Siemens publishes SSA-871704 for vulnerability 1,2,3 2024-06-11: Siemens publishes SSA-620338 for Vulnerability 1 2024-06-26: Public release of advisory Solution: --------- The vendor provides a patch which can be downloaded at the following URLs depending on the affected device: CPC80 Central Processing/Communication: The firmware CPC80 V16.41 is present within “CP-8000/CP-8021/CP-8022 Package” V16.41 https://support.industry.siemens.com/cs/ww/en/view/109812178/ CPCI85 Central Processing/Communication: The firmware CPCI85 V5.30 is present within "CP-8031/CP-8050 Package" V5.30 https://support.industry.siemens.com/cs/ww/en/view/109804985/ SICORE Base system: The firmware SICORE V1.3.0 is present within "SICAM 8 Software Solution Package" V5.30 https://support.industry.siemens.com/cs/ww/en/view/109818240/ OPUPI0 AMQP/MQTT: The firmware OPUPI0 V5.30 is present within "CP-8031/CP-8050 Package" V5.30 https://support.industry.siemens.com/cs/ww/en/view/109804985/ CPCX26 Central Processing/Communication: The firmware CPCX26 V06.02 is present within “SICAM RTUs AK3 Package” V06.02 https://support.industry.siemens.com/cs/ww/en/view/109813252/ PCCX26 Ax 1703 PE, Contr, Communication Element: The firmware PCCX26 V06.05 is present within “SICAM RTUs AK3 Package” V06.02 https://support.industry.siemens.com/cs/ww/en/view/109813252/ ETA4 Ethernet Interface IEC60870-5-104: The firmware ETA4 V10.46 is present within “SICAM RTUs AK3 Package” V06.02 https://support.industry.siemens.com/cs/ww/en/view/109813252/ ETA5 Ethernet Int. 1x100TX IEC61850 Ed.2: The firmware ETA5 V03.27 is present within “SICAM RTUs AK3 Package” V06.02 https://support.industry.siemens.com/cs/ww/en/view/109813252/ Additional information from the vendor can be found in their advisories: https://cert-portal.siemens.com/productcert/html/ssa-871704.html https://cert-portal.siemens.com/productcert/html/ssa-620338.html Workaround: ----------- Limit network and physical access to the PLC. Advisory URL: ------------- https://sec-consult.com/vulnerability-lab/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SEC Consult Vulnerability Lab An integrated part of SEC Consult, an Eviden business Europe | Asia About SEC Consult Vulnerability Lab The SEC Consult Vulnerability Lab is an integrated part of SEC Consult, an Eviden business. 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: security-research at sec-consult dot com Web: https://www.sec-consult.com Blog: https://blog.sec-consult.com Twitter: https://twitter.com/sec_consult EOF Stefan Viehboeck, Steffen Robertz, Gerhard Hechenberger, Constantin Schieber-Knoebl / @2024
VAR-202405-0174 CVE-2024-31484 Siemens SICAM products have unspecified vulnerabilities CVSS V2: 7.2
CVSS V3: 7.8
Severity: High
A vulnerability has been identified in CPC80 Central Processing/Communication (All versions < V16.41), CPCI85 Central Processing/Communication (All versions < V5.30), CPCX26 Central Processing/Communication (All versions < V06.02), ETA4 Ethernet Interface IEC60870-5-104 (All versions < V10.46), ETA5 Ethernet Int. 1x100TX IEC61850 Ed.2 (All versions < V03.27), PCCX26 Ax 1703 PE, Contr, Communication Element (All versions < V06.05). The affected devices contain an improper null termination vulnerability while parsing a specific HTTP header. This could allow an attacker to execute code in the context of the current process or lead to denial of service condition. SICAM 8 Power automation platform is a universal, all-in-one hardware and software-based solution for all applications in the field of power supply. The SICAM A8000 RTU (Remote Terminal Unit) series is a modular device family for telecontrol and automation applications in all areas of energy supply. SICAM EGS (Enhanced Grid Sensor) is a gateway for local substations in distribution networks. SEC Consult Vulnerability Lab Security Advisory < 20240626-0 > ======================================================================= title: Multiple Vulnerabilities in Power Automation Products product: Siemens CP-8000/CP-8021/CP8-022/CP-8031/CP-8050/SICORE vulnerable version: CPC80 < V16.41 / CPCI85 < V5.30 / OPUPI0 < V5.30 / SICORE < V1.3.0 / CPCX26 < V06.02 for CP-2016 and PCCX26 < V06.05 for CP-2019 in SICAM AK3 / ETA4 < V10.46 and ETA5 < V03.27 for SM-2558 ins SICAM AK3, SICAM BC and SICAM TM fixed version: CPC80 V16.41 / CPCI85 V5.30 / OPUPI V5.30 / SICORE V1.3.0 / CPCX26 V06.02 / PCCX26 V06.05 / ETA4 V10.46 / ETA5 V03.27 CVE number: CVE-2024-31484, CVE-2024-31485, CVE-2024-31486 impact: high homepage: https://www.siemens.com/global/en/products/energy/energy-automation-and-smart-grid.html found: 2023-04-03 and 2024-01-12 by: Stefan Viehboeck (Office Vienna) Steffen Robertz (Office Vienna) Gerhard Hechenberger (Office Vienna) Constantin Schieber-Knoebl (Office Vienna) SEC Consult Vulnerability Lab An integrated part of SEC Consult, an Eviden business Europe | Asia https://www.sec-consult.com ======================================================================= Vendor description: ------------------- "We are a technology company focused on industry, infrastructure, transport, and healthcare. From more resource-efficient factories, resilient supply chains, and smarter buildings and grids, to cleaner and more comfortable transportation as well as advanced healthcare, we create technology with purpose adding real value for customers." Source: https://new.siemens.com/global/en/company/about.html Business recommendation: ------------------------ The vendor provides a patch which should be installed immediately. SEC Consult highly recommends to perform a thorough security review of the product conducted by security professionals to identify and resolve potential further security issues. Vulnerability overview/description: ----------------------------------- 1) Buffer Overread (Only CP-8000/CP-8021/CP-8022/CP-8031/CP-8050/CPCX26/PCCX26/ETA4/ETA5, CVE-2024-31484) The webserver running on the CP-8050 and CP-8031 is vulnerable to a buffer overread vulnerability. The value of the HTTP header "Session-ID" is processed and used in a "strncpy" call without proper termination. Thus, data structures from the BSS segment will be leaked in the response. Attackers might be able to read sensitive data from memory. 2) Privilege Escalation (Only CP-8031/CP-8050 and SICORE devices, CVE-2024-31485) An attacker with an account with the viewer (or higher) role can intercept unencrypted traffic of other users of the web interface. Thus, the attacker can intercept higher privileged user accounts and passwords and might gain access to their accounts to perform tasks with elevated privileges. 3) Unsafe Storage of MQTT Client Passwords (Only CP-8031/CP-8050, CVE-2024-31486) A PLC with the OPUPI0 MQTT application installed is able to connect to an MQTT server. The configured MQTT password for the server is stored in cleartext on the device and can be read by exploiting a potential code execution or file disclosure vulnerability or with physical access to the device. Proof of concept: ----------------- 1) Buffer Overread (Only CP-8000/CP-8021/CP-8022/CP-8031/CP-8050/CPCX26/PCCX26/ETA4/ETA5, CVE-2024-31484) The buffer overread can be triggered by sending a "Session-ID" in the HTTP request header with exactly 20 bytes. This can be done with e.g. this request: POST /SICAM_TOOLBOX_1703_remote_connection_00.htm HTTP/1.1 User-Agent: SICAM TOOLBOX II Version: 1 Session-ID: 3814280BA9921c6cAAAA Sequence-ID: 1 Content-Length: 8 Content-Type: text/plain KeepAlive: 5 Connection: close type=3 The server answers with following response: HTTP/1.1 200 OK Server: SICAM 1703 Version: 1 Session-ID: 3814280BA9921c6cAAAAæk¤ Cache-Control: max-age=0, private X-Frame-Options: sameorigin Strict-Transport-Security: max-age=31536000; includeSubdomains Content-Security-Policy: default-src 'self' data: blob: 'unsafe-inline' 'unsafe-eval' X-XSS-Protection: 1; mode=block X-Permitted-Cross-Domain-Policies: none Content-Length: 71 Connection: close Date: Wed, 30 Mar 2022 01:38:37 GMT Sequence-ID: 1 Content-Type: text/plain Content-Length: 8 type=4 The Session-ID in the response leaks at least 4 additional bytes. Further, the structure of the response is broken, as some HTTP headers are suddenly part of the body. The vulnerability most likely stems from a misuse of the strncpy function. The following code segment was analyzed (RTUM85.elf, Offset 0x1d50de): ptr_fcgi_header = get_fcgi_param(fcgi_struct, "HTTP_SESSION_ID); if (ptr_fcgi_header == (char*) 0x00) goto LAB_001d4a66; if ( is_a_session_available == 0 ) { strncpy(&session_id, ptr_fcgi_header, 0x14); } strncpy is called with a length parameter of 0x14. To trigger the vulnerability, we are sending exactly 0x14 bytes. Thus, we believe that the global session_id variable is never properly terminated with a Null-pointer. libc's documentation even contains a warning for this case: "If there is no null byte among the first n bytes of src, the string placed in dest will not be null-terminated." Thus, if the response is built, every data structure in BSS following the session_id global will be printed as string until a Null byte is encountered. 2) Privilege Escalation (Only CP-8031/CP-8050 and SICORE devices, CVE-2024-31485) An attacker with an account with the viewer (or higher) role can intercept unencrypted traffic of other users of the web interface. Thus, the attacker can intercept higher privileged user accounts and passwords. By starting the Ethernet Packet Capture (Home -> Monitoring & Simulation -> Ethernet Packet Capture), a request is sent. This request can be modified by an interceptor proxy (e.g. Burp Suite). POST /sicweb-ajax/rtum85/cview HTTP/1.1 Host: HOST User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0 Accept: */* Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Content-Type: application/xml SICWEB-SID: xNG1v825qFmCMo8hpjfISlVARKipW1B+lz9d5FoBxipR87VT Content-Length: 198 Origin: http:// HOST Connection: close Referer: http:// HOST/ <?xml version="1.0" encoding="UTF-8"?> <Cmd_SetCustomViewValue><view id="packet_capture"><parameter id="p0"> <value>lo</value> </parameter></view></Cmd_SetCustomViewValue> The attacker can then send the parameter id p0 to the value "lo" and start the packet capture in order to dump from the loopback interface. It is a valid interface, as it only consist of lowercase characters and numbers (fix for CVE-2023-33919). However, the webserver implements TLS in a stunnel fashion. It accepts all TLS traffic on port 443, then decrypts it and forwards it via loopback interface to port 80. By being able to read the loopback traffic, an attacker can now see all communication, including passwords of higher privileged users. 3) Unsafe Storage of MQTT Passwords (Only CP-8031/CP-8050, CVE-2024-31486) To demonstrate the issue, the following parameters were set for the MQTT client using the Siemens Toolbox II: * "8 MQTT password" mqtt_pw_sectest * "9 MQTT username" mqtt_sectest The password (together with the username) can be located in the /ies/data/local/system/iescfg.iar file on the device, which can be retrieved by shell access/code execution on the device or by desoldering and reading its unencrypted flash memory chip: ----------------------------------------------------------------------- grep -rain "mqtt_pw_sectest" /ies/data/local/system/iescfg.iar [...] mqtt mqtt_sectest. mqtt_pw_sectest. < �MQTT_Broker [...] ----------------------------------------------------------------------- Vulnerable / tested versions: ----------------------------- The following version has been tested which was the latest version available at the time of the test: Vulnerability 1 and 2 were confirmed on Siemens SICAM A8000 CP-8031 V05.12 Vulnerability 3 was confirmed on Siemens A8000 CP-8050 V04.92 Vendor contact timeline: ------------------------ 2023-04-18: Contacting vendor through productcert@siemens.com for vulnerability 3 2023-04-19: Advisory will be handled as case #92461. 2023-06-13: Siemens releases advisory for other vulnerabilities, see https://sec-consult.com/vulnerability-lab/advisory/multiple-vulnerabilities-siemens-a8000/ 2023-10-09: Requesting status update 2024-04-03: Requesting status update. 2024-04-04: Unsafe Storage of MQTT password: fix will be released in April 2024, Siemens advisory scheduled for May 2024 2024-04-11: Contacting vendor through productcert@siemens.com for Vulnerability 1 and 2 2024-04-12: Siemens assigned case #68662 for Vulnerability 1,2 2024-05-14: Siemens publishes SSA-871704 for vulnerability 1,2,3 2024-06-11: Siemens publishes SSA-620338 for Vulnerability 1 2024-06-26: Public release of advisory Solution: --------- The vendor provides a patch which can be downloaded at the following URLs depending on the affected device: CPC80 Central Processing/Communication: The firmware CPC80 V16.41 is present within “CP-8000/CP-8021/CP-8022 Package” V16.41 https://support.industry.siemens.com/cs/ww/en/view/109812178/ CPCI85 Central Processing/Communication: The firmware CPCI85 V5.30 is present within "CP-8031/CP-8050 Package" V5.30 https://support.industry.siemens.com/cs/ww/en/view/109804985/ SICORE Base system: The firmware SICORE V1.3.0 is present within "SICAM 8 Software Solution Package" V5.30 https://support.industry.siemens.com/cs/ww/en/view/109818240/ OPUPI0 AMQP/MQTT: The firmware OPUPI0 V5.30 is present within "CP-8031/CP-8050 Package" V5.30 https://support.industry.siemens.com/cs/ww/en/view/109804985/ CPCX26 Central Processing/Communication: The firmware CPCX26 V06.02 is present within “SICAM RTUs AK3 Package” V06.02 https://support.industry.siemens.com/cs/ww/en/view/109813252/ PCCX26 Ax 1703 PE, Contr, Communication Element: The firmware PCCX26 V06.05 is present within “SICAM RTUs AK3 Package” V06.02 https://support.industry.siemens.com/cs/ww/en/view/109813252/ ETA4 Ethernet Interface IEC60870-5-104: The firmware ETA4 V10.46 is present within “SICAM RTUs AK3 Package” V06.02 https://support.industry.siemens.com/cs/ww/en/view/109813252/ ETA5 Ethernet Int. 1x100TX IEC61850 Ed.2: The firmware ETA5 V03.27 is present within “SICAM RTUs AK3 Package” V06.02 https://support.industry.siemens.com/cs/ww/en/view/109813252/ Additional information from the vendor can be found in their advisories: https://cert-portal.siemens.com/productcert/html/ssa-871704.html https://cert-portal.siemens.com/productcert/html/ssa-620338.html Workaround: ----------- Limit network and physical access to the PLC. Advisory URL: ------------- https://sec-consult.com/vulnerability-lab/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SEC Consult Vulnerability Lab An integrated part of SEC Consult, an Eviden business Europe | Asia About SEC Consult Vulnerability Lab The SEC Consult Vulnerability Lab is an integrated part of SEC Consult, an Eviden business. 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: security-research at sec-consult dot com Web: https://www.sec-consult.com Blog: https://blog.sec-consult.com Twitter: https://twitter.com/sec_consult EOF Stefan Viehboeck, Steffen Robertz, Gerhard Hechenberger, Constantin Schieber-Knoebl / @2024 . The hardware (SM-2558) is considered end of life (EOL), thus no new version with a fixed JTAG will be released. Restrict physical access to the device. Vulnerability overview/description: ----------------------------------- 1) Unlocked JTAG Interface of Zynq-7000 on SM-2558 The JTAG interface can be accessed with physical access to the PCB. After slightly modifying the hardware it is possible to connect to the interface with full access to the communication module. The target buffer is in the BSS segment and likely 1024 bytes in length. The buffer overflows into several other global data structures. Proof of concept: ----------------- 1) Unlocked JTAG Interface of Zynq-7000 on SM-2558 The JTAG interface pins (TDI, TDO, TCK, TMS, GND) are accessible on a populated 20-pin header on the PCB (see [figure_1]). A removed connection needs to be restored by soldering an additional wire between two exposed contacts (see [figure_2]), as the JTAG interface of the Zynq-7000 is daisy-chained with the JTAG interface of the Broadcom BCM53101M Ethernet controller. The pad in question connects to pin A57 (TDI) of the Ethernet controller. After connecting to the pins, a connection to the Zynq-7000 JTAG interface is possible. E.g., memory can be dumped ([figure_5]), execution can be single stepped ([figure_4]) or halted ([figure_3]), and variables changed. This grants an attacker with physical access full control of the communication module. (in total 618 characters) results in three HTTP responses HTTP/1.1 200 OK Server: SICAM 1703 Version: 1 Session-ID: 3814280BA992fd000000HTTP/1.1 200 OK Server: SICAM 1703 Version: 1 Session-ID: 3814280BA992fd000000HTTP/1.1 200 OK Server: SICAM 1703 Version: 1 Session-ID: 3814280BA992 Sequence-ID: 1 Content-Type: text/plain Content-Length: 8 type=4 d) Session ID value 3814280BA992fd00000000000000... (in total 1260 characters) results in a HTTP 500 - internal server error HTTP/1.1 500 Internal Server Error Content-Type: text/html Content-Length: 198 <html><head><title>500 Internal Server Error</title></head><body><h1>Internal Server Error</h1><p>Sorry, an unexpected internal server error occurred while processing your request.</p></body></html> Pseudocode of vulnerable function: [...] sessiond_id = (char *)get_http_header(a1, (int)"Session-ID"); <<<<<<<<<<<<<<<< session_id is extracted from HTTP request if ( !sessiond_id ) goto LABEL_194; if ( unk_51CD1C ) { v11 = 0; } else { sub_3DB0E4((unsigned int)byte_51CD08, (unsigned int)sessiond_id, 0x14u); v11 = 1; } if ( sub_15332C() == 1 ) { v134 = 0; if ( sub_155BC4(a1, (int)v133) || !v134 ) { LABEL_49: sequence_id = get_http_header_int(a1, "Sequence-ID"); sprintf( <<<<<<<<<<<<<<<< response_buffer overflows here response_buffer, "HTTP/1.1 200 OK\r\n" "Server: %s\r\n" "Version: %u\r\n" "Session-ID: %s\r\n" "Sequence-ID: %lu\r\n" "Content-Type: text/plain\r\n" "Content-Length: 0\r\n" "\r\n", "SICAM 1703", 1, sessiond_id, sequence_id); [...] Vulnerable / tested versions: ----------------------------- The following version has been tested which was the latest version available at the time of the test: - Webserver that runs on Firmware Version 10A45 of the Zynq FPGA. - The Hardware revision of the device was unknown. 2024-04-03: Siemens can reproduce vulnerabilities and will evaluate buffer overflow. Hardware is EOL, no fix for the JTAG issue. 2024-06-11: Siemens publishes SSA-620338 and confirms the buffer overflow. 2024-07 - 2024-09: Various vacation / absences, delaying advisory coordination. 2024-10-22: Meeting with ProductCERT, discussing release of SM-2558 advisory. 2024-10-31: Sending advisory draft to ProductCERT. 2024-11-14: Receiving feedback on advisory draft. 2024-11-19: Sending updated advisory to ProductCERT. 2024-11-25: Coordinated release of advisory. Solution: --------- The vendor provides patches for the affected devices / components to fix CVE-2024-31484: * ETA4 for SM-2558: Upgrade to V10.46 * ETA5 for SM-2558: Upgrade to V03.27 * CPCX26 for CP-2016: Upgrade to V06.02 * PCCX26 for CP-2019: Upgrade to V06.05 More detailed information can be found in the Siemens Security Advisory SSA-620338: https://cert-portal.siemens.com/productcert/html/ssa-620338.html The hardware (SM-2558) is considered end of life (EOL), thus no new version with a fixed JTAG will be released. Restrict physical access to the device