Advanced Custom Fields version 6.8.11 delivers significant security modifications across both ACF and ACF PRO. Addressing vulnerabilities reported via responsible disclosure, this update alters how data is saved, filtered, and rendered across front-end forms, Gutenberg block bindings, shortcodes, and REST API endpoints. Because several of these changes enforce strict execution contexts and capability checks, administrators and developers must review potential breaking changes in custom implementations before updating production environments.
Stricter Field Saving Rules and Context Validation
Prior to ACF 6.8.11, submitted form values could be processed even if the target field was not displayed on the form or explicit location rules did not match the underlying post or object. ACF 6.8.11 alters this behavior by validating submitted inputs against rendered fields and assigned location rules. Fields that fail validation are discarded during save processing.
This structural change may affect workflows where custom JavaScript dynamically injects ACF inputs into a form, or where third-party forms submit meta keys belonging to unassigned field groups. Additionally, WordPress’s standard built-in Custom Fields meta box can no longer edit post meta keys belonging to registered ACF fields; edits to ACF fields must occur directly through the ACF interface.
If field groups are assigned to user profiles using the location rule User Form is Add / Edit, their corresponding fields will no longer save when a new user registers. To resolve this, update the field group’s location rule to User Form is Register or All.
For custom code that programmatically appends field inputs to forms, developers must whitelist the affected field keys using the context-specific acf/form/{context}/allowed_field_keys filter. Enable WP_DEBUG and WP_DEBUG_LOG to identify rejected fields and ascertain the exact {context} parameter (e.g., post, user, taxonomy, or options_page) required for the filter.
add_filter( 'acf/form/post/allowed_field_keys', function ( $keys, $post_id ) {
$keys[] = 'field_abc123';
return $keys;
}, 10, 2 );
Note that front-end forms rendered via acf_form() maintain their pre-existing validation mechanics and continue using the existing acf/form/allowed_field_keys filter.
Data Masking in Shortcodes and Block Bindings
To eliminate unauthorized personal data exposure, shortcode instances and ACF block bindings targeting User fields no longer return full array details such as display names, user logins, or email addresses. Instead, they output only the primitive numeric User ID.
Fields configured to return complex nested arrays (such as Image fields set to return an Image Array) or object structures (such as Relationship fields set to return Post Objects) previously produced unformatted string conversions or triggered fatal errors on PHP 8. Under 6.8.11, these return blank strings when output via shortcode or block binding, while simple lists like Checkbox choices remain unchanged.
To format the raw User ID output securely without exposing untrusted object graphs, implement the acf/format_value hook in your theme or plugin logic:
add_filter( 'acf/format_value/name=post_contact', function ( $value ) {
return is_array( $value ) && isset( $value['display_name'] ) ? $value['display_name'] : $value;
}, 20 );
If legacy functionality must be completely restored, the acf/bindings/allow_user_data filter can be toggled. However, enabling this filter exposes personal user details (including email addresses) to public site traffic and should be used with caution.
Read Permissions Enforcement for Relational Fields
Access control has been integrated into Relationship, Post Object, and Page Link fields. In the WordPress admin, query results inside these fields now respect the reading permissions of the current user. Users with lower-level permissions (such as Contributors and Authors) will no longer see or select draft, pending, or scheduled posts authored by other users.
If a lower-level user edits a post where a restricted item was previously selected by an Editor or Administrator, ACF renders the restricted selection as (Restricted item). The existing selection is maintained upon saving, preventing accidental data loss.
When relational fields are rendered inside ACF Blocks on the front end, post access is evaluated against the author of the containing post. If the block references a post unreadable by that author (such as another author’s private draft), the referenced item is omitted from the rendered output. Direct template invocations via get_field() within theme code are unaffected by this restriction.
To alter or disable these authorization filters, developers can utilize specific framework hooks:
acf/fields/relational/hide_unreadable_posts: Toggles front-end block filtering for unreadable post references.acf/user_can_read_post: Modifies capabilities for post readability checks inside ACF contexts.acf/fields/relational/unreadable_post_statuses: Adjusts which post statuses trigger restriction states.
Bidirectional Field Authorization
Bidirectional field relationships automatically sync updates between connected entities (e.g., updating a post reference automatically links the target post back). ACF 6.8.11 introduces permission checks during this save phase. The secondary target post, term, or user profile will only update if the active user possesses explicit rights to edit that target entity.
If the current user lacks permission to update the reciprocal entity, their local field change saves successfully, but the reciprocal link on the target entity is skipped. Unauthenticated (logged-out) submissions on front-end forms will fail bidirectional updates by default.
This verification is bypassed for programmatic updates executing through update_field(), WP-CLI commands, or WP-Cron tasks. For custom front-end implementations where untrusted or guest visitors must trigger bidirectional link creation, use the acf/bidirectional/can_update_target filter, or flag execution contexts as trusted using acf/is_trusted_save_context.
Password-Protected Post Field Redaction
ACF 6.8.11 aligns custom field access for password-protected posts with native WordPress post content behavior. Field values bound to password-protected posts are redacted across front-end shortcodes, block bindings, JSON-LD schema markers, and the REST API until the user submits the correct post password.
This restriction applies universally on the front end, even when the viewing user is logged in as an administrator. REST API endpoints handling Relationship or Post Object fields referencing password-protected entries will return post IDs rather than fully expanded post objects (mimicking the light payload response format of ?acf_format=light) unless the request contains valid authentication for an account authorized to edit the protected entry.
Sanitization of Field Settings and Wrapper Attributes
ACF 6.8.11 introduces strict sanitization rules for field settings, field groups, post types, taxonomies, and options pages saved by users who lack the unfiltered_html capability. On WordPress Multisite networks, this capability is reserved exclusively for Super Admins, meaning regular Site Administrators are subject to this sanitization.
Under these restrictions, HTML inputs in field settings are stripped of unsafe tags such as <script>, retaining only baseline allowed markup like <strong>. Furthermore, non-super-admin settings modifications to field wrappers are strictly limited to standard width, class, and id attributes.
Across all user roles—including field registrations executed via local JSON files or PHP templates—event handler attributes (such as onclick or onload) are stripped from field wrapper arrays. Developers requiring inline event handlers or specialized wrapper attributes must define them programmatically using the acf/field_wrapper_attributes filter.
This sanitization refactor also resolves a bug where special HTML entities, ampersands (&), or less-than symbols (<) within field settings could cause the field to revert to default configuration values upon saving.
Front-End Upload Restrictions and Custom Choices
The basic file uploader used in front-end forms has been hardened for untrusted users. Users lacking the upload_files capability (including logged-out guests, Subscribers, and Contributors) will no longer trigger automatic PDF preview image generation or cover art extraction from uploaded audio and video files.
To re-enable preview generation for basic uploaders on trusted forms, developers can return true via the acf/upload/generate_previews filter.
Additionally, while dynamic choice creation remains available for Checkbox, Radio, and Select fields configured with “Save Custom Values”, ACF 6.8.11 introduces a permission filter to restrict who can append new choices to field settings. Applying this restriction prevents public users from polluting field settings or injecting malformed choices:
add_filter( 'acf/fields/allow_append_choices', function () {
return current_user_can( 'edit_posts' );
} );
Additional Fixes Included in Version 6.8.11
Alongside major capability and validation refactors, ACF 6.8.11 introduces several isolated security patches and stability fixes:
- Uploader Nonce Scoping: Basic uploader security nonces are now tightly bound to the specific post ID being edited.
- AJAX Group Isolation: The AJAX endpoint responsible for loading field groups during post editing no longer leaks field groups mapped to unrelated contexts.
- Backslash Handling: Fixed an issue where submitting a custom choice in dynamic fields stripped backslashes from other stored field configuration settings.
All sites running ACF or ACF PRO should update to version 6.8.11 immediately, testing dynamic front-end forms and dynamic block bindings in staging environments prior to deployment.
Frequently asked questions
Why did custom fields injected via JavaScript stop saving after updating to ACF 6.8.11?
ACF 6.8.11 restricts saving to fields actively rendered on the form or matching the content's field group location rules. If JavaScript injects fields dynamically, ACF flags them as unexpected. You must allow these field keys explicitly using the acf/form/{context}/allowed_field_keys filter.
Why does my User field shortcode or block binding display a User ID instead of user details?
To prevent accidental disclosure of sensitive personal data like email addresses, ACF 6.8.11 limits User field output in shortcodes and block bindings strictly to the user ID. You can reformat the displayed text using the acf/format_value filter or restore the old output with the acf/bindings/allow_user_data filter.
How does ACF 6.8.11 handle password-protected post custom fields?
Field values belonging to password-protected posts are hidden from shortcodes, block bindings, JSON-LD, and the REST API until the valid post password has been submitted or the client authenticates as an authorized editor.
Why are fields failing to save on my custom registration form?
If your registration form uses a field group set to the location rule 'User Form is Add / Edit', ACF 6.8.11 will prevent those fields from saving on registration. Change the field group's location rule to 'User Form is Register' or 'All'.
Primary reference: Review the original announcement for exact release details. This article is an independent explanation and does not reproduce the source text.
