Skip to content

$expand carries no FLS gate at either projection site, so a lookup column the principal cannot read is still expanded and its value returned #7215

Description

@os-warren

Filed by the domain:ui execution seat (session session_012wwHa4aaFybxXrfmfHioDM) from a surfacing during objectui#7179's implementation. Reported by the lane, not ridden — fixing it inside #7179 would have widened that card's review surface past its scope, since this affects columns generally rather than grouping.

Filed unassigned. Not measured by me directly; see "provenance" below.

The claim

$select is FLS-gated on both projection paths. $expand is not.

buildExpandFields is handed a column list that was never passed through perms.checkField, so a lookup or master_detail field the current principal is denied on read is still expanded — and an expansion is precisely the operation that pulls the related record's values across the wire.

Why this is the same class as objectui#6898, not a lesser one

#6898 closed the $select half, and its stated reason applies verbatim here:

Sending a denied field in $select would leak the value at the server boundary even though the UI hides it — server-side trust must never be defeated by what the client requests.

An unguarded $expand defeats it the same way, and arguably harder: $select on a denied lookup returns a bare foreign key, whereas $expand on the same field returns the resolved related record. The gate that was closed for the cheaper leak is open on the more expensive one.

Scope — both sites

Both projection builders call buildExpandFields with an unfiltered list:

  • packages/plugin-grid/src/ObjectGrid.tsx — the grid's own fetch
  • packages/plugin-list/src/ListView.tsx — the expandFields memo

Note this is not a regression from #7179. That PR's own grouping additions to $expand are gated structurally (buildExpandFields returns a subset of the object's declared reference-bearing fields) and its $select additions are FLS-gated explicitly. It neither introduced nor widened this gap; it made the asymmetry visible by being careful about the half next to it.

Suggested direction

Filter the column list through checkField before it reaches buildExpandFields, at both sites — the same treatment $select already gets.

⚠️ One trap to respect, because #7179 hit it and documented it: checkField answers false for an undeclared key, so gating naively will also drop derived and computed columns that are not real object fields. The $select gates handle this by intersecting against the object's declared fields first and only asking checkField about survivors. Any fix here needs the same ordering, or it will silently stop expanding legitimate relations.

Provenance, stated honestly

This is the implementing lane's reading, recorded during objectui#7179 and relayed by the PM. I have not independently reproduced it, and no browser or wire capture is attached. It is filed as a finding to verify, not as a confirmed defect — the first task for whoever takes it is to demonstrate the leak, ideally as a failing test in the shape of packages/plugin-grid/src/__tests__/projectionFls-6898.test.tsx, which already pins the $select half and is the obvious model.

Recording it rather than holding it because the seat that found it is not the seat that will fix it, and an unfiled reading is a lost one.

Related: objectui#6898 (the $select half, closed) · objectui#7179 (where this surfaced) · the sibling gap in ListView's speculative view bindings, filed separately.

Activity

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

Metadata

Metadata

Assignees

Labels

domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatfindingpriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions