Skip to content

INSERT does not respect WHERE clause from GRANT #4

@wundrian

Description

@wundrian

So if you say

GRANT INSERT ON t TO mbickel WHERE id IN (1, 2, 3);

Then connect as mbickel and do:

INSERT INTO t (id) VALUES (4);

Allowing you to probe if t already has a value 4. This effectivly gives SELECT privileges even if not granted by the sysadmin.

The only known way around this is to shadow values, ie allow the INSERT to succeed and keep both the existing tuple and the newly inserted one each tagged with a label that says who should see this value.

A workaround is rate-limiting operations, so an attacker can't enumerate the whole universe of keys to find all inserted values. But this won't stop attackers that seek only a specific information - for example "has Bob Brown been employed within my company (even if not in the department I'm doing the data management for)?"

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions