CVE-2026-61495

TinyUSB 0.21.0 Out-of-Bounds Write via mtp_container_get_string()

Published Nov 3, 2026 CVSS 4.0 · 7 High EPSS < 1% KEV · Not listed
Description
TinyUSB through 0.21.0, fixed in commit e85c2b8, contains an out-of-bounds write vulnerability in the MTP device class helper mtp_container_get_string() in src/class/mtp/mtp.h that allows a malicious USB host to corrupt adjacent memory by supplying a crafted MTP string with an unbounded character count. Attackers can exploit the unchecked memcpy operation copying up to 510 bytes into a fixed-size destination buffer to achieve code execution or cause a denial of service on the TinyUSB MTP device.

Analysis

AI-generated

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.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade TinyUSB to the patched version that includes commit e85c2b8 or newer.
  • If upgrading is not possible, disable the MTP device class in the firmware so that the vulnerable code path cannot be exercised.
  • Implement host‑side filtering or trust restrictions to limit which USB hosts are allowed to send MTP requests, thereby reducing the opportunity to supply malicious strings.

Generated by OpenCVE AI on November 3, 2026 at 23:30 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Hathach
Hathach tinyusb
Vendors & Products Hathach
Hathach tinyusb
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description TinyUSB through 0.21.0, fixed in commit e85c2b8, contains an out-of-bounds write vulnerability in the MTP device class helper mtp_container_get_string() in src/class/mtp/mtp.h that allows a malicious USB host to corrupt adjacent memory by supplying a crafted MTP string with an unbounded character count. Attackers can exploit the unchecked memcpy operation copying up to 510 bytes into a fixed-size destination buffer to achieve code execution or cause a denial of service on the TinyUSB MTP device.
Title TinyUSB 0.21.0 Out-of-Bounds Write via mtp_container_get_string()
Weaknesses CWE-787
References
Metrics cvssV3_1

{'score': 6.8, 'vector': 'CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 7, 'vector': 'CVSS:4.0/AV:P/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 9, 2026, 10:00 PM
Reserved
Jul 10, 2026, 3:43 PM
Status
Awaiting Analysis
Published
Nov 3, 2026, 9:17 PM
Modified
Nov 12, 2026, 8:57 PM