CVE-2026-21870

CVE-2026-21870 is a medium-severity vulnerability in Bacnetstack Bacnet Stack with a CVSS 3.x base score of 5.5. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-193.

Key facts

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.

Frequently asked questions

What is 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.
How severe is CVE-2026-21870?
CVE-2026-21870 has a CVSS 3.x base score of 5.5, rated medium severity. It is exploitable over local access with low attack complexity, requires no privileges and user interaction. Impact on confidentiality is none, integrity none, and availability high.
Is CVE-2026-21870 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 0% (15th percentile), an estimate of the probability of exploitation in the next 30 days.
What products are affected by CVE-2026-21870?
CVE-2026-21870 primarily affects Bacnetstack Bacnet Stack. In total, 3 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
How do I fix CVE-2026-21870?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
Does CVE-2026-21870 have an EU (EUVD) identifier?
Yes. CVE-2026-21870 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2026-5920.
When was CVE-2026-21870 published?
CVE-2026-21870 was published on 2026-02-13 and last updated on 2026-06-17.

References

Affected products (3)

More vulnerabilities in Bacnetstack Bacnet Stack

All CVEs affecting Bacnetstack Bacnet Stack →

Other CWE-193 (Off-by-one Error) vulnerabilities

Browse all CWE-193 (Off-by-one Error) vulnerabilities →