Description
BACnet Protocol Stack library provides a BACnet application layer, network layer and media access (MAC) layer communications services. In 1.4.2, 1.5.0.rc2, and earlier, an off-by-one stack-based buffer overflow in the ubasic interpreter causes a crash (SIGABRT) when processing string literals longer than the buffer limit. The tokenizer_string function in src/bacnet/basic/program/ubasic/tokenizer.c incorrectly handles null termination for maximum-length strings. It writes a null byte to dest[40] when the buffer size is only 40 (indices 0-39), triggering a stack overflow.
Published: 2026-02-13
Score: 5.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service via crash
Action: Immediate Patch
AI Analysis

Impact

An off‑by‑one stack overflow occurs in the ubasic interpreter inside the BACnet Protocol Stack library; when a string literal longer than the 40‑byte buffer is parsed, the tokenizer writes a null byte past the end of the buffer, corrupting the stack and causing the process to abort with SIGABRT. The bug does not enable code execution or privilege escalation, but it reliably disrupts service by terminating the process that is handling BACnet messages. The impact is aligned with a moderate denial of service.

Affected Systems

The vulnerability affects the BACnet Protocol Stack (bacnet-stack) library, particularly versions 1.4.2, 1.5.0 RC2, and earlier releases. Systems that incorporate these library versions in their BACnet applications are potentially affected. The stack uses a tokenizer function located in src/bacnet/basic/program/ubasic/tokenizer.c to process string literals, and the flaw is present in all releases until a newer version that corrects the null termination logic.

Risk and Exploitability

The CVSS score of 5.5 indicates a moderate severity. The EPSS score is below 1%, suggesting a low probability of exploitation within the current time window, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. Attackers would need to supply long string literals to the ubasic interpreter, which typically requires local access to the device or the ability to inject input into the application that uses the library. Because the flaw only causes a crash, the risk to confidentiality or integrity is minimal, but the denial of service may impact operational availability of BACnet devices or services. Overall, the risk is moderate with a low likelihood of exploitation in current threat environments.

Generated by OpenCVE AI on April 17, 2026 at 19:51 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the BACnet stack library to a release that corrects the tokenizer null‑termination logic (consult the project’s release notes for the fixed version).
  • Rebuild or redeploy your BACnet‑enabled applications using the updated library to ensure the stack overflow bug is eliminated.
  • As a temporary safeguard for environments that cannot immediately update, validate or truncate string literals to fewer than 40 characters before passing them to the tokenizer, or implement input validation in the calling application to reject overly long strings.

Generated by OpenCVE AI on April 17, 2026 at 19:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 18 Feb 2026 19:00:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:bacnetstack:bacnet_stack:*:*:*:*:*:*:*:*
cpe:2.3:a:bacnetstack:bacnet_stack:1.5.0:rc1:*:*:*:*:*:*
cpe:2.3:a:bacnetstack:bacnet_stack:1.5.0:rc2:*:*:*:*:*:*

Fri, 13 Feb 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Bacnetstack
Bacnetstack bacnet Stack
Vendors & Products Bacnetstack
Bacnetstack bacnet Stack

Fri, 13 Feb 2026 19:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Fri, 13 Feb 2026 18:15:00 +0000

Type Values Removed Values Added
Description BACnet Protocol Stack library provides a BACnet application layer, network layer and media access (MAC) layer communications services. In 1.4.2, 1.5.0.rc2, and earlier, an off-by-one stack-based buffer overflow in the ubasic interpreter causes a crash (SIGABRT) when processing string literals longer than the buffer limit. The tokenizer_string function in src/bacnet/basic/program/ubasic/tokenizer.c incorrectly handles null termination for maximum-length strings. It writes a null byte to dest[40] when the buffer size is only 40 (indices 0-39), triggering a stack overflow.
Title The BACnet Protocol Stack library has an Off-by-one Stack-based Buffer Overflow in tokenizer_string
Weaknesses CWE-193
References
Metrics cvssV3_1

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


Subscriptions

Bacnetstack Bacnet Stack
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-02-13T18:19:36.183Z

Reserved: 2026-01-05T16:44:16.368Z

Link: CVE-2026-21870

cve-icon Vulnrichment

Updated: 2026-02-13T18:19:31.816Z

cve-icon NVD

Status : Analyzed

Published: 2026-02-13T18:16:19.783

Modified: 2026-02-18T18:49:07.307

Link: CVE-2026-21870

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-17T20:00:09Z

Weaknesses