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

- Priority: **Routine**
- Reason: Not severe (CVSS 6.8, physical access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2022-10-21 · Modified: 2025-05-07
- Aliases: UBUNTU-CVE-2021-42553
- Record: https://cvemate.com/vulnerability/CVE-2021-42553 · JSON: https://cvemate.com/vulnerability/CVE-2021-42553/json

## Description

```text
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.
```

## Signals

- CVSS: 9.8 critical (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 1.304%, percentile 71.496%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- ubuntu micropython (Ubuntu): \< 1.12-1ubuntu0.1~esm1 \| \< 1.17+ds-1.1ubuntu2+esm1 \| \< 1.22.1+ds-1ubuntu0.24.04.1~esm1 \| All versions (No fix recorded)
- st stm32\_mw\_usb\_host: \< 3.5.1
- stmicroelectronics stm32cube stm32 usb host library: ≥ all, \< 3.5.1

## References

- <https://github.com/STMicroelectronics/stm32_mw_usb_host/pull/4>
- <https://github.com/STMicroelectronics/stm32_mw_usb_host>
- <https://ubuntu.com/security/CVE-2021-42553>
- <https://www.cve.org/CVERecord?id=CVE-2021-42553>
- <https://ubuntu.com/security/notices/USN-7472-1>

---

Data as of 2026-12-05T05:21:39.127Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
