CVE-2026-21870 Details
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.
A stack-based buffer overflow vulnerability has been identified in the BACnet Protocol Stack library, specifically in versions 1.4.2, 1.5.0.rc2, and earlier. The issue arises in the uBASIC interpreter's tokenizer_string function, which improperly manages null termination for strings that exceed the buffer limit. This flaw leads to a crash (SIGABRT) when processing overly long string literals, as the function writes a null byte to an index that is out of bounds, causing a stack overflow.
Users can upgrade to BACnet Protocol Stack version 1.4.3 or 1.5.0.rc3, where this vulnerability has been patched.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Feb 13, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-193 | Off-by-one Error | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| bacnetstack bacnet stack | <= 1.4.2 1.5.0 rc1 1.5.0 rc2 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Feb 18, 2026 | Initial Analysis | [email protected] |
| Feb 13, 2026 | New CVE Received | [email protected] |