Vulnerability in Bacnet-Stack
CVE-2026-21870
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 · last modified .
CVSS v3 metric
CVSS v3 base score 5.5 (Medium). Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H.
EPSS exploit prediction
EPSS: 0.003 (19.0th percentile), scored .
Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 19th percentile — 19.0% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.003 · newest: 0.003 · change: +0.000
Affected products
- Bacnet-Stack — versions <= 1.4.2, >= 1.5.0.rc1, <= 1.5.0.rc2
- Bacnetstack Bacnet Stack — versions 1.5.0
Weakness classification (CWE)
References
Frequently asked questions
- What is CVE-2026-21870?
- CVE-2026-21870 is a medium-severity vulnerability in Bacnet-Stack, classified under Off-by-one Error. CVSS score: 5.5/10. Published 2026-02-13.
- How severe is CVE-2026-21870?
- Medium severity. CVSS v3 base score is 5.5 out of 10.