CVE-2026-21870: The BACnet Protocol Stack library has an Off-by-one Stack-based Buffer Overflow in tokenizer_string

Published Feb 13, 2026
·
Updated

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 tokenizerstring 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.

Affected Software

4 affected components
BACnet BACnet Protocol Stack<=1.5.0.rc2
Bacnetstack Bacnet Stack<=1.4.2
Bacnetstack Bacnet Stack=1.5.0-rc1
Bacnetstack Bacnet Stack=1.5.0-rc2

Event History

Feb 13, 2026
CVE Published
via MITRE·05:58 PM
Data Sourced
via MITRE·05:58 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-21870?

CVE-2026-21870 has been rated as a high severity vulnerability due to its potential for exploitation via an off-by-one stack-based buffer overflow.

2

How do I fix CVE-2026-21870?

To fix CVE-2026-21870, upgrade the BACnet Protocol Stack to version 1.5.0.rc3 or later where the vulnerability has been addressed.

3

What is the impact of CVE-2026-21870?

The impact of CVE-2026-21870 includes potential execution of arbitrary code on the affected system due to the buffer overflow.

4

Which versions of BACnet Protocol Stack are affected by CVE-2026-21870?

Versions 1.4.2 and 1.5.0.rc2 of the BACnet Protocol Stack are affected by CVE-2026-21870.

5

Is CVE-2026-21870 a remote vulnerability?

CVE-2026-21870 is a local vulnerability that requires access to an affected application to exploit the buffer overflow.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203