The vulnerability, CVE-2026-85430, describes an authentication bypass and denial-of-service issue in MOOS essential-moos's pShare component. Specifically, it states that pShare accepts UDP datagrams from any source and republishes them with attacker-claimed identities, and that malformed datagrams can crash the pShare process.
Analysis of the provided commit 53729b6325a991a8dbd84dcd04e4707f3e592fd6 reveals that the core of the fix lies within the Listener::ListenLoop function in Essentials/pShare/Listener.cpp. This function is responsible for reading and processing incoming UDP datagrams.
Prior to the patch, this function was vulnerable in several ways:
- Authentication Bypass/Spoofing: It used the
read system call, which does not provide the sender's network address. This meant that the pShare component had no way to verify the origin of the UDP datagrams, allowing any source to inject messages under spoofed identities. The patch addresses this by switching to recvfrom (which captures sender address) and introducing an allowed_sources_ check.
- Denial of Service (Malformed Datagrams): The deserialization of
CMOOSMsg was not robustly handled. A malformed datagram could cause msg.Serialize to fail or throw an unhandled exception, leading to a crash of the pShare process. The patch mitigates this by wrapping the deserialization in a try-catch block and checking the return value of Serialize.
- Denial of Service (Process Crash on Route Failure): In the event of an error within the
ListenLoop, the vulnerable code would call exit(-1), which would terminate the entire pShare application. The patch changes this to return false, allowing other input routes and the rest of the pShare functionality to continue operating.
The changes in Listener.h (adding SetAllowedSources and allowed_sources_) and Share.cpp (populating allowed_input_sources_ and calling SetAllowedSources) are all part of the mitigation strategy to introduce source authentication. The vulnerability itself existed in the Listener::ListenLoop function due to the absence of these checks and error handling mechanisms.