Skip to main content

Zephyr RTOS CVE-2026-82961

| EUVDEUVD-2026-112265 HIGH
Out-of-bounds Write (CWE-787)
2026-10-28 zephyr
7.8
CVSS 3.1 · Vendor: zephyr
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Run low-priv user thread with GPIO object grant
  2. Delivery
    Call gpio_pin_configure with out-of-range pin (e.g. 64)
  3. Exploit
    Driver uses pin as array index/shift unchecked
  4. Execution
    Supervisor OOB write of callback pointer past kernel array
  5. Impact
    Corrupt kernel memory / execute code / crash

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires a build with CONFIG_USERSPACE=y (the vulnerable drivers/gpio/gpio_handlers.c is compiled only under that symbol); builds without userspace memory protection are not affected. The attacker must already be a user-mode thread that has been granted access to a specific GPIO device object (via k_object_access_grant / the thread's memory domain) - the grant intended to authorize that port's pins. Exposure is worsened when CONFIG_ASSERT is disabled (typical for production), because the only pre-fix pin guard was a compiled-out __ASSERT. Exposed, released entry points are gpio_pin_configure(), gpio_pin_get_config() and gpio_pin_interrupt_configure(); the five further pin syscalls hardened by the fix only became syscalls after v4.4.0 and are in no release. Impact magnitude is driver/SoC-dependent (e.g. STM32 EXTI 16-line callback array, ITE it8xxx2 8-entry wuc_base MMIO-pointer table, gpio_emul flags[] on qemu_x86_64). Limiting factors: local access only (no network vector), a pre-existing legitimate GPIO object grant, and the CONFIG_USERSPACE build gate.

Impact

CVSS 7.8 (HIGH) with vector AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H describes a local, low-privilege, no-interaction out-of-bounds write (CWE-787) with full confidentiality, integrity and availability impact - consistent with the described kernel memory corruption and possible arbitrary code execution. This is a sandbox-escape / privilege-escalation primitive, NOT a remote-entry flaw: the attacker must already be executing as a user-mode thread on the device and must already hold a grant to a GPIO device object. EPSS is not provided and the issue is not in CISA KEV (no confirmed active exploitation), so there is no signal of widespread opportunistic exploitation; the vuln.today decision label is 'this_week' rather than act_now/emergency. A working PoC is embedded in the GHSA advisory (reporter reproduced a pin=64 OOB write on qemu_x86_64), which raises practical risk for affected builds. The dominant mitigating factor, stated in the evidence, is the build gate: the vulnerable code compiles only under CONFIG_USERSPACE=y, and the only legacy guard was an __ASSERT that is compiled out unless CONFIG_ASSERT is enabled - so production, userspace-isolated builds are precisely the exposed configuration. Net: a real and credible priority for the subset of Zephyr products that enable userspace memory protection and expose GPIO objects to untrusted threads, but low real-world risk for the majority of Zephyr deployments that do not build with CONFIG_USERSPACE=y. No data conflicts; the main gap is the absence of EPSS and the fact that the fixed version (4.5.0) is a projection, not a confirmed release.

Exploit ScenarioDerived

On a device built with CONFIG_USERSPACE=y, a low-privilege user-mode thread that has legitimately been granted access to a GPIO device object calls the public API gpio_pin_configure() (or gpio_pin_interrupt_configure()) with an out-of-range pin index such as 64; the syscall handler validates only the device object and passes the pin through, and the driver uses it as an array index/shift, producing a supervisor-mode out-of-bounds write of a callback function pointer and void* past a kernel .bss array (e.g. the STM32 EXTI callback table) leading to kernel memory corruption or code execution. A public PoC reference is included in the GHSA advisory and was reproduced on qemu_x86_64. Because AV:L/AC:L/PR:L/UI:N, exploitation is straightforward once the attacker already runs a granted user thread, but it is local-only and cannot be reached over a network.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 28, 2026

Out-of-bounds kernel memory writes in Zephyr's GPIO syscall verification layer let a user-mode thread escape the userspace sandbox: in builds with CONFIG_USERSPACE=y, z_vrfy_gpio_pin_configure(), z_vrfy_gpio_pin_get_config() and z_vrfy_gpio_pin_interrupt_configure() checked only the device object and passed the caller-supplied gpio_pin_t straight to the driver, where the sole pin guard was an __ASSERT compiled out of production builds. All releases from 2.2.0 through 4.4.2 are affected, and the attacker must already hold a legitimate grant to a GPIO device object - the grant meant to confine it to that controller's pins. Downstream impact is driver- and SoC-dependent (STM32 EXTI callback array overflow, ITE it8xxx2 out-of-bounds MMIO base pointer, gpio_emul flags[] overflow), yielding supervisor-mode memory corruption, possible arbitrary code execution, or a crash; a public proof-of-concept accompanies the GHSA advisory, though it is not verified as general-purpose exploit code, and there is no KEV or confirmed active-exploitation signal.

RemediationAI

Upgrade to Zephyr 4.5.0, the projected fixed release (the fix is merged on main but not yet tagged, so confirm the actual release before closing out), or backport the four upstream commits 020e83e06b35e98a4a3c2354f67e5eee3f163363 (gpio_port_pin_is_supported() plus __ASSERT conversion), d145faab7e3a8cea62a8fd7ed5f30ef73e762f59 (pin validation in the z_vrfy_ handlers returning -EINVAL), c9641fa5bfec44892e0cf2d84f78c7c60fca8ad6 (unconditional range check in the shared z_impl_ inlines) and d28a05d5de4420f27ba3de7b9e4442fa056d51de (gpio_emul pin validation), all referenced from the GHSA advisory. If the update cannot land in this week's patch cycle, the most effective compensating control is to stop granting GPIO device objects to untrusted user-mode threads - remove the k_object_access_grant() call or the device's memory-domain membership - with the trade-off that those threads lose all GPIO access rather than just the out-of-range pins; note that enabling CONFIG_ASSERT does not fix the flaw and only converts silent corruption into a fail-fast assertion panic, with the added cost of assertion overhead and halts on other asserts; and disabling CONFIG_USERSPACE removes the vulnerable handlers entirely but also drops userspace memory protection across the whole image, which is a net security regression unless no untrusted code runs on the device.

Affected VersionsENISA

Zephyr 2.2.0 ≤4.4.2

Affected Packages

euvd zephyr no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Zephyr's userspace model splits each syscall into a z_vrfy_ verification handler - which runs on the kernel side and is responsible for validating every argument that came from the user thread - and a z_impl_ inline that performs the operation. The GPIO handlers in drivers/gpio/gpio_handlers.c (compiled only under CONFIG_USERSPACE, per drivers/gpio/CMakeLists.txt) applied K_SYSCALL_DRIVER_GPIO() / K_SYSCALL_OBJ() to the device pointer but never to the pin integer, so an unchecked gpio_pin_t reached z_impl_gpio_pin_*() and then the controller driver. The documented contract that a driver may treat pin as a shift count and as an index into fixed-size per-pin tables was enforced only by __ASSERT(gpio_port_pin_is_supported(cfg->port_pin_mask, pin), ...) in include/zephyr/drivers/gpio.h, which vanishes with CONFIG_ASSERT=n. This is classic CWE-787 (out-of-bounds write): on STM32, gpio_stm32_pin_interrupt_configure() converts pin to an EXTI line and stm32_gpio_intc_set_irq_callback() writes data->cb[line_num].cb and .data past a NUM_EXTI_LINES array (default 16 per dts/bindings/interrupt-controller/st,stm32-exti.yaml) before reading exti_irq_table[line_num] and calling irq_enable() on it; gpio_ite_it8xxx2_v2.c indexes 8-entry wuc_base/wuc_mask/gpio_irq tables and performs a read-modify-write through an attacker-influenced MMIO base pointer; and gpio_emul.c evaluated (port_pin_mask & BIT(pin)) before bounding pin, so with a 64-bit gpio_port_pins_t a pin of 64 shift-wraps to BIT(0), passes the mask test, and writes drv_data->flags[64] past the num_pins-sized array. The fix adds gpio_port_pin_is_supported(), which rejects pin >= GPIO_MAX_PINS_PER_PORT before shifting and then tests port_pin_mask, enforces it in every pin-taking z_vrfy_ handler returning -EINVAL, and adds an unconditional range check to the shared z_impl_gpio_pin_* inlines.

Know when Zephyr gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (zephyr) PRIMARY 7.8 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 7.8 HIGH

Local user-mode thread (AV:L) with a low-privilege GPIO object grant (PR:L) and no interaction deterministically triggers an OOB kernel write (AC:L), yielding full C/I/A via memory corruption/code execution.

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (zephyr).

CVSS VectorVendor: zephyr

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

DescriptionCVE.org

The GPIO syscall handlers in drivers/gpio/gpio_handlers.c did not validate the pin argument supplied by a user-mode caller. z_vrfy_gpio_pin_configure(), z_vrfy_gpio_pin_get_config() and z_vrfy_gpio_pin_interrupt_configure() verified only the device object (K_SYSCALL_DRIVER_GPIO() / K_SYSCALL_OBJ()) and then passed the caller-supplied gpio_pin_t straight through to z_impl_gpio_pin_*() and on to the driver. The only pin check in include/zephyr/drivers/gpio.h was __ASSERT(gpio_port_pin_is_supported(cfg->port_pin_mask, pin), ...), which compiles to nothing unless CONFIG_ASSERT is enabled, so in a production build no check existed at all.

GPIO drivers use pin as a shift count and as an array index on the documented assumption that it is a pin the controller supports. On STM32, for example, gpio_stm32_pin_interrupt_configure() turns pin into an EXTI line and stm32_gpio_intc_set_irq_callback() writes data->cb[line_num].cb and data->cb[line_num].data into a NUM_EXTI_LINES-entry array (default 16) in drivers/interrupt_controller/intc_gpio_stm32.c, guarded only by a compiled-out __ASSERT_NO_MSG(); the same function then reads exti_irq_table[line_num] and calls irq_enable() on the result. Other controllers index fixed-size per-pin configuration tables the same way - drivers/gpio/gpio_ite_it8xxx2_v2.c reads an MMIO base pointer out of wuc_base[8] with the caller's pin and performs a read-modify-write through it.

The issue is reachable only in builds with CONFIG_USERSPACE=y (the file is compiled under that symbol), by a user-mode thread that has been granted access to a GPIO device object. Such a grant is intended to authorize control of that port's pins; the missing validation instead lets the thread drive a supervisor-mode out-of-bounds write of a function pointer and an associated void * past a kernel .bss array, and out-of-bounds reads that feed irq_enable() and MMIO accesses - an escape from the user-mode sandbox that can lead to kernel memory corruption, arbitrary code execution, or a crash.

The fix validates pin against the controller's gpio_driver_config.port_pin_mask with gpio_port_pin_is_supported() in every pin-taking z_vrfy_ handler and returns -EINVAL otherwise, complemented by an unconditional pin >= GPIO_MAX_PINS_PER_PORT range check added to the shared z_impl_gpio_pin_*() inlines.

Executive ViewAI

Why It Matters

Zephyr RTOS versions 2.2.0 through 4.4.2 contain a high-severity flaw (CVE-2026-82961) in the GPIO syscall verification layer that allows a user-mode thread with legitimate GPIO access to escape the userspace sandbox and corrupt supervisor-mode memory. This affects any product built with CONFIG_USERSPACE=y, meaning leadership should be concerned about downstream risks to device integrity and potential arbitrary code execution, particularly in STM32, ITE it8xxx2, and emulated GPIO configurations, which could impact product security and customer trust.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

Prevalence
Medium
widely used embedded/IoT RTOS, but userspace-enabled production builds are a subset
Data Quality
3 sources
Confidence: Low

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS N/A
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in Zephyr

View all
CVE-2023-4260 CRITICAL POC
10.0 Sep 27

Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),

CVE-2026-1678 CRITICAL POC
9.8 Mar 05

An out-of-bounds write in the Zephyr RTOS DNS resolver (dns_unpack_name()) lets a crafted DNS response corrupt memory on

CVE-2023-5055 CRITICAL POC
9.8 Nov 21

Possible variant of CVE-2021-3434 in function le_ecred_reconf_req. Rated critical severity (CVSS 9.8), this vulnerabilit

CVE-2023-4257 CRITICAL POC
9.8 Oct 13

Unchecked user input length in /subsys/net/l2/wifi/wifi_shell.c can cause buffer overflows. Rated critical severity (CVS

CVE-2023-3725 CRITICAL POC
9.8 Oct 06

Potential buffer overflow vulnerability in the Zephyr CAN bus subsystem. Rated critical severity (CVSS 9.8), this vulner

CVE-2021-3323 CRITICAL POC
9.8 Oct 12

Integer Underflow in 6LoWPAN IPHC Header Uncompression in Zephyr. Rated critical severity (CVSS 9.8), this vulnerability

CVE-2021-3625 CRITICAL POC
9.8 Oct 05

Buffer overflow in Zephyr USB DFU DNLOAD. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable

CVE-2021-3319 CRITICAL POC
9.8 Oct 05

DOS: Incorrect 802154 Frame Validation for Omitted Source / Dest Addresses. Rated critical severity (CVSS 9.8), this vul

CVE-2018-1000800 CRITICAL POC
9.8 Sep 06

zephyr-rtos version 1.12.0 contains a NULL base pointer reference vulnerability in sys_ring_buf_put(), sys_ring_buf_get(

CVE-2023-4264 CRITICAL POC
9.6 Sep 27

Potential buffer overflow vulnerabilities n the Zephyr Bluetooth subsystem. Rated critical severity (CVSS 9.6), this vul

CVE-2024-1638 CRITICAL POC
9.1 Feb 19

The documentation specifies that the BT_GATT_PERM_READ_LESC and BT_GATT_PERM_WRITE_LESC defines for a Bluetooth characte

CVE-2023-5753 HIGH POC
8.8 Oct 25

Potential buffer overflows in the Bluetooth subsystem due to asserts being disabled in /subsys/bluetooth/host/hci_core.c

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy