Share: Email | Twitter

ID

VDE-2024-007

Published

2024-01-22 08:00 (CET)

Last update

2024-01-22 12:30 (CET)

Vendor(s)

WAGO GmbH & Co. KG

Product(s)

Article No┬░ Product Name Affected Version(s)
All WAGO e!COCKPIT engineering software installation bundles <= V1.11.2.0
WAGO-I/O-Pro (CODESYS 2.3) engineering software installation 2.3.9.45 <= 2.3.9.70

Summary

A heap-based buffer overflow caused by libcurl and wrong whitespace character interpretation in Javascript, both used in CodeMeter Runtime affecting multiple products by WAGO. WIBU-SYSTEMS Codemeter is installed by default during e!COCKPIT and WAGO-I/O-Pro (CODESYS 2.3) installations.

Vulnerabilities



Last Update
Nov. 15, 2023, 12:04 p.m.
Weakness
Out-of-bounds Write (CWE-787)
Summary

This flaw makes curl overflow a heap based buffer in the SOCKS5 proxy handshake. When curl is asked to pass along the host name to the SOCKS5 proxy to allow that to resolve the address instead of it getting done by curl itself, the maximum length that host name can be is 255 bytes. If the host name is detected to be longer, curl switches to local name resolving and instead passes on the resolved address only. Due to this bug, the local variable that means "let the host resolve the name" could get the wrong value during a slow SOCKS5 handshake, and contrary to the intention, copy the too long host name to the target buffer instead of copying just the resolved address there. The target buffer being a heap based buffer, and the host name coming from the URL that curl has been told to operate with.

Last Update
Nov. 15, 2023, 12:06 p.m.
Weakness
Insufficient Information (NVD-CWE-noinfo)
Summary

Not all valid JavaScript whitespace characters are considered to be whitespace. Templates containing whitespace characters outside of the character set "\t\n\f\r\u0020\u2028\u2029" in JavaScript contexts that also contain actions may not be properly sanitized during execution.

Impact

WAGO controllers and IO-Devices are not affected by WIBU-SYSTEMS Codemeter vulnerabilities. However, due to compatibility reasons to the CODESYS Store, the e!COCKPIT and WAGO-I/O-Pro engineering software are bundled with a WIBU-SYSTEMS Codemeter installation.

Solution

Mitigation

Disable using a SOCKS5 proxy:

  • The proxy environment variables HTTP_PROXY, HTTPS_PROXY and ALL_PROXY must not be set to socks5h://
  • Ensure that CodeMeter is not defined to use the SOCKS5 proxy. The variable ProxyServer must not be start with socks5h://.
    • On Windows, the definition of that variable is in the registry (regedit) under HKLM/SOFTWARE/WIBU-SYSTEMS/CodeMeter/Server/CurrentVersion
    • On Mac, the definition of that variable is in the file /Library/Preferences/com.wibu.CodeMeter.Server.ini
    • On Linux, the definition of that variable is in the file /etc/wibu/CodeMeter/Server.ini
    • On Solaris, the definition of that variable is in the file/etc/opt/CodeMeter/Server.ini

For further details on risk mitigation and impact of this vulnerability, please refer to the official WIBU-SYSTEMS Product Security Advisories WIBU-231024-01 and WIBU-231017-01 at Website https://www.wibu.com/support/security-advisories.html.

Remediation

Until an update is available for e!COCKPIT and WAGO-I/O-Pro (CODESYS 2.3) we strongly encourage users to update WIBU-SYSTEMS Codemeter by installing the latest available stand-alone WIBU-SYSTEMS Codemeter Version.

Reported by

CERT@VDE coordinated with WAGO