A flaw in how BACnet Stack decodes BACnet/SC header options lets an unauthenticated peer trigger a one-byte out-of-bounds read with a single crafted frame. If the bytes that follow the message in memory contain more option markers with the MORE bit set, the same flaw becomes an out-of-bounds write.
What Is It
BACnet Stack is an open-source C library that implements the BACnet protocol for embedded systems. Its BACnet/SC message decoder walks the list of header options by following each option's MORE bit. The decoder is missing two checks. It accepts a list whose last option still has the MORE bit set, and it does not limit how many options it will process.
A crafted BVLC-SC frame can make the decoder step one option past the end of the message and read message[message_len], which is one byte out of bounds. If the bytes after the message contain more option markers with the MORE bit set, the decoder keeps going past the fixed 4-entry option array and writes decoded option fields out of bounds. On the server, that array is the static global bsc_dm, so the write lands in adjacent BSS memory. The weakness is classified as CWE-787 (Out-of-bounds Write).
Why It Matters
Both faults can be reached before authentication, from the first frame a peer sends on a BACnet/SC connection. The bytes after the message come from that same peer's earlier frame data.
The two scoring sources disagree on severity:
- NVD (Primary): 9.4 CRITICAL, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:H
- GitHub (CNA, Secondary): 7.7 HIGH, CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:H
The two vectors differ only on attack complexity. Both rate integrity and availability impact as high, and neither requires privileges or user interaction.
This CVE is not in CISA's Known Exploited Vulnerabilities catalog, so KEV does not confirm active exploitation. CISA's SSVC assessment records exploitation as "none," automatable as "no," and technical impact as "partial."
What's Vulnerable
According to the NVD record and the GitHub advisory data, these versions of bacnet-stack are affected:
- All versions before 1.4.6
- 1.5.0 up to, but not including, 1.5.2
- 1.6.0 before 1.6.1
Patch Status
The issue is fixed in versions 1.4.6, 1.5.2, 1.6.1, and 1.7.0. Upgrade to the fixed release for your branch. The fix is in GitHub pull request #1435. The GitHub security advisory is GHSA-gr74-333w-7wg8. NVD lists the record as "Analyzed." No CISA KEV required action applies, because the CVE is not in the catalog.