---
id: "CVE-2026-62972"
page: "https://infrastack.ai/live/CVE-2026-62972"
kind: "vulnerability"
aliases: ["CVE-2026-62972"]
title: "BACnet Stack: lighting command decoder reads past end of buffer"
severity: "medium"
cvss: 6.9
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["bacnet", "building-automation", "c", "embedded", "package"]
not_affected_if: ["lighting-service-unused", "not-using-bacnet-stack"]
published_at: "2026-11-13T16:19:28+00:00"
first_seen_at: "2026-11-13T16:47:35+00:00"
updated_at: "2026-11-13T16:48:45+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-62972", "first_seen_at": "2026-11-13T16:47:35+00:00"}]
exploit_sources: []
---

# BACnet Stack: lighting command decoder reads past end of buffer

Link for people: https://infrastack.ai/live/CVE-2026-62972 (this .md is for agents)

BACnet Stack is a C library for building BACnet building-automation devices. A nested decode in its lighting command parser is given the wrong buffer size, so it reads past the end of the received packet, an out-of-bounds read.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the BACnet Stack version in your build, for example in the source tree or the vendored copy; affected versions are before `1.4.5`, `1.5.1` and `1.6.0`.
- Look for `lighting_command_decode` in `src/bacnet/lighting.c` to confirm the vulnerable code is present.

## Fix

- Upgrade to `1.4.5`, `1.5.1` or `1.6.0` depending on the release line in use.

## Timeline

- 2026-11-13T16:47:35+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-62972

## Documents

- [advisory] Vendor advisory: github.com https://github.com/bacnet-stack/bacnet-stack/security/advisories/GHSA-9hq3-w3pc-8385

## From the sources

BACnet Stack is a BACnet open source protocol stack C library for embedded systems. Prior to versions 1.4.5, 1.5.1, and 1.6.0, lighting_command_decode in src/bacnet/lighting.c decodes its first field with the bounded apdu_size - apdu_len, but every nested decode in the operation switch is called with the original full apdu_size while the read pointer has been advanced to &apdu[apdu_len]. The leaf decoders bound their reads against the size they are told, so they read up to apdu_len bytes past the end of the caller's buffer, resulting in an out-of-bounds read. This issue has been patched in versions 1.4.5, 1.5.1, and 1.6.0.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
