CVE-2026-138304

Espruino RegExp jswrap_regexp.c matchhere out-of-bounds write

Published Nov 29, 2026 CVSS 4.0 · 6.9 Medium EPSS < 1% KEV · Not listed
Description
A security vulnerability has been detected in Espruino up to 2v29. Affected by this issue is the function matchhere of the file src/jswrap_regexp.c of the component RegExp Engine. The manipulation leads to out-of-bounds write. The attack is possible to be carried out remotely. The exploit has been disclosed publicly and may be used. The identifier of the patch is 54983bbe8f3c3fed46e5416c9e60bf00bbc98137. It is recommended to apply a patch to fix this issue.

Analysis

AI-generated

Technical impact

Espruino, a firmware for microcontrollers that includes a JavaScript engine, contains an out‑of‑bounds write in the matchhere function of its RegExp engine. The bug is triggered when a purposely crafted string is processed by the regular‑expression matcher, allowing a memory corruption that can lead to arbitrary code execution. The vulnerability is a classic buffer overflow (CWE‑119) and specifically an out‑of‑bounds write (CWE‑787).

Affected Systems

Devices running Espruino firmware up through version 2v29 are impacted. The flaw resides in src/jswrap_regexp.c of the RegExp component. The fix is introduced in commit 54983bbe8f3c3fed46e5416c9e60bf00bbc98137, so any earlier build is vulnerable.

Risk and Exploitability

The CVSS score is 6.9, indicating a medium‑to‑high severity. EPSS data is not available, and the vulnerability is not listed in the CISA KEV catalog. The exploit has been publicly disclosed and can be performed remotely by sending a crafted input to the JavaScript engine, creating a significant risk for exposed devices.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the patch included in commit 54983bbe8f3c3fed46e5416c9e60bf00bbc98137 or later.
  • Rebuild the firmware with the updated source to ensure the fix is present on all deployed devices.
  • Restrict or disable the JavaScript engine when an update cannot be applied immediately, or validate incoming input to prevent overly complex or large regular expressions.

Generated by OpenCVE AI on November 29, 2026 at 19:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description A security vulnerability has been detected in Espruino up to 2v29. Affected by this issue is the function matchhere of the file src/jswrap_regexp.c of the component RegExp Engine. The manipulation leads to out-of-bounds write. The attack is possible to be carried out remotely. The exploit has been disclosed publicly and may be used. The identifier of the patch is 54983bbe8f3c3fed46e5416c9e60bf00bbc98137. It is recommended to apply a patch to fix this issue.
Title Espruino RegExp jswrap_regexp.c matchhere out-of-bounds write
First Time appeared Espruino
Espruino espruino
Weaknesses CWE-119
CWE-787
CPEs cpe:2.3:o:espruino:espruino:*:*:*:*:*:*:*:*
Vendors & Products Espruino
Espruino espruino
References
Metrics cvssV2_0

{'score': 5, 'vector': 'AV:N/AC:L/Au:N/C:N/I:N/A:P/E:POC/RL:OF/RC:C'}

cvssV3_0

{'score': 5.3, 'vector': 'CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C'}

cvssV3_1

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

cvssV4_0

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

Weaknesses
  • CWE-119

    Improper Restriction of Operations within the Bounds of a Memory Buffer

  • CWE-787

    Out-of-bounds Write

Sources

Status
PUBLISHED
Assigner
VulDB
Published
Updated
Nov 30, 2026, 8:12 PM
Reserved
Nov 28, 2026, 7:17 PM
Status
Deferred
Published
Nov 29, 2026, 7:17 PM
Modified
Nov 30, 2026, 9:17 PM