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.
Attack profile
How easy it is to exploit
- Attack vector
- Physical
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
6.8
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.
- Record
CVE-2021-42553- CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-120
- Updated
- 2026-11-02
EUVDEUVD-2021-29521
6.8
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.
- Record
EUVD-2021-29521- CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-vwmv-9r25-j98p
9.8
A buffer overflow vulnerability in stm32_mw_usb_host of STMicroelectronics allows an attacker to...
A buffer overflow vulnerability in stm32_mw_usb_host of STMicroelectronics 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.
- Record
GHSA-vwmv-9r25-j98p- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-120
- Updated
- 2026-11-02
NVD
6.8
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.
- Record
CVE-2021-42553- CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-120
- Updated
- 2026-11-02
OSV
9.8
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.
- Record
CVE-2021-42553- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-42553
6.8
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.
- Record
UBUNTU-CVE-2021-42553- CVSS 3.1
- 6.8 Medium
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUSN-7472-1 No score
micropython vulnerabilities
Junwha Hong and Wonil Jang discovered that Micropython incorrectly handled the length of a buffer in mp_vfs_umount, leading to a heap-based buffer overflow vulnerability. If a user or automated system were tricked into opening a specially crafted file, an attacker could possibly use this issue to cause a denial of service or possibly execute arbitrary code. (CVE-2024-8946)
Junwha Hong and Wonil Jang discovered that Micropython incorrectly handled memory, leading to a use-after-free vulnerability under certain circumstances. If a user or automated system were tricked into opening a specially crafted file, an attacker could possibly use this issue to cause a denial of service or possibly execute arbitrary code. (CVE-2024-8947)
It was discovered that Middleware USB Host MCU Component incorrectly handled memory, leading to a buffer overflow vulnerability, If a user or automated system were tricked into opening a specially crafted file, an attacker could possibly use this issue to cause a denial of service or possibly execute arbitrary code. (CVE-2021-42553)
- Record
USN-7472-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
micropythonUbuntu:Pro:20.04:LTS |
before 1.12-1ubuntu0.1~esm1, plus listed versions 1.12-1 |
1.12-1ubuntu0.1~esm1 |
micropythonUbuntu:Pro:22.04:LTS |
before 1.17+ds-1.1ubuntu2+esm1, plus listed versions 1.17+ds-1ubuntu11.17+ds-1.11.17+ds-1.1ubuntu2 |
1.17+ds-1.1ubuntu2+esm1 |
micropythonUbuntu:Pro:24.04:LTS |
before 1.22.1+ds-1ubuntu0.24.04.1~esm1, plus listed versions 1.19.1+ds-11.22.1+ds-11.22.1+ds-1build11.22.1+ds-1build2 |
1.22.1+ds-1ubuntu0.24.04.1~esm1 |
micropythonUbuntu:25.10 |
All versions, plus listed versions 1.24.1+ds-11.25.0+ds-1 |
None known |
micropythonUbuntu:26.10 |
All versions, plus listed versions 1.26.1+ds-1 |
None known |
micropythonUbuntu:26.04:LTS |
All versions, plus listed versions 1.25.0+ds-11.26.1+ds-1 |
None known |
micropythonUbuntu:Pro:20.04:LTS From an advisory covering 3 CVEs |
before 1.12-1ubuntu0.1~esm1, plus listed versions 1.12-1 |
1.12-1ubuntu0.1~esm1 |
micropythonUbuntu:Pro:22.04:LTS From an advisory covering 3 CVEs |
before 1.17+ds-1.1ubuntu2+esm1, plus listed versions 1.17+ds-1ubuntu11.17+ds-1.11.17+ds-1.1ubuntu2 |
1.17+ds-1.1ubuntu2+esm1 |
micropythonUbuntu:Pro:24.04:LTS From an advisory covering 3 CVEs |
before 1.22.1+ds-1ubuntu0.24.04.1~esm1, plus listed versions 1.19.1+ds-11.22.1+ds-11.22.1+ds-1build11.22.1+ds-1build2 |
1.22.1+ds-1ubuntu0.24.04.1~esm1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-42553 is a medium vulnerability (CVSS 6.8) in Stmicroelectronics Stm32cube Stm32 Usb Host Library, published October 21, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.30%, the 70th percentile. Fixed in micropython 1.12-1ubuntu0.1~esm1.
References
github.com/STMicroelectronics/stm32_mw_usb_host/pull/4
github.com/STMicroelectronics/stm32_mw_usb_host
nvd.nist.gov/vuln/detail/CVE-2021-42553
github.com/advisories/GHSA-vwmv-9r25-j98p
ubuntu.com/security/CVE-2021-42553
cve.org/CVERecord?id=CVE-2021-42553
ubuntu.com/security/notices/USN-7472-1
ubuntu.com/security/CVE-2024-8946
ubuntu.com/security/CVE-2024-8947