STM32 USB Host Library Buffer Overflow

Summary

CVECVE-2021-42553
StatePUBLISHED
AssignerNCSC.ch
Source PriorityCVE Program / NVD first with legacy fallback
Published2022-10-21 10:15:12 UTC
Updated2026-10-08 18:23:29 UTC
DescriptionA 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.

Risk And Classification

Primary CVSS: v3.1 9.8 CRITICAL from [email protected]

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

EPSS: 0.010600000 probability, percentile 0.635360000 (date 2026-10-09)

Problem Types: CWE-120 | buffer overflow | CWE-120 CWE-120 Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')


VersionSourceTypeScoreSeverityVector
3.1[email protected]Primary9.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
3.1[email protected]Secondary6.8MEDIUMCVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
3.1CNADECLARED6.8MEDIUMCVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application St Stm32 Mw Usb Host All All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA STMicroelectronics STM32Cube STM32 USB Host Library affected all 3.5.1 custom Not specified

References

ReferenceSourceLinkTags
GitHub - STMicroelectronics/stm32_mw_usb_host: Provides the USB Host library part of the STM32Cube MCU Component "middleware" for all STM32xx series. af854a3a-2127-422b-91ae-364da2661108 github.com Product
Fix buffer overflow by Defonceuse · Pull Request #4 · STMicroelectronics/stm32_mw_usb_host · GitHub af854a3a-2127-422b-91ae-364da2661108 github.com Patch, Third Party Advisory
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: github.com/Defonceuse (en)

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report