Medium severity · published Feb 13, 2026
CVE-2026-21870
The BACnet Protocol Stack library has an Off-by-one Stack-based Buffer Overflow in tokenizer_string
5.5
CVSS
0.3%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Attack vector
Local
Complexity
Low
Privileges
None
User interaction
Required
Confidentiality
None
Integrity
None
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.3% · higher than 20% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
BA
bacnet-stack · bacnet-stack
<= 1.4.2; >= 1.5.0.rc1, <= 1.5.0.rc2 · source: vendor
BS
Bacnet Stack · Bacnetstack
through 1.4.2; 1.5.0; 1.5.0 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-21870
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-21870
Patch
https://github.com/bacnet-stack/bacnet-stack/commit/4e1176394a5ae50d2fd0b5790d9bff806dc08465
Patch
https://github.com/bacnet-stack/bacnet-stack/pull/1196
Exploit
https://github.com/bacnet-stack/bacnet-stack/security/advisories/GHSA-pc83-wp6w-93mx
More from bacnet-stack
9.1
CVE-2026-41475
BACnet Stack: Out-of-Bounds Read in WritePropertyMultiple Decoder via Deprecated Tag Parser
8.1
CVE-2026-26264
BACnet Stack WriteProperty decoding length underflow leads to OOB read and crash
7.5
CVE-2026-41503
BACnet Stack: Out-of-Bounds Read in ReadPropertyMultiple Property Decoder via Deprecated Tag Parser
7.5
CVE-2026-41502
BACnet Stack: Off-by-One Out-of-Bounds Read in ReadPropertyMultiple Object ID Decoder
7.5
CVE-2026-21878
BACnet Stack Improperly Limits Pathnames to a Restricted Directory
