CVE-2021-42553
STM32 USB Host Library Buffer Overflow
Reported by ncsc.ch · Published October 21, 2022
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| stm32_mw_usb_host | st | 3.5.1 |
| STM32 USB Host Library | STMicroelectronics STM32Cube | 3.5.1 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| STMicroelectronics STM32Cube | STM32 USB Host Library | all |
| STMicroelectronics STM32Cube | STM32 USB Host Library | * |
Timeline
- Oct 21, 2022 CVE Published
- Oct 22, 2022 EPSS Score (30 in total, the first dated here)
- May 7, 2025 CVE Updated
- Apr 3, 2026 Security Advisory
- Jul 20, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2021-42553
vulnetix vdb fixes CVE-2021-42553
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-42553/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart