CVE-2026-26399

Published Apr 20, 2026 CVSS 3.1 · 5.3 Medium EPSS < 1% KEV · Not listed
Description
A stack-use-after-return issue exists in the Arduino_Core_STM32 library prior to version 1.7.0. The pwm_start() function allocates a TIM_HandleTypeDef structure on the stack and passes its address to HAL initialization routines, where it is stored in a global timer handle registry. After the function returns, interrupt service routines may dereference this dangling pointer, resulting in memory corruption.

Analysis

AI-generated

Technical impact

A stack-use-after-return vulnerability exists in the Arduino_Core_STM32 library before version 1.7.0. The pwm_start() function creates a TIM_HandleTypeDef structure on the stack and passes its address to HAL initialization routines, where the pointer is stored in a global timer handle registry. When pwm_start() returns, the pointer remains registered globally and interrupt service routines may later dereference this dangling pointer, causing memory corruption. This flaw corresponds to CWE‑562 (Access of Uninitialized Variable), and can compromise data integrity by overwriting memory locations.

Affected Systems

Any STM32-based project that uses the Arduino_Core_STM32 library and calls the pwm_start() function in a library version earlier than 1.7.0 is affected. Devices with this library are at risk when PWM functionality is utilized.

Risk and Exploitability

The EPSS score is reported as < 1% and the vulnerability is not listed in the CISA KEV catalog, indicating a low likelihood of widespread exploitation. The CVSS score of 5.3 denotes moderate severity. The attack vector is inferred to involve triggering the pwm_start() function through user‑controlled input or firmware logic that activates PWM, after which interrupt handlers may use an invalid global timer handle. This inference is based on the described behavior of the library and the timing of the dangling pointer usage.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Arduino_Core_STM32 library to version 1.7.0 or later, which removes the stack allocation and global pointer registration flaw.
  • If an upgrade is not immediately possible, refrain from calling the pwm_start() function until the library is updated.
  • Review the firmware to ensure that no interrupt service routines dereference unrelated global timer handles and replace any vulnerable calls with safer alternatives.

Generated by OpenCVE AI on April 27, 2026 at 19:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Stm32duino
Stm32duino arduino Core Stm32
Vendors & Products Stm32duino
Stm32duino arduino Core Stm32
Type Values Removed Values Added
Title Stack‑Use‑After‑Return in Arduino_Core_STM32 Causes Memory Corruption
Type Values Removed Values Added
Weaknesses CWE-825
Type Values Removed Values Added
Weaknesses CWE-562
Type Values Removed Values Added
Title Stack‑Use‑After‑Return in Arduino_Core_STM32 Causes Memory Corruption
Type Values Removed Values Added
Title Stack Use-After-Return in Arduino STM32 Core Library Causing Memory Corruption
Weaknesses CWE-416
Type Values Removed Values Added
Weaknesses CWE-825
Metrics cvssV3_1

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

ssvc

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

Type Values Removed Values Added
Title Stack Use-After-Return in Arduino STM32 Core Library Causing Memory Corruption
Weaknesses CWE-416
Type Values Removed Values Added
Description A stack-use-after-return issue exists in the Arduino_Core_STM32 library prior to version 1.7.0. The pwm_start() function allocates a TIM_HandleTypeDef structure on the stack and passes its address to HAL initialization routines, where it is stored in a global timer handle registry. After the function returns, interrupt service routines may dereference this dangling pointer, resulting in memory corruption.
References
Weaknesses
  • CWE-562

    Return of Stack Variable Address

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Apr 22, 2026, 7:53 PM
Reserved
Feb 16, 2026, 12:00 AM
Status
Awaiting Analysis
Published
Apr 20, 2026, 6:16 PM
Modified
Jun 17, 2026, 10:26 AM