Permissions & Security
Forms enforces defense-in-depth across admin authoring, submission triage, public embeds, file uploads, and outbound webhooks.
RBAC Permissions & Per-Form Access Policy
Section titled “RBAC Permissions & Per-Form Access Policy”| Permission | Scope |
|---|---|
forms-admin |
Create, edit, import/export, and configure form definitions, Visual Builder, stencils, templates, labels, A/B tests, and global settings. |
forms-submissions |
View, triage (Table/Kanban), download attachments, and export form submissions (also respects $entries->can($blueprint, 'export')). |
In addition to global permissions, FormsAccessPolicy enforces per-form role allowlists (allowed_view_roles, allowed_manage_roles), superuser-gated forms-builder-profiles, and strict authorization for raw html_block builder fields.
Security Controls Across the Pipeline
Section titled “Security Controls Across the Pipeline”- CSRF & Guest Embeds: Standard submissions enforce ProcessWire
$session->CSRF->validate(); cross-site embeds use stateless single-use_forms_csrftokens from/_forms/token/*backed byforms_nonces. - Encryption & Redaction:
FieldValueCipherseals marked fields withenc:forms:v1:...at rest,FormSecretMaskermasks webhook secrets and passwords (••••••••), andSubmissionExporterstripspasswordcolumns from exports. - Upload Validation:
StagedUploadStoreandUploadedFileValidatorverifyrealpath()containment, MIME types, double extensions, file size limits, and all installedFileValidatorModulescanners, plus.htaccessprotection (ensureProtectiveHtaccess()). - SSRF & Open Redirect Defense:
WebhookUrlPolicy+WireHttpWebhookTransportblock private/loopback/reserved IPs and pin DNS viaCURLOPT_RESOLVE;RedirectUrlBuilderprevents Open Redirects and sanitizes interpolated query parameters. - Demo Mode (
$config->demo): Blocks state-changing mutations acrossProcessForms,InputfieldForms,FrontendForm,Headlessendpoints, andAitools.