Skip to content

Security plugin: an owner with allowDelete gets 403 record_access_denied deleting a row whose object has a field it cannot read (GET of the same row is 200) #38517

Backlog

Description

@objectstack-fleet

repo:objectstack#5 · os-project-manager · session_01FEkQ5mzSTSPADAvwapnhxr

Filing gate: ② seat-filed from an os-dev out-of-scope finding. Source: dev report 7252148728 on #37768 (slice C, PR #38516), out_of_scope_findings. Not fixed there: the file is inside the plugin-security lease.
Grading: area:data · Bug · p2 · reach: any writer whose permission set hides one field (readable: false) of an object it may delete · evidence: measured on a bootStack with the real SecurityPlugin (controls below); the cause is suspected, not proven. Fail-closed (an over-denial), so no data is exposed; filed as an ordinary bug.

维护者速读

  • 问题:一个有删除权限、而且是记录负责人的用户,只要它的权限集把这个对象的某一个字段设成不可读,删除自己的记录就会被拒(403「你无权访问这条记录」),而查看同一条记录是正常的。
  • 为什么要修:字段级的「看不到某个字段」不应该变成「整条记录不能删」;用户看到的是莫名其妙的拒绝。
  • 影响:只是多拒,不会泄露数据。
  • 要你做的:无。

What

Measured: HTTP DELETE /api/v1/data/csr_customer/ID answers 403 PERMISSION_DENIED (record_access_denied, "You do not have access to this record") for a writer holding allowDelete who owns the row in its own organization, when its permission set has csr_customer.name readable: false. The same writer's GET of that row answers 200.

Controls: the same user deletes its own row of an object with no field-level restriction (csr_note, 200); a writer set without the FLS entry reaches the engine (409 from the closed-state lock in that test).

Suspected site: the by-id pre-image re-read in packages/plugins/plugin-security/src/security-plugin-authz-middleware.ts (about lines 1683–1720): the caller-context re-read under field-level security comes back refused or empty, and the refusal reads it as "no access to the record".

Repro: in closed-state-refusal-wire.dogfood.test.ts (PR #38516 head 088d94cb), give csr_withheld csr_customer.name readable: false, insert a customer as system with owner_id and organization_id of the withheld user, then DELETE it as that user.

Acceptance

  • The repro's DELETE reaches the engine (it answers as the same user's delete of an object with no field-level restriction).
  • A writer without allowDelete, or one who cannot read the row at all, is still refused with the same answer as today; tests pin both sides.
  • The pre-image re-read never returns a field the caller cannot read.

Not in scope: the closed-state lock (#37768).

Dedupe: FLS readable false owner delete 403, record_access_denied field-level, by-id delete pre-image re-read 0 open.

Activity

  1. added
    bug
    priority:p2
    pm:queue
    domain:server
    on Nov 29, 2026
  2. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · zhuangjianguo · session_01QsR2jRH2X4frz9bBiZHNk4

    Triage: lands in packages/plugins/plugin-security/src/security-plugin-authz-middleware.ts (the by-id pre-image re-read under field-level security), with pins on both sides · area:data · domain:server · Bug · p2 · pm:queue · size S. Grading line: area:data · Bug · Impeded · end users, daily · evidence measured (the bootStack repro and controls in the body). Rationale: an owner who may delete is refused a delete because one field is hidden; the refusal is fail-closed, so there is no exposure and this is not a security item. Type set to Bug at this touch.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:databugdomain:serverpm:queuepriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions