cbcvebase.
CVE-2021-20093
published 2021-06-16

CVE-2021-20093: A buffer over-read vulnerability exists in Wibu-Systems CodeMeter versions < 7.21a. An unauthenticated remote attacker can exploit this issue to disclose heap…

PriorityP266critical9.1CVSS 3.1
AVNACLPRNUINSUCHINAH
EPSS
33.30%
98.2th percentile
A buffer over-read vulnerability exists in Wibu-Systems CodeMeter versions < 7.21a. An unauthenticated remote attacker can exploit this issue to disclose heap memory contents or crash the CodeMeter Runtime Server.

Affected

14 ranges
VendorProductVersion rangeFixed in
siemenssimatic_information_server
siemenssimatic_information_server
siemenssimatic_pcs_neo< 3.13.1
siemenssimatic_process_historian
siemenssimatic_process_historian>= 2019 < 20202020
siemenssimatic_wincc_oa
siemenssimatic_wincc_oa
siemenssimit_simulation_platform
siemenssimit_simulation_platform>= 10.0 < 10.310.3
siemenssinec_infrastructure_network_services< 1.0.1.11.0.1.1
siemenssinec_infrastructure_network_services
siemenssinema_remote_connect_server< 3.03.0
siemenssinema_remote_connect_server
wibucodemeter<= 7.21a

Detection & IOCsextracted from sources · hover to see the quote

commandpython3 -c "import os,struct; size=0x200; os.write(1,b'samc'+struct.pack('<I',size)+b'\x00'*(size-8))" | nc <target> <CmLAN_port>
commandpython3 -c "import os,struct; size=0x1000000; os.write(1,b'samc'+struct.pack('<I',size)+b'\x00'*(size-8))" | nc <target> <CmLAN_port> > /dev/null
bytes
\xA2\x05 (unencrypted message trigger prefix)
  • Detect exploit attempts by monitoring for network packets sent to the CmLAN port whose payload begins with the magic bytes 'samc' followed by an attacker-controlled 4-byte little-endian size field larger than 0x100 (256), indicating an attempted buffer over-read.
  • Alert on unencrypted CmLAN messages whose body starts with '\xA2\x05' arriving from non-localhost sources, as the server should only accept such messages from localhost when properly hardened.
  • Monitor for unexpected crashes or access violation exceptions (code c0000005) in CodeMeter.exe, particularly involving a faulting instruction of 'rep movs' (f3 a4), which is the exact instruction triggered by the buffer over-read PoC.
  • Use a host-based firewall to restrict access to the CmLAN port from remote hosts; any remote connection attempt to this port from non-localhost addresses should be treated as suspicious.
  • ·The CmLAN network server is disabled by default; the vulnerability is only exploitable remotely if the CodeMeter network server has been explicitly enabled. Binding to localhost also prevents remote exploitation.
  • ·The heap buffer targeted is fixed at 0x100 (256) bytes; copy sizes larger than this value (attacker-controlled) trigger the over-read. Detection logic should flag size fields exceeding 0x100 in CmLAN messages.

CVSS provenance

nvdv3.19.1CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
nvdv2.06.4MEDIUMAV:N/AC:L/Au:N/C:P/I:N/A:P
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.