Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach BACnet/IP service on device
-
DeliverySend AtomicWriteFile(record-access) replacing longer record with shorter data
-
ExploitBackend shrinks heap buffer but keeps stale trailing length
-
Executionmemmove reads past end of reallocated buffer
-
ImpactHeap out-of-bounds read and process crash (DoS)
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK
1 technique across 1 tactic: Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the target application integrate the RAMFS-backed FILE object implementation (bacfile_ramfs_* in src/bacnet/basic/sys/bramfs.c) rather than the default POSIX-backed FILE path, and expose a FILE object that is writable via AtomicWriteFile in record-access mode and already contains at least one existing record. The specific trigger is an AtomicWriteFile(record-access) request that replaces an existing record with a SHORTER caller-controlled record, so that the realloc shrinks the heap block while tail_record_len still reflects the old, larger layout. Limiting factors that reduce real-world exposure: the default upstream apps/server example uses the POSIX backend and is NOT affected, so only deployments explicitly wired to RAMFS are vulnerable; and the file must contain a replaceable multi-record layout. BACnet/IP commonly lacks authentication, so no credentials are needed, but the attacker must have network reachability to the device's BACnet datalink and the file object must permit record writes. |
| Impact | This is a genuine but moderate-priority issue, not an emergency. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) describes a network-reachable, low-complexity trigger with no authentication or user interaction, which on its face sounds severe - but the impact metrics are the decisive signal: only VA:L, with VC:N and VI:N, meaning the realistic outcome is an availability hit (process crash/DoS) rather than data theft or code execution. The vuln.today decision label is 'this_month', consistent with a patch-on-normal-cadence item rather than act_now. No EPSS score and no KEV listing are present in the input, so there is no evidence of active exploitation; it is not in CISA KEV. A concrete public PoC (poc.c) IS provided in the GHSA advisory and is demonstrated reproducing an AddressSanitizer heap-buffer-overflow, so exploit tooling exists even though exploitation has not been observed in the wild. The most important mitigating caveat is that the vulnerable path is NOT reachable in upstream's default example: the advisory explicitly states the reproduction target 'server-ramfs' is a local variant that switches the FILE object from the default POSIX backend to the RAMFS backend, so only deployments that integrate the RAMFS-backed FILE object with a writable record-access file are exposed. Note also a tension between the 'Information Disclosure' tag / CWE-125 and the demonstrated behavior: the out-of-bounds bytes are consumed inside a memmove on the write path and are not shown being returned to the attacker, so confidentiality impact is unconfirmed and the official vector's VC:N reflects that - treat the primary risk as denial of service. |
| Exploit ScenarioDerived | An attacker with network access to a BACnet/IP device built on bacnet-stack with the RAMFS-backed FILE object sends a single AtomicWriteFile(record-access) request that replaces an existing longer record with a shorter, caller-controlled record (e.g. the 1-byte value 'B'). The backend shrinks the heap allocation via realloc but still uses the pre-shrink trailing length in memmove(), reading past the end of the reallocated buffer and typically crashing the service. A working client PoC (poc.c) demonstrating this heap out-of-bounds read under ASAN is published in the GHSA advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 13, 2026
Heap out-of-bounds read in the RAMFS-backed FILE object implementation of the bacnet-stack C library (versions prior to 1.5.1, confirmed against 1.5.0) is reachable by sending a single AtomicWriteFile request in record-access mode that replaces an existing record with shorter data. The server recomputes the trailing-copy length from the old layout, shrinks the heap block with realloc(), then uses the stale length in memmove(), so the source range runs past the resized allocation; the assessed vector is CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L, i.e. remote, unauthenticated, availability-only. Exposure is limited to deployments that wire the RAMFS backend (bacfile_ramfs_init) instead of the default POSIX-backed FILE path shipped in apps/server, and the file must already hold a replaceable multi-record layout; the vendor advisory includes a client PoC that reproduces the heap-buffer-overflow under AddressSanitizer, but no KEV listing or other evidence of active exploitation was provided, and the priority decision is this_month rather than act_now.
RemediationAI
Upgrade to bacnet-stack 1.5.1 or 1.6.0, the versions in which the vendor states the issue is patched, or backport pull request https://github.com/bacnet-stack/bacnet-stack/pull/1408 if staying on an older branch; the fix makes record_count() and record_by_index() size-bounded, records the post-realloc size in pFile->size, and preserves the tail records in a temporary buffer across realloc() so the stale-length memmove() no longer occurs. Consult https://github.com/bacnet-stack/bacnet-stack/security/advisories/GHSA-cf8g-hp9m-9fvv for the vendor advisory. For deployments that cannot patch immediately, the most effective reduction is to stop using the RAMFS-backed FILE implementation and use the POSIX-backed backend (bacfile_posix_init) that ships with the default apps/server example, since that path is not affected by this defect; the trade-off is losing the in-memory file semantics that motivated RAMFS in the first place. Additionally, because the request path is unauthenticated BACnet/IP, restrict UDP 47808 (or the configured BACnet/IP port) to trusted building-automation hosts and segment BACnet networks from general-purpose networks, and avoid exposing FILE objects writable via AtomicWriteFile record-access unless required; these controls reduce reachability of the handler but do not fix the underlying memory-safety bug and will not protect against attackers already inside the BACnet segment.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
bacnet-stack is an open source ANSI/ASHRAE 135 (BACnet) protocol stack in C for embedded and building-automation devices; the CPE cpe:2.3:a:bacnet-stack:bacnet-stack:*:*:*:*:*:*:*:* carries no version constraints, so version scoping comes from the advisory (fixed in 1.5.1 and 1.6.0). AtomicWriteFile is a confirmed BACnet service handled by handler_atomic_write_file / handler_atomic_write_file_encode in src/bacnet/basic/service/h_awf.c, which dispatches to bacfile_write_record_data and then, for RAMFS-backed objects, to bacfile_ramfs_write_record_data in src/bacnet/basic/sys/bramfs.c. The root cause is CWE-125 (out-of-bounds read) arising from a stale-length arithmetic ordering bug rather than a classic unbounded copy: the backend locates the old record, computes record_len and tail_record_len = pFile->size - (record - pFile->data) - record_len, calls realloc() with pFile->size - record_len + fileDataStrLen + 1, and then executes memmove(record + fileDataStrLen, record + record_len, tail_record_len) using the pre-realloc tail length. When the replacement record is shorter than the original, the new allocation is smaller than the old layout and the memmove source interval extends beyond the end of the heap block, yielding a heap out-of-bounds read that ASan reports as a 28-byte READ immediately past a 30-byte realloc'd region. Supporting helpers record_count() and record_by_index() also walked the record buffer without any size bound, so the upstream fix (PR #1408) adds a size parameter to both helpers with explicit end-pointer checks, copies the tail into a temporary malloc'd buffer before realloc(), records new_size into pFile->size, and restores the tail after the new record and its null terminator. No integer overflow, write primitive, or authentication bypass is described in the available sources; the trigger is specifically the record-replacement (shorter-record) path, and the sources do not describe how the over-read contents could be returned to a client.
Know when Bacnet Stack gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Remote unauthenticated AtomicWriteFile over BACnet/IP (AV:N/AC:L/PR:N/UI:N); out-of-bounds read manifests as a crash so A:L, with C:N/I:N since no data return or write corruption is established.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
BACnet Stack is a BACnet open source protocol stack C library for embedded systems. Prior to version 1.5.1, the RAMFS-backed FILE implementation accepts AtomicWriteFile(record-access) requests that replace existing records with caller-controlled content. If a client replaces a record with shorter data, the backend can shrink the heap allocation and then continue processing with a trailing-copy length derived from the old layout. During that replace path, the RAMFS backend computes the trailing-copy length from the old file layout, then shrinks the heap allocation, and finally uses the stale length in memmove(). As a result, the source range of that memmove() can extend beyond the end of the reallocated heap buffer, producing a heap out-of-bounds read. This issue has been patched in versions 1.5.1 and 1.6.0.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
More in Bacnet Stack
View allUnauthenticated remote attackers can crash BACnet Stack prior to versions 1.5.0rc4 and 1.4.3rc2 by sending a malformed W
BACnet Protocol Stack library provides a BACnet application layer, network layer and media access (MAC) layer communicat
BACnet Stack is a BACnet open source protocol stack C library for embedded systems. [CVSS 7.5 HIGH]
The BACnet Protocol Stack library versions 1.4.2 and earlier contain an off-by-one buffer overflow in the ubasic interpr
Out-of-bounds writes in the BACnet/SC Address Resolution ACK URL parser of the BACnet Stack C library let an authenticat
An out-of-bounds write in the BACnet MS/TP COBS receive path of the bacnet-stack C library lets an attacker who can plac
Heap out-of-bounds read in the RAMFS-backed FILE object of BACnet Stack (bacnet-stack) 1.5.0 and earlier allows an unaut
A single malformed BACnet/IP WriteProperty request can lock the official bacnet-stack demo server in a non-terminating r
Remote attackers can crash BACnet Stack-powered embedded devices (versions prior to 1.4.3) by sending malformed ReadProp
Remote denial of service in BACnet Stack library versions before 1.4.3 allows unauthenticated attackers to crash embedde
Out-of-bounds read in BACnet Stack library versions before 1.4.3 allows unauthenticated remote attackers to crash embedd
Remote unauthenticated denial of service in BACnet Stack before 1.6.1 allows one BACnet/IP WriteProperty request to forc
EUVD-2026-125690
NVD
CVE.org
EPSS
GitHub
Exploit-DB