CVE-2026-71293: Statamic CMS exposes two-factor recovery codes through dynamic Antlers rendering
Statamic CMS exposes two-factor recovery codes through dynamic Antlers rendering
Other sources
Statamic CMS's user-augmentation resolver, AugmentedUser::get in src/Auth/AugmentedUser.php, contains an explicit case for the handle that returns the user's raw two-factor recovery codes with no access restriction.
— MITRE
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.
— GitHub
Affected Software
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.