Lucene search

K
talosTalos IntelligenceTALOS-2020-1010
HistoryJun 10, 2020 - 12:00 a.m.

WAGO PFC 200 Web-Based Management (WBM) Code Execution Vulnerability

2020-06-1000:00:00
Talos Intelligence
www.talosintelligence.com
166

9 High

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

SINGLE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:S/C:C/I:C/A:C

7.2 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

HIGH

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

0.003 Low

EPSS

Percentile

66.4%

Summary

An exploitable code execution vulnerability exists in the Web-Based Management (WBM) functionality of WAGO PFC 200 03.03.10(15). A specially crafted series of HTTP requests can cause code execution resulting in remote code execution. An attacker can make an authenticated HTTP request to trigger this vulnerability.

Tested Versions

WAGO PFC 200 03.03.10(15)

Product URLs

<https://www.wago.com/us/pfc200&gt;

CVSSv3 Score

9.1 - CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H

CWE

CWE-269 - Improper Privilege Management

Details

WAGO is a manufacturer of programmable automation controllers that are used in many industries including automotive, rail, power engineering, manufacturing, and building management.

The WBM (Web-Based Management) application provides configuration and customization to the user. WAGO documentation states that the web users are isolated from the Linux system users on the device,

The PFC 200 750-8206 user manual draws a clear distinction between the WBM and the Linux system users. Section 4.1.2.1.2 WBM User Group states:

WBM has its own user administration system. The users in this system are isolated from the other user groups in the system for security reasons.

This vulnerability allows an attacker to gain root privileges on the device from the WBM admin user.

The software upload functionality of WBM allows the web-admin user to upload a software package and activate the software in the opkg .ipk format. The file structure of an .ipk file is relatively simple, and provides no integrity checks such as code signing for the software contained in the package. Below describes the contents of an .ipk file:

|-- control
|   |-- control
|   |-- postinst
|   |-- preinst
|   |-- prerm
|-- data
|   |-- usr
|   |   -- bin
|   |       -- example_binary
|   -- lib
|       -- systemd
|           -- system
|               -- example_package.service
|-- debian-binary

When the user activates the software package, that executes a shell script on the device called activate_download. The code excerpt below shows on line 097 and 109 that the package install/activate utility opkg is executed with root permissions:

095:       update-script )     if [ "install" = $action ]; then
096:                             #echo "activate" $path$filename "for update-script"      
097:                             sudo /usr/bin/opkg install "$path$filename" &gt; /dev/null 2&gt; /dev/null
098:                             
099:                             if [ $? != $SUCCESS ]; then
100: 
101:                               status=$SHELL_ERROR
102:                               ReportError $status "(/usr/bin/opkg install $path$filename)"
103:                               SetLastError "Error while execution"
104:                             fi
105:                           fi
106:               #force overwrite
107:         if [ "force" = $action ]; then
108:                             #echo "force-overwrite" $path$filename "for update-script"
109:                             sudo /usr/bin/opkg install --force-overwrite --force-reinstall --force-downgrade "$path$filename" &gt; /dev/null 2&gt; /dev/null

Since the opkg utility is executed with root permissions, any of the scripts within the control portion of the package are also executed with root permissions. Additionally, the attacker can force the activation which means that the installed package can overwrite data from other packages. Forcing the activation gives an attacker the ability to overwrite system services with attacker controlled code.

Timeline

2020-02-11 - Vendor Disclosure
2020-02-12 - Vendor acknowledged
2020-05-06 - Talos follow up with vendor
2020-05-07 - Vendor requested disclosure extension; Talos granted extension
2020-06-10 - Public Release

9 High

CVSS2

Attack Vector

NETWORK

Attack Complexity

LOW

Authentication

SINGLE

Confidentiality Impact

COMPLETE

Integrity Impact

COMPLETE

Availability Impact

COMPLETE

AV:N/AC:L/Au:S/C:C/I:C/A:C

7.2 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

HIGH

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

0.003 Low

EPSS

Percentile

66.4%

Related for TALOS-2020-1010