Why Strapi public role permissions decide what the internet can reach
The Public role controls what an anonymous visitor can read or write through the Strapi API, and it needs an audit before any API goes live. If a front end, mobile app or partner will call the Content API without signing in, or if end users can register, the Public role decides which content types, fields and actions those calls can reach. Teams often assume that because editors sign in to the admin panel, the API is closed by default. That assumption is wrong for the Public role, which is a separate control that applies to every request that carries no token.
The Public role applies to end-user API calls made without a token. It is separate from administrator roles, which govern who can sign in to the admin panel, and separate from API tokens, which identify a machine or application that has been given access. A request with a valid API token is judged against that token's permissions, not the Public role, so a team can test with a token, see correct results, and still expose content to anonymous callers. The Public role is configured in the Users & Permissions plugin, and it is the first thing to review whenever content is served to a front end or when user registration is switched on. Confirm the exact menu path and default behavior for your Strapi version in the official documentation before you rely on it in a change plan.
Before go-live, the reader should decide which content types are meant to be public and which are not, then compare that list with what the Public role actually allows. Count every find, findOne and create, update or delete action per content type, and remember that custom routes and components can widen access beyond the defaults. The audit is most urgent when the project has a new content type, a plugin that adds routes, or registration for end users. Plan to test the API as an anonymous caller after each change, because a permission that looked correct in the admin panel can still return private fields or drafts in practice.
Which exposure mistakes show up most in Strapi reviews
Read exposure usually starts when a content type is created for editors or internal processes and the Public role is left with its default or a broad find permission. The API then returns entries that were never meant for visitors, especially when draft records or fields such as internal notes, pricing drafts or review status share a content type with published material. Permissions in Strapi are set per content type and per action, so a type that looks internal can still be readable if someone ticked find or findOne for Public during a quick test.
- Broad find and findOne grants: Confirm each content type under Public lists only the actions that the front end calls.
- Internal content types: Check types for workflow, review or staging content that have no reason to be reachable anonymously.
- Field-level exposure: Look for internal fields such as notes, owners or moderation flags that come back in the default response.
- Draft versus published data: Test whether anonymous requests can retrieve unpublished or draft entries by ID.
- Test data left behind: Search for sample entries created during build that remain published.
For each readable type, record why it is public and which fields are intended for visitors, then compare the anonymous response with that list.
Write exposure appears when Public is granted create, update or delete on a content type, often so that a contact form or comment feature works during development and is never tightened afterward. Because the default Public role has no write access, these grants are usually added deliberately, which means they are easy to forget. An anonymous user who can create entries can fill the database with spam, and one who can update or delete can alter published content.
- Create on forms: Confirm that a form submission type allows create only, with no read or list access for Public.
- Update and delete grants: Treat any update or delete for Public as a finding unless the scope is documented and reviewed.
- Bulk and nested writes: Check whether a permitted create can also set relations or components that touch other types.
- Missing validation and limits: Review whether anonymous writes are constrained by validation, and whether rate limiting covers them.
- Development leftovers: Look for write grants added during testing that were never removed.
As a test, send an anonymous create, update and delete to each type and confirm that every request is rejected except the ones that are intended.
Media exposure sits in two places: the upload plugin permissions and the media files themselves. A Public role that can call upload or read files can store arbitrary content on the server, and uploaded files that are linked from content may be reachable without any authentication. Reviewers often check the content types but overlook the upload endpoints and the storage location, so files remain exposed after the content types are locked down.
- Upload permission for Public: Confirm that anonymous visitors cannot upload, and that editors upload only through authenticated admin sessions.
- Read access to media: Check whether the media library entries are readable by Public and whether file URLs can be guessed or listed.
- Private assets in public folders: Look for internal documents, contracts or scanned records placed in folders that the provider serves openly.
- Storage provider settings: Confirm the provider's public access setting matches what the content owners expect.
- Metadata leaks: Review file names and captions for personal or internal information.
Upload a test file as an anonymous user, then request a known private file's URL without a token to see whether it loads.
Custom routes are a frequent source of bypass. A developer adds a route in a content type's routes file or a controller, sets the auth configuration to false or leaves it unset, and calls service code directly without the permission checks that the default routes apply. The route then works for anonymous users even though the Public role looks correct in the admin panel. The admin role list does not show these routes as exceptions, so the review has to start from the code.
- Auth set to false: Search route configuration for
auth: falseand confirm each one is intentional and documented. - Direct service calls: Check controllers that call services or the Document Service API without checking
ctx.state.useror a policy. - Policies and middleware: Confirm that custom policies are attached to the routes they protect and that their logic fails closed.
- Overridden default behavior: Review any change to the find or findOne controllers that removes filters or populates extra data.
- Routes that return more than the model: Verify that custom responses do not include fields that the default route would hide.
Write an anonymous request for every custom route, including those that seem internal, and check whether each returns the status the policy intends.
Relations leak data when a public type is readable and it links to a related type that is private. A request that uses populate can return the related entries and their fields, even if Public has no permission on the related type, depending on how the query and the relation are configured. This is easy to miss because each type looks safe on its own. Deep population, wildcard population and components inside dynamic zones widen the exposure further.
- Populate across types: Test whether a readable type can return related entries from a type that Public cannot read directly.
- Wildcard populate: Check whether public queries accept populate=* or deep population, and limit it in the API layer where possible.
- Components and dynamic zones: Confirm that nested components do not carry internal fields into a public response.
- Filter and sort parameters: Verify that filters on private relations cannot be used to infer values, such as checking which records exist.
- Relation fields on private types: Confirm that the reverse side of a relation does not expose data when a public type is queried.
Run anonymous requests with populate and nested filters that reach each private type, and confirm that no private field appears in the response. Test behavior against the Strapi version in use, because query handling changed between releases.
How to audit the Public role step by step
This sequence turns the Public role into a documented, verified list of what anonymous visitors can read and write, with each gap assigned to an owner for a fix. Work through it in order so that every finding is checked against the product intent and confirmed in the running system.
Export the current Public permissions
Open the Users & Permissions plugin in the Strapi admin panel and list the Public role's granted actions for every content type and every plugin, including upload and any custom plugins. Record the list as a snapshot with the date and the Strapi version in use, so later changes can be compared against it. Done when every granted action appears in the snapshot and the list matches what the admin panel shows on screen. If the project keeps permission settings in version control, export them from the repository as well and note any difference between the two.
Compare each grant with product intent
For each granted action, write down the business reason it exists, such as a public article list on the website, and the owner who approved it. Mark any action that has no stated reason, such as create, update or delete on a content type that visitors never need to change, as a candidate finding. Involve the product or content owner for anything unclear, since they decide what is public. Done when every granted action has either a stated reason and an approver, or a candidate finding in the register.
Check custom controllers and routes
Review the project's custom routes and controllers for any route that is reachable without authentication, including routes whose policies are missing or set to allow everything. Confirm that a custom route is not exposed simply because its handler sits outside the standard content API permissions. Test each such route with an unauthenticated request and record the status code and response body. Done when every custom route has a documented auth requirement and a recorded anonymous test result.
Verify relations and populated fields
Check which relations and components are returned to anonymous callers when a public endpoint is requested with populate parameters. A permitted content type can expose related private content, draft data or fields the editor assumed were internal. Request each public endpoint anonymously with the populate options that the front end uses, and also with broader populate queries, then review the returned fields. Done when you have a list of any related or private field that appears in an anonymous response, each linked to its finding.
Test the API as an anonymous user
Send requests without any token to each public endpoint, using read, create, update and delete methods where the role permits them, and compare the actual responses with the snapshot. Use a clean client with no cached credentials, and confirm that an authenticated editor's token is not being sent. Expected results should match the intent recorded in the earlier steps. Done when every anonymous test has a recorded expected result, an actual result and a pass or fail mark.
Confirm the saved state in the admin panel
After any change, reopen the Public role in the admin panel and check that the saved permissions match the approved list, then repeat the anonymous tests on the target environment. A change made in a development instance does not confirm a change in production, so check each environment separately. Done when the admin panel state, the version-controlled configuration where used, and the anonymous test results agree for every environment in scope.
Record each finding with an owner
Log every finding in a register with the content type or route, the granted action, the anonymous test result, the risk in plain terms, the proposed fix, and a named owner who will make and review the change. Keep the register with the audit snapshot so the reasoning for each decision remains available to the security and compliance reviewers. Done when every finding has an owner, a status and a link to its test evidence.
How an anonymous request is evaluated
An anonymous request starts at the client and passes the reverse proxy, where CORS and header handling apply, before reaching the Strapi route. Strapi then checks the Public role permission for that route before the controller runs and queries the database. A reviewer should send the same request through each hop and compare what comes back at the proxy, at the route and at the response, looking for fields or records that the Public role should never expose.
Where a reviewer should test for leaks on an anonymous request.
Permission options for the Public role and when each fits
This table compares the four choices a team makes for each content type under the Public role: no access, read-only access to published entries, read access with restricted fields or filters, and write actions. Read each row as a default to start from, then check the risk column against what the content type actually holds before enabling anything.
| Option | When it fits | Main risk |
|---|---|---|
| No access | Content types used only by admins, editors, or back-end jobs, and content types whose data is internal such as drafts, reviews, or staff notes | Front ends that expect public reads fail until a deliberate permission is added, so each new content type needs an explicit decision |
| Read-only access to published entries | Marketing pages, articles, and catalog data meant for anyone on the internet, where the content is already published on the site | Draft or unpublished entries can leak if the front end or query filters do not restrict status, and relations may expose linked data the team did not intend |
| Read access with restricted fields or filters | Content types that mix public and private attributes, such as a staff directory or customer-facing records with internal notes | Field-level settings alone may not cover every route, so filters must be enforced in custom controllers and tested with anonymous requests |
| Create, update, or delete actions | Rarely appropriate for Public. Only consider a narrow case such as a form submission, and then with validation, rate limits, and a review step | Anonymous writes can alter or flood content, bypass editorial review, and create files or relations that are hard to trace |
| Count and filter queries | Useful when a page needs totals or lists that should not expose individual records | Filters and counts can reveal sensitive values through repeated queries, so confirm what each filter returns to an anonymous caller |
Security risks to check beyond the permission toggles
Toggling the Public role off is necessary but not sufficient. The risks below sit in custom code, response shaping and publishing state, which the permission screen does not show. Each one is checked by calling the API as an anonymous user and comparing what comes back with what was intended.
Custom routes that bypass policies
Custom routes and controllers can be opened to the Public role without the same policy checks that protect the default CRUD endpoints. A reviewer should list every custom route in the project's route files, note its auth setting, and confirm which handlers call the Document Service directly. Then send an unauthenticated request to each one and record whether it returns data, ignores filters, or accepts writes. Look especially for auth: false settings copied from examples.
Populated relations exposing related content
Populating a relation can return content that the Public role cannot read on its own endpoint. A request with populate=* or a deep populate may pull in private authors, internal notes or unpublished related entries, depending on how the related type is permitted. Check each content type that has relations, then request the public endpoint with nested populate parameters as an anonymous user and inspect every nested object for fields that should stay internal.
Draft versus published leakage
Strapi 5 separates draft and published versions of a document, and the public API should return only published content. A reviewer should confirm that requests for drafts, including through status parameters or preview-related routes, are refused for anonymous callers. Also check that a draft's changes do not appear in list responses, localized variants or related fields that load the latest version. Test with an entry that has an unpublished edit.
Uploads and media URLs
Media files attached to public entries are often reachable by direct URL, even when the metadata endpoint is locked down. Check whether the Upload plugin's files are served publicly, whether the upload folder or provider exposes listing, and whether private files are stored in a location that a public path can reach. Confirm that unpublished or restricted media returns a refusal when its URL is requested anonymously, and that file names do not reveal internal structure.
Verbose error responses
Validation and server errors can reveal field names, stack traces, database details or internal route structure to an anonymous caller. Send malformed filters, unknown fields, invalid IDs and oversized bodies to public endpoints, and read the full response. Confirm that production mode returns generic messages and that no stack trace or query text appears in responses or in headers. Verbose errors help attackers map the schema before they try any other request.
Rate limits on anonymous endpoints
Public read endpoints and any public write path, such as a form submission, have no per-user limit by default. Ask whether rate limiting is applied to the custom routes you exposed, and whether limits apply per IP address across all instances. Send a burst of anonymous requests to a list endpoint with deep populate and to a write endpoint, then confirm that throttling or blocking happens at the level the team expects. Record the result for the retest.
Testing the API as an anonymous user
Run every anonymous test from the network position your visitors actually use, with no Authorization header and no saved session cookie, and treat the results as the final check on the Public role. The test list should come from your route inventory, not from memory: every Content API collection and single-type endpoint, every custom route in your src/api folders, and the GraphQL endpoint if you have enabled the GraphQL plugin. For each one, send the request both as a read and as a write (create, update and delete), because a Public role that looks read-only in the admin panel can still expose a custom controller that accepts writes. Test from outside your private network, through the same reverse proxy, CDN and hostname your front end uses, so that proxy rules and header handling are part of what you verify. Confirm the test client really is anonymous by checking that the response to a known protected endpoint is denied before you trust any other result.
For each request, record the endpoint, method, the status code you expected from your permission design, the status code you received, and a short excerpt of the response body. Expected results should come from a written matrix that says which content types and fields the Public role may read, and which must return 403 or 401. Unexpected results matter most in two cases: a read that returns fields you meant to hide, such as draft content, internal relations, or user-linked data, and a write that succeeds. Check response bodies for fields you did not intend to publish, not only for the status code. Some results will be harder to interpret than others, so ask the team that owns each content type to confirm the expected output before sign-off. Retest the full matrix after every permission change, every schema change that adds a relation or field, and every plugin or custom route update, because a change to one content type can alter what a related endpoint returns.
Keep the matrix, the raw request and response logs, the date, the Strapi version and the environment name as dated evidence for go-live sign-off. A saved log of passing and failing requests shows the reviewer what was tested and what was fixed, which is more useful than a summary sentence. Store the evidence with the change ticket for the release, and record who ran the tests and who accepted any exception in writing. Anonymous testing does not prove that the configuration is complete, because it covers only the endpoints you listed, so note the inventory used to build the list and the date it was generated. If your organization has an internal security testing process, ask whether it will repeat this matrix independently, and confirm with your auditors which evidence format they will accept.
Questions teams ask before reviewing Public permissions
How much effort does a Strapi public permissions audit take?
Effort depends mainly on how many content types, components, custom routes and plugins expose endpoints to the Public role, and on how many environments must be checked. A small project with a handful of content types and no custom controllers is a short exercise. A project with dynamic zones, custom routes, several plugins and separate staging and production instances takes longer because each route must be called anonymously and its response reviewed. Ask any partner for the written route inventory method and the list of environments in scope before accepting a quote.
Can our internal team review the Public role ourselves?
Yes, if at least one engineer knows the Strapi content API well and has time to work through each content type. The core steps are to export the Public role settings in the admin panel, list every route the role can reach, call each one without a token, and compare the returned fields against what the site is meant to show. Internal teams often miss custom routes, relation population and draft content, so a second reviewer who did not build the schema is useful. Confirm your team can run requests against a non-production copy of the data before starting.
What do we need to provide before the review starts?
The reviewer needs the content model, a list of custom routes and controllers, the Users & Permissions configuration, and access to at least one environment that matches production settings. It also helps to have the front-end's list of API calls, so the review can separate what the site needs from what the API happens to expose. Ask for read-only admin access to the Public role and a test account for authenticated comparisons. Confirm where the environments live and whether any sample data contains personal information that must be masked.
How long does a permissions review take?
Duration scales with the number of endpoints, the number of environments and how many findings need retesting after fixes. Start from the route count in your inventory, not from the number of content types, because each content type can add find, findOne, create, update and delete routes plus custom routes. Ask a partner to state the duration in the written scope and to name which retests are included. No fixed figure applies to every project, so the scope document is the right place to confirm it.
Does a permissions review satisfy a compliance assessment?
No. A permissions review produces evidence of how the Public role is configured and tested, which can support a control under a framework your auditor uses, but it does not make your system compliant on its own. Independent auditors and certification bodies issue the reports and certifications. DeployOpen prepares systems, controls and evidence for compliance assessments, so ask your auditor which control IDs they expect the evidence to map to before the review begins.
What mistakes do anonymous permission reviews usually find?
The most common findings are public find or findOne access on content types that hold drafts, internal notes or unpublished pages, and relations that expose fields through population. Custom routes added to controllers often inherit no authentication policy and return more data than the front end needs. Upload endpoints and file listings are also frequently left open. Test each finding by calling the endpoint with no Authorization header and with a deliberately low-privilege token, then record the response body.
Should we review the Public role on staging or production?
Review on a copy that matches production configuration, and repeat a short check on production after each permission change. Staging alone can miss differences in environment variables, database contents or deployed plugin versions. Production testing should be read-only and limited to GET requests against published content. Confirm with your operations team which hostnames and rate limits apply before sending test traffic.
Limits to confirm in your Strapi version and environment
A permissions review is only as good as the environment it describes. The items below are the facts that change what an anonymous visitor can reach, so confirm them before you read any test result as a verdict. Each one changes either the list of routes to test or the expected answer for a route.
Strapi version and documented behavior
Confirm the exact Strapi version running in every environment, then check that the Users and Permissions behavior you observe matches the documentation for that version. Strapi 5 minor releases ship often, so a version noted in a ticket last month may already be behind. Record the version in the review evidence and retest the Public role after any upgrade, because default permissions and response shapes can change between majors.
Strapi releasesCustom plugins that register routes
Any installed plugin can add content API routes, and those routes may not appear in the Public role screen the way core content types do. Inventory every plugin and every custom route file, then check which of them accept unauthenticated requests. A route with no policy and no permission entry is a common gap that a standard content type review will miss.
Whether GraphQL is enabled
If the GraphQL plugin is active, anonymous visitors may reach content through a second endpoint with its own query surface, even when the REST routes look locked down. Confirm whether GraphQL is installed and enabled in each environment, and if it is, test the Public role against GraphQL queries and introspection as well as REST calls. Turn it off in environments that do not need it.
Edition and plan features in use
Review workflows and audit logs are Enterprise features in Strapi's self-hosted plans, and content history and releases start at the Growth plan. Confirm which edition and plan your organization holds before you assume a control exists. If a control your review depends on is not in your plan, record it as a gap and document the compensating setting instead.
Self-hosted plansHosting topology and admin exposure
Confirm where the API is reachable from, including whether a reverse proxy, load balancer or CDN sits in front of Strapi and which paths it forwards. A public read route may be reachable from the internet even when the admin panel is internal, and the reverse proxy may pass through paths you did not intend to expose. Test from outside your network, not only from inside the cluster.
Response format under the v4 header
During a migration from v4, requests that send the Strapi-Response-Format: v4 header can return a different response shape than default Strapi 5 responses. Confirm whether any client, proxy or test script sends that header, and run your anonymous tests both with and without it. A field that appears only under the compatibility header can expose data your default test did not show.
v4 to v5 migration FAQHow DeployOpen scopes and delivers a Strapi permissions review
DeployOpen approaches a Strapi public role review as a fixed-scope engagement: we map what the Public role can reach in your running instance, test it as an anonymous user, and hand back fixes with evidence. The work is limited to the open-source Strapi instance and the environments you control, and the written scope sets exactly which content types, routes and environments are covered.
How we scope
- Agree in writing which Strapi instances, environments and content types fall inside the review.
- Export the current Public role settings and list every content type with its find, findOne and write actions.
- Confirm which custom routes, plugins and Users & Permissions overrides could expose data to anonymous callers.
- Record the test accounts, base URLs and any preview or staging hosts the testers may use.
How we build
- Run anonymous requests against every exposed endpoint and compare responses with the intended public content.
- Attempt unauthenticated create, update and delete calls, and check how uploads and relations behave without a token.
- Review populate parameters, draft and published states, and fields that should stay private, such as internal notes.
- Document each finding with the request, response, affected role setting and a suggested permission change.
How we hand over
- Deliver a findings report that ranks exposures by data sensitivity and explains the fix for each one.
- Provide a target Public role configuration that your team can apply and review in version control or a change record.
- Walk your engineers through the test scripts so they can rerun the anonymous checks after each release.
- Include a retest of agreed findings once fixes are in place, as defined in the written scope.
How we support
- Engagements are fixed-scope, so scope changes such as new content types are agreed in writing before extra work starts.
- Ongoing support is available as a retainer for permission checks after schema changes, plugin installs and upgrades.
- Ask us to confirm which Strapi version, plugins and hosting model the written scope assumes before work begins.
- Ask for the deliverables list, retest terms and test environment access in the quote so responsibilities stay clear.

