CVE-2026-13216: bounds in zephyrproject zephyr
Description
CVE-2026-13216 is a vulnerability in the Zephyr project's virtio PCI driver where an unvalidated device-supplied capability length can cause out-of-bounds stack writes during device initialization. This occurs because a length value read from the PCI config space is only checked by an assert that is disabled in production builds, allowing attacker-controlled data to overflow a fixed-size buffer. The flaw can lead to kernel stack corruption and potential code execution or crashes when an untrusted virtio PCIe device is present. The vulnerability primarily affects bare-metal systems with untrusted devices or confidential computing scenarios where the guest must defend against the host. A fix replaces the disabled assert with a runtime range check to validate the length before copying data.
CVSS v3.1
Score 6.1medium
Affected software
zephyrproject
zephyr
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The virtio PCI driver in Zephyr parses PCI capability lists during initialization. The device-supplied capability length byte (cap_len) was only validated by an assert that is disabled in production, allowing invalid lengths to pass unchecked. This leads to out-of-bounds writes on the kernel stack when copying capability data, either by underflowing to a large value or by exceeding the caller's buffer size. The input originates from the virtio device, so exploitation requires an untrusted or malicious virtio PCIe device. In typical guest deployments under a hypervisor, this does not lead to privilege escalation since the host controls the device. However, on bare-metal or confidential computing setups with untrusted devices, this can cause kernel corruption and potential code execution or crashes. The patch introduces a runtime range check on cap_len to prevent invalid values before any copy operations.
Potential Impact
The vulnerability allows an attacker controlling a virtio PCIe device to cause out-of-bounds stack writes in the Zephyr kernel during device initialization. This can lead to kernel stack corruption, potential code execution, or system crashes. There is no confidentiality impact. In typical virtualized environments where Zephyr runs as a guest, the host controls the device and thus no privilege escalation is possible. The impact is significant in bare-metal or confidential computing environments where the device is untrusted relative to the kernel.
Mitigation Recommendations
A fix is available that replaces the disabled assert with a runtime range check validating the capability length before copying data. Users should upgrade to Zephyr version 4.4.2 or later, where this fix is included. Until patched, avoid exposing Zephyr to untrusted virtio PCIe devices, especially in bare-metal or confidential computing scenarios.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- zephyr
- Date Reserved
- 2026-06-24T15:29:25.534Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6a8dc15dacd9273b496e4978
Added to database: 08/25/2026, 16:22:53 UTC
Last enriched: 09/10/2026, 18:22:07 UTC
Last updated: 10/07/2026, 18:48:17 UTC
Views: 32
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.