Shared View Row Filter Bypass via Row-Scoped Public APIs
Description
The row-scoped endpoints of a public shared view verified the target record with a primary-key read that ignored the view's row filter, while the view's own list and count endpoints enforced it. The mere existence of a primary key was enough to pass that check.
Details
In BaseModelSqlv2.ts the list and count paths applied the view's root filter list whenever a view was bound to the model, while the read-by-primary-key path applied only the key predicate, row-level security, and the soft-delete filter. The row-scoped public handlers in public-datas.service.ts — the linked-record listings behind the many-to-many, link-to-another-record, one-to-many and has-many routes, and the single-record read behind the attachment-download route — all used that read as their "row is visible in the shared view" gate, so key existence rather than membership of the filtered set decided access. The routes in public-datas.controller.ts are intentionally unauthenticated, which left the row filter as their only boundary.
This is distinct from the documented behaviour whereby columns hidden in a view remain queryable; what was bypassed here is the row filter that determines which records are shared at all.
Impact
No authentication is required beyond possession of the shared-view link and, where configured, its password. A recipient able to guess a filtered-out record's primary key — an auto-increment integer in the common case — could list that record's linked records and obtain signed download paths for its attachments, and the linked-record responses could additionally echo display fields of the excluded parent record.
Credit
This issue was reported by @KasperBuilds.