CVE-2026-21870
published medium CVSS 3.1 · 5.5The BACnet Protocol Stack library has an Off-by-one Stack-based Buffer Overflow in tokenizer_string
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| bacnet-stack | — | bacnet-stack<= 1.4.2 · >= 1.5.0.rc1, <= 1.5.0.rc2 | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 5.5 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| bacnet-stack | bacnet-stack | <= 1.4.2 (affected)>= 1.5.0.rc1, <= 1.5.0.rc2 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-193 CWE-193: Off-by-one Error
References
3Provider assertions
2GitHub_M · cna
The BACnet Protocol Stack library has an Off-by-one Stack-based Buffer Overflow in tokenizer_string
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- c5bdc2e87357c87befda8664f8fc8a930955e30ebeb5caf4f8db001e47ed3235
- Ingested
- 23 Sep 2026, 09:05:14 UTC
- Source record
- Official CVE record