Description
An incorrect buffer size calculation vulnerability exists in tinyexpr commit 4a7456e in new_expr(). For arity-0 expression nodes, including constants, variables, and zero-argument functions, the function allocates less memory than sizeof(te_expr) but treats the returned allocation as a complete te_expr object. This results in undefined behavior and can cause deterministic process termination in UBSan-instrumented builds.
Published: 2026-09-24
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service
Action: Apply patch
AI Analysis

Impact

The vulnerability arises from an incorrect buffer size calculation in tinyexpr’s new_expr function. For arity‑0 expression nodes it allocates less memory than the size of the te_expr structure yet treats the result as a valid object. This mismatch produces undefined behavior and, in builds instrumented with Undefined Behavior Sanitizer, can deterministically terminate the process. The primary impact is a denial of service when an attacker or malicious input triggers the crash.

Affected Systems

Applications that embed tinyexpr and link against the commit 4a7456e in the codeplea/tinyexpr repository or its mirror szaydel/tinyexpr are affected. The vulnerability exists at the source level; any build that incorporates that commit is at risk. No official product version numbers are provided, so the check is at the source commit level. The bug was fixed in the subsequent commit fe7459728c2ab8d2f91365abe56601cdd0e24f9b.

Risk and Exploitability

The EPSS score is below 1% and the vulnerability is not listed in CISA’s KEV catalog, indicating limited known exploitation. With a CVSS score of 7.5, the vulnerability is considered high severity. Exploitation is likely local: an attacker who can supply expressions—such as an end‑user to a web service, a script, or a command‑line tool that uses tinyexpr—can trigger the failure. While there is no remote code execution, the denial of service effect could be critical in high‑availability or real‑time systems.

Generated by OpenCVE AI on October 7, 2026 at 09:55 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Tinyexpr to a fixed version, such as incorporating the commit fe7459728c2ab8d2f91365abe56601cdd0e24f9b or later releases that contain the buffer‑allocation correction.
  • If an upgrade is not immediately possible, restrict or sanitize any expression inputs that reach tinyexpr, ensuring that only trusted or validated expressions are parsed to mitigate the risk of a crash.
  • Consider compiling tinyexpr with additional sanitizers (e.g., UBSan, ASAN) and runtime checks in a staging environment to detect misuse before production deployment.

Generated by OpenCVE AI on October 7, 2026 at 09:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 07 Oct 2026 10:15:00 +0000

Type Values Removed Values Added
Title Incorrect Buffer Size Calculation in Tinyexpr Leading to Process Crash

Wed, 07 Oct 2026 08:30:00 +0000

Type Values Removed Values Added
Title Buffer Size Miscalculation in tinyexpr's Expression Parser Causes Undefined Behavior and Possible Crash
Weaknesses CWE-119

Tue, 06 Oct 2026 18:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-131
Metrics cvssV3_1

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


Sun, 27 Sep 2026 12:15:00 +0000

Type Values Removed Values Added
First Time appeared Codeplea
Codeplea tinyexpr
Vendors & Products Codeplea
Codeplea tinyexpr

Sat, 26 Sep 2026 05:30:00 +0000

Type Values Removed Values Added
Title Buffer Size Miscalculation in tinyexpr's Expression Parser Causes Undefined Behavior and Possible Crash
Weaknesses CWE-119

Thu, 24 Sep 2026 15:30:00 +0000

Type Values Removed Values Added
Description An incorrect buffer size calculation vulnerability exists in tinyexpr commit 4a7456e in new_expr(). For arity-0 expression nodes, including constants, variables, and zero-argument functions, the function allocates less memory than sizeof(te_expr) but treats the returned allocation as a complete te_expr object. This results in undefined behavior and can cause deterministic process termination in UBSan-instrumented builds.
References

Subscriptions

Codeplea Tinyexpr
cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-10-06T17:42:50.871Z

Reserved: 2026-09-10T00:00:00.000Z

Link: CVE-2026-88355

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-09-24T16:17:12.833

Modified: 2026-10-06T18:16:57.013

Link: CVE-2026-88355

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-07T10:00:07Z

Weaknesses
  • CWE-131

    Incorrect Calculation of Buffer Size