CVE-2026-71293: Statamic CMS Unguarded Exposure of 2FA Recovery Codes via Antlers current_user Variable
Statamic CMS's user-augmentation resolver, AugmentedUser::get() in src/Auth/AugmentedUser.php, contains an explicit case for the twofactorrecoverycodes handle that returns the user's raw two-factor recovery codes with no access restriction: if ($handle === 'twofactorrecoverycodes') { return new Value($this->data->get('twofactorrecoverycodes'), ...); }. Unlike sensitive fields such as password/passwordhash, which are excluded from AugmentedUser entirely, twofactorrecoverycodes is neither excluded from augmentation nor present in Statamic's Antlers variable guard lists (guardedVariablePatterns/guardedContentVariablePatterns in src/Providers/ViewServiceProvider.php, and the runtime GlobalRuntimeState guard paths), which by default only guard config.app.key. On any Antlers template field where raw/dynamic template rendering is enabled for a given field (an admin/developer-configured, blueprint-level field option), a template such as {{ currentuser.twofactorrecoverycodes }}{{ value }}|{{ /currentuser.twofactorrecoverycodes }} renders the viewing user's own 2FA recovery codes directly into the HTML response, allowing an attacker who can view or capture that response (e.g. via a shared/observable page, or a crafted link causing a victim to render it) to obtain the codes and bypass 2FA. Exploitation requires that dynamic Antlers rendering already be enabled on a field the target user's data flows through, which is a blueprint-configuration privilege rather than a standard content-editing permission.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
On any Antlers template field where raw/dynamic template rendering is enabled (blueprint-level field option), disable it so that expressions like `{{ current_user.two_factor_recovery_codes }}...` cannot render 2FA recovery codes into HTML responses.
Statamic Antlers (template field/blueprint dynamic rendering) raw/dynamic template rendering (dynamic Antlers rendering enabled on a blueprint-level field) = disable (turn off raw/dynamic rendering for the affected Antlers template fields) - Compensating control
Prevent or reduce exposure of pages/responses that would render Antlers output containing `current_user.two_factor_recovery_codes` (e.g., ensure only authorized users can access shared/observable pages that could cause a victim to render that content).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-71293?
The severity of CVE-2026-71293 is medium with a score of 6.2.
What potential impacts does CVE-2026-71293 have?
CVE-2026-71293 affects the Statamic CMS and could expose users' recovery codes when accessed improperly.
How can I fix CVE-2026-71293?
To fix CVE-2026-71293, ensure that access restrictions are properly implemented for the two_factor_recovery_codes handle in your Statamic CMS.
Who is affected by CVE-2026-71293?
All users of Statamic CMS are potentially affected by CVE-2026-71293 if the vulnerability is not patched.
What is the description of CVE-2026-71293?
CVE-2026-71293 describes an unguarded exposure of two-factor recovery codes due to improper access control in Statamic CMS.