CVE-2026-21878: BACnet Stack Improperly Limits Pathnames to a Restricted Directory
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.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-21878?
CVE-2026-21878 has a medium severity rating due to improper pathname limitation which may allow unauthorized file access.
How do I fix CVE-2026-21878?
To fix CVE-2026-21878, upgrade BACnet Stack to version 1.5.0.rc3 or later, where the vulnerability has been addressed.
What types of systems are affected by CVE-2026-21878?
CVE-2026-21878 affects embedded systems utilizing the BACnet Stack library prior to version 1.5.0.rc3.
What is the nature of the vulnerability in CVE-2026-21878?
CVE-2026-21878 involves improper validation of user-provided file paths, leading to potential unauthorized file access.
Is CVE-2026-21878 actively being exploited?
As of the latest updates, there are no confirmed active exploits for CVE-2026-21878, but it is recommended to apply the fix promptly.