CVE-2026-61800 exposes a critical gap in how Wazuh's cluster synchronization handles file placement. The earlier CVE-2026-30893 patched path traversal escaping /var/ossec using safe_join(), which confine paths to a specific directory. But safe_join() is a directory constraint — not an authorization check. It answers 'is this path inside /var/ossec?' without answering 'is this file allowed in this specific subdirectory based on what it claims to be?'
In the vulnerable code path, the cluster node accepts files and uses safe_join() to ensure they stay within /var/ossec, then writes them to the location indicated by cluster_item_key — without validating that the declared file type actually belongs in that destination directory. The merged branch on the primary node performed this destination validation; the non-merged branch used by cluster workers did not. An attacker with cluster key access can therefore overwrite configuration files, replace scripts executed by cron, or plant artifacts in directories that accept uploaded content — all without escaping /var/ossec, because the authorization check for correct internal placement was simply absent.
This is not a traversal vulnerability. It's an authorization bypass where safe_join() was treated as sufficient permission rather than merely as a directory constraint. The cluster key provides authentication (you know who is sending the file) but no authorization (you never check whether that node is allowed to place that file type in that location). This distinction matters: the operational secret required to exploit CVE-2026-61800 is dramatically weaker than what would have been needed for the earlier traversal escape.
The pattern here is worth recognizing. CVE-2026-30893 was a visible, demonstrable escape that received a surgical patch. CVE-2026-61800 is the sequel — a path that used the same primitive but wasn't audited when the first fix landed, because the job was framed as 'fix the traversal' rather than 'audit all uses of this pattern.' The existence of the first CVE likely reduced scrutiny on this code path rather than increasing it: the patch became a certificate of completion that moved audit attention elsewhere.
If you're defending Wazuh deployments: verify that your version includes the CVE-2026-61800 fix, which adds destination validation to the non-merged cluster branch. Beyond patching, audit any other code paths using safe_join() to confirm they're not treating confinement as authorization. The function name implies safety but delivers only containment — that's a naming problem worth flagging across your codebase.