CVE-2026-21870
Bacnetstack Bacnet Stack ≤ 1.4.2
Raw vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:HCVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.
Summary
CVE-2026-21870 is a medium-severity Off-by-one Error (CWE-193) vulnerability in Bacnetstack Bacnet Stack. Its CVSS base score is 5.5 (Medium).
Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked at the 10th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.
The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SA-15 (Development Process, Standards, and Tools) — see the control section below for these in your framework.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2026-5920
Vulnerability Data
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…
more
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.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise Techniques
MITRE ATT&CK v20.0
CVEs Like This One
Affected Assets
Mitigating Controls
Control response
—
—
—
V6.2.1
Mitigating Controls (NIST 800-53 r5)
Our mappings, made for this CVE.
Developer testing and evaluation can discover off-by-one errors in loops, bounds, and calculations before deployment.
Requiring documented development standards and tools can embed bounds-checking and arithmetic-correctness rules that stop off-by-one mistakes at introduction.
Mitigating Controls (NIST CSF 2.0)
Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.
Secure SDLC practices directly prevent off-by-one errors via reviews, static analysis, and testing.
Mitigating Controls (ISO/IEC 27001:2022 Annex A)
Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.
Security testing in development and acceptance can detect off-by-one errors before release.
Training can teach developers about common off-by-one pitfalls (null terminators, loop boundary conditions, length calculations), reducing a minority of instances, but these are subtle implementation bugs that even trained developers write, so the effect is real but bounded.
Secure coding directly addresses off-by-one errors through coding standards and peer review.
A.8.30 carries secure design, coding and testing practices (8.25-8.29) into outsourced development via contractual requirements, so an off-by-one error in delivered code is reduced the way those practices reduce it; the owner graded the analogous CWE-134 pair at `partial` and declared `partial` as the ceiling for this clause on this verb.