cbcvebase.
CVE-2021-42313
published 2021-12-15

CVE-2021-42313: Microsoft Defender for IoT Remote Code Execution Vulnerability

PriorityP261critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
EPSS
3.82%
89.0th percentile
Microsoft Defender for IoT Remote Code Execution Vulnerability

Affected

3 ranges
VendorProductVersion rangeFixed in
microsoftdefender_for_iot< 10.5.210.5.2
microsoftmicrosoft_defender_for_iot>= 22.0.0 < 10.5.210.5.2
msrcmicrosoft_defender_for_iot

Detection & IOCsextracted from sources · hover to see the quote

urlhttp://127.0.0.1:9090/core/api/v1/login/reset-password
path/var/cyberx/reset_password
path/var/cyberx/reset_password/IotDefenderSigningCertificate.pem
path/var/cyberx/reset_password/ResetPassword.json
pathcomponents\xsense-web\cyberx_web\api\admin.py
filenameIotDefenderSigningCertificate.pem
filenameResetPassword.json
  • CVE-2021-42313 is a SQL injection vulnerability exploitable via an unsanitized parameter passed into a SQL query on the Microsoft Defender for IoT web interface, accessible without authentication.
  • Monitor for unauthenticated POST requests to the ZipFileConfigurationApiHandler endpoint with 'path' parameter set to 'reset_password', which triggers ZIP extraction to /var/cyberx/reset_password — a prerequisite step in the attack chain.
  • Monitor for unauthenticated POST requests to the PasswordRecoveryApiHandler endpoint; the handler proceeds to reset passwords even when certificate validation fails (exception is caught and swallowed), enabling authentication bypass.
  • Detect access to the password recovery page at https://<ip>/login#/dashboard from unexpected or external sources, as this is the entry point for the unauthenticated password reset attack chain.
  • Alert on internal HTTP POST requests to http://127.0.0.1:9090/core/api/v1/login/reset-password originating from the web application process, which indicates the password reset flow has been triggered.
  • ·The decryption key for the product.tar.gz archive is shared across all Defender for IoT installations, meaning any attacker who extracts it from one installation can decrypt source files from any other installation.
  • ·Both the Management and Sensor components share roughly the same code base, so both are affected by the same vulnerabilities including CVE-2021-42313.
  • ·The fix requires upgrading to Microsoft Defender for IoT version 10.5.2 or above; patching is not automatic.

CVSS provenance

nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.010.0CRITICALAV:N/AC:L/Au:N/C:C/I:C/A:C
vendor_msrc10.0CRITICAL
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.