High severity · published Feb 13, 2026
CVE-2026-21878
BACnet Stack Improperly Limits Pathnames to a Restricted Directory
7.5
CVSS
0.4%
EPSS
No
On KEV
Description
BACnet Stack is a BACnet open source protocol stack C library for embedded systems. Prior to 1.5.0.rc3, a vulnerability has been discovered in BACnet Stack's file writing functionality where there is no validation of user-provided file paths, allowing attackers to write files to arbitrary directories. This affects apps/readfile/main.c and ports/posix/bacfile-posix.c. This vulnerability is fixed in 1.5.0.rc3.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
None
Integrity
High
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.4% · higher than 36% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
BA
bacnet-stack · bacnet-stack
< 1.5.0.rc3 · source: vendor
BS
Bacnet Stack · Bacnetstack
1.5.0; 1.5.0 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-21878
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-21878
Patch
https://github.com/bacnet-stack/bacnet-stack/commit/c5dc00a77b4bc2550befa67a930b333e299c18f3
Exploit
https://github.com/bacnet-stack/bacnet-stack/security/advisories/GHSA-p8rx-c26w-545j
More from bacnet-stack
9.1
CVE-2026-41475
BACnet Stack: Out-of-Bounds Read in WritePropertyMultiple Decoder via Deprecated Tag Parser
8.1
CVE-2026-26264
BACnet Stack WriteProperty decoding length underflow leads to OOB read and crash
7.5
CVE-2026-41503
BACnet Stack: Out-of-Bounds Read in ReadPropertyMultiple Property Decoder via Deprecated Tag Parser
7.5
CVE-2026-41502
BACnet Stack: Off-by-One Out-of-Bounds Read in ReadPropertyMultiple Object ID Decoder
7.5
CVE-2025-66624
BACnet-stack MS/TP reply matcher OOB read
