LiveActive security incident?Get immediate response
CVE Record

CVE-2021-42553: STM32 USB Host Library Buffer Overflow

A buffer overflow vulnerability in stm32_mw_usb_host of STMicroelectronics in versions before 3.5.1 allows an attacker to execute arbitrary code when the descriptor contains more endpoints than USBH_MAX_NUM_ENDPOINTS. The library is typically integrated when using a RTOS such as FreeRTOS on STM32 MCUs.

MediumCVSS 6.8Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

This flaw affects embedded STM32 products that use STMicroelectronics' USB Host Library before 3.5.1. A malicious USB device could trigger a buffer overflow through an endpoint descriptor and potentially run code on the device. Business urgency depends on whether exposed products accept untrusted USB peripherals.

Executive priority

Treat this as a targeted embedded-product risk, not broad enterprise malware exposure. Prioritize products with accessible USB host ports in customer, field, lab, or shared environments. Devices without untrusted USB attachment paths can be handled through normal firmware maintenance.

Technical view

CVE-2021-42553 is a CWE-120 buffer overflow in stm32_mw_usb_host before 3.5.1. The issue occurs when a USB descriptor reports more endpoints than USBH_MAX_NUM_ENDPOINTS. CVSS 3.1 is 6.8 with physical attack vector and high confidentiality, integrity, and availability impact.

Likely exposure

Exposure is likely limited to STM32 firmware that integrates the STM32 USB Host Library, commonly with an RTOS such as FreeRTOS, and presents USB host ports to untrusted devices. Software-only services and devices without USB host functionality are not indicated as affected by the provided sources.

Exploitation context

The CVSS vector requires physical access, low complexity, no privileges, and no user interaction. The CVE is not listed as KEV, and the provided sources do not state active exploitation. Practical risk is highest where users can plug arbitrary USB devices into deployed STM32-based equipment.

Researcher notes

Evidence supports a physical-vector buffer overflow tied to USB endpoint descriptor handling. The source bundle names versions before 3.5.1, but downstream STM32Cube package mappings and product-specific firmware adoption are not provided. Validate exposure at source, SBOM, and firmware-build level.

Mitigation direction

  • Inventory firmware using stm32_mw_usb_host or STM32Cube USB Host components.
  • Upgrade affected integrations to version 3.5.1 or later where applicable.
  • Restrict physical access to USB host ports on deployed devices.
  • Check STMicroelectronics guidance before shipping patched firmware.
  • For maintained forks, confirm descriptor endpoint bounds are enforced.

Validation and detection

  • Search source trees and SBOMs for stm32_mw_usb_host usage.
  • Confirm the integrated library version is 3.5.1 or later.
  • Review USB host descriptor parsing for endpoint-count bounds checks.
  • Identify products where untrusted users can attach USB devices.
  • Document firmware build lineage for affected STM32 deployments.
Prepared
Confidence
medium
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-120: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-42553 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
6.8 (3.1)
Known Exploited
No
Published

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

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
6.8CVSS 3.1MediumCVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H0.95.9Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

6.8Medium
CVSS 3.1 vector shape for CVE-2021-42553Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
STMicroelectronics STM32CubeSTM32 USB Host LibraryallListed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-120 · source CWE mapping

Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')

Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.