DEV Community

kozhevniko
kozhevniko

Posted on

Daptin's Generic YJS Route Turns Any Session Into a Data-Edit Primitive

Daptin's Generic YJS Route Turns Any Session Into a Data-Edit Primitive

CVE-2026-77369 is a broken access control flaw in Daptin versions from 0.11.4 through 0.12.x before 0.12.30. Daptin provides a low-code data backend and collaborative document editing. The vulnerable route is the generic WebSocket endpoint GET /yjs/:documentName, which checks only that a session exists. It does not perform the object-level permission check used by the purpose-built per-column collaboration route.

The document identifier uses the form typename.referenceId.columnName. The advisory states that the YJS provider parses that name and fetches the referenced row's column content without checking whether the requesting user may update that object. Any authenticated user, including a newly registered account with no administrative role, can read and write file.*-typed columns on any table. Because YJS synchronization is bidirectional, the flaw is both a disclosure path and a data-integrity path.

The contrast with the sibling route is instructive. The correctly protected route loads the row, evaluates CanUpdate for the requesting user and administrator group, and only then upgrades the WebSocket. The generic route skips the object lookup and permission decision. This is not a subtle token-validation bypass. It is a missing authorization boundary around a resource identifier supplied by the client.

The issue is especially relevant to self-service installations. If registration is open, an attacker may obtain the one prerequisite, a valid session, without help from an administrator. Sites that issue accounts to contractors or customers also have a larger population that can reach the route. A reverse proxy rule that blocks public registration does not repair the endpoint for existing low-privilege accounts.

Checks after exposure

Search HTTP and WebSocket logs for requests to /yjs/ where the document name references an administrative type or contains a table name the user should not access. Compare successful WebSocket upgrades with application authorization events. If the generic route does not emit a row-level audit event, that absence itself is a visibility gap. Review changes to file columns, document attachments and administrative rows during the exposure window.

A patch alone does not reveal whether unauthorized edits occurred. Export relevant version history, compare object hashes with trusted backups and check for uploaded files or modified configuration values. Rotate secrets that were stored in affected file columns. For externally reachable deployments, preserve reverse-proxy logs before their retention period expires.

Repair priorities

Upgrade to 0.12.30 or later. Restrict self-registration while the inventory is incomplete, and review every Daptin account created during the vulnerable period. If an emergency patch cannot be deployed, block the generic /yjs/ route at the edge while ensuring the legitimate collaboration routes remain available. Test the rule with a low-privilege account and a non-sensitive test table.

After upgrading, verify that a low-privilege user receives an authorization failure when naming another user's document or an administrative table. Then review the application's general model for WebSocket routes. Session presence is not object authorization. Every resource identifier carried in a path or message needs the same permission decision as the equivalent HTTP operation.

References

Top comments (0)