Description
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.
Published: 2026-08-05
Score: 6.2 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The updated description corroborates that the user‑augmentation resolver unconditionally exposes the raw two‑factor recovery codes. This flaw, categorized as CWE‑200 (Information Exposure), reveals the raw recovery codes whenever the variable is rendered in an Antlers template. An attacker who can view or capture the generated HTML can obtain these codes and bypass two‑factor authentication for the victim.

Affected Systems

The vulnerability exists in the Statamic Content Management System. No specific version range is listed; any release that still contains the AugmentedUser::get implementation is potentially impacted until the fix is applied. Users should verify whether their installation includes the recent security patch that removes the exposed two_factor_recovery_codes handle.

Risk and Exploitability

The CVSS score of 6.2 denotes medium severity, and the vulnerability is not listed in the CISA KEV catalog. The EPSS score of 0.00229 indicates a very low but non‑zero probability of exploitation. Exploitation requires that a template has dynamic Antlers rendering enabled for a field that flows through the current_user object, a privilege normally limited to administrators or blueprint designers. If an attacker can embed the {{current_user.two_factor_recovery_codes}} tag in a page that a target user will view, the two‑factor recovery codes will be exposed in the HTML response, enabling a simple 2FA bypass.

Generated by OpenCVE AI on August 10, 2026 at 20:55 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to the latest Statamic CMS release that includes the fix for the two_factor_recovery_codes exposure.
  • Remove or comment out any instances of {{current_user.two_factor_recovery_codes}} in Antlers templates and disable dynamic rendering for fields that could expose this data.
  • Restrict dynamic rendering capability to administrators by reviewing blueprint configurations or add two_factor_recovery_codes to the guardedVariablePatterns list in the ViewServiceProvider so that the variable is automatically blocked in template output.

Generated by OpenCVE AI on August 10, 2026 at 20:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 10 Aug 2026 12:00:00 +0000

Type Values Removed Values Added
Description Statamic CMS's user-augmentation resolver, AugmentedUser::get() in src/Auth/AugmentedUser.php, contains an explicit case for the `two_factor_recovery_codes` handle that returns the user's raw two-factor recovery codes with no access restriction: `if ($handle === 'two_factor_recovery_codes') { return new Value($this->data->get('two_factor_recovery_codes'), ...); }`. Unlike sensitive fields such as password/password_hash, which are excluded from AugmentedUser entirely, two_factor_recovery_codes 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 `{{ current_user.two_factor_recovery_codes }}{{ value }}|{{ /current_user.two_factor_recovery_codes }}` 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. 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.
Title Statamic CMS - Unguarded Exposure of 2FA Recovery Codes via Antlers current_user Variable Statamic CMS Unguarded Exposure of 2FA Recovery Codes via Antlers current_user Variable

Mon, 10 Aug 2026 11:45:00 +0000

Type Values Removed Values Added
Title Statamic CMS Unguarded Exposure of 2FA Recovery Codes via Antlers current_user Variable Statamic CMS - Unguarded Exposure of 2FA Recovery Codes via Antlers current_user Variable

Wed, 05 Aug 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 05 Aug 2026 15:15:00 +0000

Type Values Removed Values Added
First Time appeared Statamic
Statamic cms
Vendors & Products Statamic
Statamic cms

Wed, 05 Aug 2026 13:15:00 +0000

Type Values Removed Values Added
Description Statamic CMS's user-augmentation resolver, AugmentedUser::get() in src/Auth/AugmentedUser.php, contains an explicit case for the `two_factor_recovery_codes` handle that returns the user's raw two-factor recovery codes with no access restriction: `if ($handle === 'two_factor_recovery_codes') { return new Value($this->data->get('two_factor_recovery_codes'), ...); }`. Unlike sensitive fields such as password/password_hash, which are excluded from AugmentedUser entirely, two_factor_recovery_codes 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 `{{ current_user.two_factor_recovery_codes }}{{ value }}|{{ /current_user.two_factor_recovery_codes }}` 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.
Title Statamic CMS Unguarded Exposure of 2FA Recovery Codes via Antlers current_user Variable
Weaknesses CWE-200
References
Metrics cvssV3_1

{'score': 6.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:N/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: TuranSec

Published:

Updated: 2026-08-10T11:47:28.203Z

Reserved: 2026-08-05T12:37:57.358Z

Link: CVE-2026-71293

cve-icon Vulnrichment

Updated: 2026-08-05T15:36:02.649Z

cve-icon NVD

Status : Received

Published: 2026-08-05T13:24:54.060

Modified: 2026-08-10T12:17:31.987

Link: CVE-2026-71293

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-10T21:00:04Z

Weaknesses
  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor