← Reference

The Directus Public role is what anonymous visitors get

Anything the Public role can read is readable by the internet, with no token.

01

What it is

Directus ships with a Public role that applies to requests carrying no credentials. Granting it read access to a collection makes that collection world-readable.

It is commonly granted while getting a front end working — the fastest way to make data appear — and then never revisited.

02

How to fix it

Settings → Roles & Permissions → Public. Review every collection with a read tick and remove the ones that are not meant for anonymous visitors.

For user-owned data, use an authenticated role with a permission filter on the owner field, so the query is scoped by the server rather than by your front end.

03

How to confirm the fix

Request https://your-instance/items/<collection> with no Authorization header. A closed collection returns 403. Data coming back means the Public role still has read.

04

The mistake people make

Leaving directus_users readable by the Public role. It exposes the email address of every account on the instance, which is a data breach even though no application data leaks.

Not sure whether this applies to you?

Give us the address and we will tell you. No code, no access, no install — and every finding we have is shown in full, including on the free trial.

Check a site