Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save mansurmavlankulov/2ca66f95965fb9d4aab353bcf2434cdb to your computer and use it in GitHub Desktop.

Select an option

Save mansurmavlankulov/2ca66f95965fb9d4aab353bcf2434cdb to your computer and use it in GitHub Desktop.
OpenSave: the WAN sync path does not authenticate the sender, and a peer chooses the save root (CWE-290, CWE-73)

OpenSave: the WAN sync path does not authenticate the sender, and a peer chooses the save root

Supplier / product: Liquid-co / OpenSave - https://github.com/Liquid-co/OpenSave Vulnerability types: A. Authentication bypass by spoofing / improper authentication (CWE-290, CWE-287) B. External control of a file path, with an incomplete denylist as the only guard (CWE-73, CWE-184) Affected component: internal/p2p/wanclient_handlers.go (WAN relay message handling) and the DangerousSyncRoot guard Reporter: Mansur Mavlankulov Status: reported to VulnCheck (CNA) for coordinated disclosure, CVD 6294889e-94fe-4add-ae2f-7e04a93f9fdb, submitted 2026-09-21. Published at the CNA's request as the public reference for CVE assignment; VulnCheck could not locate a confidential channel to the maintainer.


The guarantee this breaks

docs/RELAY.md:225-228 states the intended two-control model:

"The code is the only thing that decides who can find whom, so treat it like a password - anyone who has it can send your devices a pairing request. They still cannot sync anything without you approving the pairing on the device itself."

GETTING_STARTED.md repeats it, and commit 470a6dd ("Make the room code strong enough to be called a password") rests on the same model. The first control works. The second is not implemented on the WAN path.

A. The authorization gate trusts a self-asserted field

The WAN handler decides authorization by testing whether RelayMessage.From names a known paired peer (internal/p2p/wanclient_handlers.go:265-283). The relay forwards messages verbatim and never establishes sender identity, so From is chosen by whoever sends the message.

The values needed to satisfy the check are not secret either: each client broadcasts its own peer id and its list of paired peer ids to every member of the room, including members who have never been approved. A participant who holds only the room code therefore receives the identifiers that make them look paired.

B. A peer chooses the save root

A sync request may name any absolute path as a game's save folder. The guard, DangerousSyncRoot, is a small denylist of obviously sensitive locations; it does not constrain the path to any directory the user configured.

Impact

Chained, someone who holds a room code but was never approved for pairing can register an arbitrary directory on another user's machine as a "game save folder" and read its contents in cleartext over the relay, and write into it. The room code is documented as the only thing controlling discovery, with pairing approval as the control that governs what a peer may actually do - that second control does not hold.

Suggested fix

  • A: bind identity to the transport. Derive the peer id from an authenticated property of the relay connection rather than from a field in the message body, and reject any message whose From does not match it. Do not broadcast the paired-peer list to unpaired room members.
  • B: resolve the requested path and require it to be inside a directory the user explicitly configured, using a real containment check rather than a denylist.

No exploit code is included in this reference.

@sivadaboi

Copy link
Copy Markdown

thanks for the detailed report, we're working on fixing it asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment