Technical impact
TinyUSB versions through 0.21.0 contain an out‑of‑bounds write in the MTP helper function mtp_container_get_string(). The function copies up to 510 bytes from a host‑supplied MTP string into a 512‑byte buffer without validating the length, enabling a malicious USB host to overwrite adjacent memory. This memory corruption can lead to arbitrary code execution or a denial of service on the TinyUSB MTP device.
Affected Systems
The affected product is TinyUSB (Vendor: hathach). Versions 0.21.0 and earlier are vulnerable. The issue was fixed in commit e85c2b8, which introduces bounds checking for the MTP string payload.
Risk and Exploitability
The CVSS score for this vulnerability is 7, indicating a high severity. EPSS data is not available, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector is an untrusted USB host sending a crafted MTP string. An attacker can exploit the unchecked memcpy to corrupt memory and potentially execute code or crash the device if the overwritten data affects control flow or critical structures.