{"id":"CVE-2026-62976","kind":"vulnerability","aliases":["CVE-2026-62976"],"related":[],"title":"BACnet Stack: record counting reads past heap buffer on consecutive appends","description":"BACnet Stack is a BACnet open source protocol stack C library for embedded systems. Prior to version 1.5.1, the RAMFS-backed FILE object implementation stores appended records as NUL-terminated strings, but its record-counting logic later walks the buffer as if an additional terminating empty record were present. As a result, two consecutive AtomicWriteFile(record-access) append requests can cause record_count() to call bacnet_strnlen() on a pointer that is already one byte past the end of the heap allocation. This issue has been patched in versions 1.5.1 and 1.6.0.","summary":"BACnet Stack is a C library for building BACnet building-automation devices. Two consecutive AtomicWriteFile append requests to the RAMFS-backed FILE object make the record counter read one byte past a heap allocation, which can crash or leak memory contents.","severity":"high","cvss":8.7,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["bacnet-stack","building-automation","c","embedded","package"],"not_affected_if":["no-ramfs-file-object","no-record-access-writes","patched-version"],"how_to_check":"- Check the BACnet Stack version in your build (for example the bacnet-stack tag or the library source) and see whether it is below `1.5.1`.\n- Look for use of the RAMFS-backed FILE object with AtomicWriteFile record-access writes in your device firmware.","fix":"- BACnet Stack: move to `1.5.1` or `1.6.0`.","status":"open","published_at":"2026-11-13T19:19:33+00:00","first_seen_at":"2026-11-13T19:52:09+00:00","triaged_at":"2026-11-13T19:54:04+00:00","updated_at":"2026-11-13T19:54:04+00:00","category":"package","confidence":0.6,"triage":{"at":"2026-11-13T19:54:04Z","model":"claude-haiku-5-5","output":{"fix":"- BACnet Stack: move to `1.5.1` or `1.6.0`.","reach":"network","title":"BACnet Stack: record counting reads past heap buffer on consecutive appends","impact":"medium","summary":"BACnet Stack is a C library for building BACnet building-automation devices. Two consecutive AtomicWriteFile append requests to the RAMFS-backed FILE object make the record counter read one byte past a heap allocation, which can crash or leak memory contents.","audience":"developers","category":"package","nicknames":[],"who_cares":["bacnet-stack","embedded","c","building-automation"],"confidence":0.6,"fix_status":"available","needs_auth":"unknown","worst_case":"out-of-bounds heap read can crash the device process","analyst_note":"Confirm the exact affected version range and whether the trigger is reachable over the BACnet network, using the vendor advisory on github.com.","how_to_check":"- Check the BACnet Stack version in your build (for example the bacnet-stack tag or the library source) and see whether it is below `1.5.1`.\n- Look for use of the RAMFS-backed FILE object with AtomicWriteFile record-access writes in your device firmware.","plain_action":"","product_name":"","needs_analyst":true,"not_affected_if":["patched-version","no-ramfs-file-object","no-record-access-writes"],"who_is_affected":"Teams that build BACnet devices on the BACnet Stack C library and use its RAMFS-backed FILE object with record-access AtomicWriteFile writes. Projects on versions 1.5.1 or 1.6.0 or later, or that do not use the RAMFS file object with record-access writes, are not affected.","user_interaction":"unknown","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.000773,"input_tokens":4652,"output_tokens":615,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2026':13A,16A '-62976':14A,17A '1.5.1':87C,163C '1.6.0':165C 'access':130C 'addit':116C 'alloc':62B,155C 'alreadi':146C 'append':11A,43B,96C,131C 'atomicwritefil':42B,127C 'autom':23B,38B 'back':49B,91C 'bacnet':1A,19B,27B,35B,70C,74C,139C 'bacnet-stack':18B 'buffer':8A,112C 'build':22B,34B,37B 'building-autom':21B,36B 'byte':58B,148C 'c':24B,31B,79C 'call':138C 'caus':134C 'consecut':10A,41B,126C 'content':69B 'count':4A,107C,136C 'counter':55B 'crash':65B 'cve':12A,15A 'devic':39B 'embed':25B,82C 'empti':118C 'end':151C 'file':50B,92C 'heap':7A,61B,154C 'implement':94C 'issu':157C 'later':109C 'leak':67B 'librari':32B,80C 'logic':108C 'make':52B 'memori':68B 'nul':100C 'nul-termin':99C 'object':51B,93C 'one':57B,147C 'open':75C 'packag':26B 'past':6A,59B,149C 'patch':160C 'pointer':143C 'present':121C 'prior':84C 'protocol':77C 'ramf':48B,90C 'ramfs-back':47B,89C 'read':5A,56B 'record':3A,54B,97C,106C,119C,129C,135C 'record-access':128C 'record-count':105C 'request':44B,132C 'result':124C 'sourc':76C 'stack':2A,20B,28B,71C,78C 'store':95C 'string':102C 'strnlen':140C 'system':83C 'termin':101C,117C 'two':40B,125C 'version':86C,162C 'walk':110C","nicknames":[],"mitigations":[],"who_affected":"Teams that build BACnet devices on the BACnet Stack C library and use its RAMFS-backed FILE object with record-access AtomicWriteFile writes. Projects on versions 1.5.1 or 1.6.0 or later, or that do not use the RAMFS file object with record-access writes, are not affected.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["bacnetstack","buildingautomation","c","embedded","high","package"],"campaign_type":null,"search_a":"'-2026':13A,16A '-62976':14A,17A 'append':11A 'bacnet':1A 'buffer':8A 'consecut':10A 'count':4A 'cve':12A,15A 'heap':7A 'past':6A 'read':5A 'record':3A 'stack':2A","search_b":"'alloc':62B 'append':43B 'atomicwritefil':42B 'autom':23B,38B 'back':49B 'bacnet':19B,27B,35B 'bacnet-stack':18B 'build':22B,34B,37B 'building-autom':21B,36B 'byte':58B 'c':24B,31B 'consecut':41B 'content':69B 'counter':55B 'crash':65B 'devic':39B 'embed':25B 'file':50B 'heap':61B 'leak':67B 'librari':32B 'make':52B 'memori':68B 'object':51B 'one':57B 'packag':26B 'past':59B 'ramf':48B 'ramfs-back':47B 'read':56B 'record':54B 'request':44B 'stack':20B,28B 'two':40B","search_c":"'1.5.1':87C,163C '1.6.0':165C 'access':130C 'addit':116C 'alloc':155C 'alreadi':146C 'append':96C,131C 'atomicwritefil':127C 'back':91C 'bacnet':70C,74C,139C 'buffer':112C 'byte':148C 'c':79C 'call':138C 'caus':134C 'consecut':126C 'count':107C,136C 'embed':82C 'empti':118C 'end':151C 'file':92C 'heap':154C 'implement':94C 'issu':157C 'later':109C 'librari':80C 'logic':108C 'nul':100C 'nul-termin':99C 'object':93C 'one':147C 'open':75C 'past':149C 'patch':160C 'pointer':143C 'present':121C 'prior':84C 'protocol':77C 'ramf':90C 'ramfs-back':89C 'record':97C,106C,119C,129C,135C 'record-access':128C 'record-count':105C 'request':132C 'result':124C 'sourc':76C 'stack':71C,78C 'store':95C 'string':102C 'strnlen':140C 'system':83C 'termin':101C,117C 'two':125C 'version':86C,162C 'walk':110C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-07-16T13:18:25+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-62976","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-62976","severity":null,"published_at":"2026-11-13T19:19:33+00:00","modified_at":"2026-11-13T19:19:33+00:00","first_seen_at":"2026-11-13T19:52:09+00:00","fetched_at":"2026-11-13T19:52:09+00:00","note":null}],"documents":[{"id":149165,"url":"https://github.com/bacnet-stack/bacnet-stack/security/advisories/GHSA-32jj-x86x-w98w","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":"2026-07-16T13:18:25+00:00","relation":"advisory","confidence":null,"note":"Vendor advisory: github.com"}],"disclosures":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}