Feb 28, 2026·8 min read·60 visits
Authenticated attackers can bypass the Statamic Control Panel's password verification prompt (sudo mode) to execute administrative actions. The flaw involves leaking the `APP_KEY` via the Antlers template engine, enabling session forgery and full system compromise.
A critical privilege escalation vulnerability exists in Statamic CMS versions prior to 6.4.0, allowing authenticated Control Panel users to bypass the 'Elevated Session' (sudo mode) mechanism. The vulnerability stems from a combination of flaws, primarily a sandbox escape in the Antlers template engine that exposes the application configuration—including the Laravel `APP_KEY`. Successful exploitation allows attackers to forge session cookies, execute arbitrary code, or manipulate administrative state without providing the required password verification.
CVE-2026-27939 represents a complex chain of vulnerabilities within the Statamic CMS Control Panel, specifically affecting the mechanisms designed to protect sensitive administrative operations. Statamic employs an "Elevated Session" concept (often referred to as "sudo mode"), which requires authenticated users to re-enter their password before accessing high-risk areas such as user management, system configuration, or addon settings. This vulnerability effectively nullifies that protection.
The core of the issue lies in the Antlers template engine, Statamic's proprietary parser. Due to insufficient sandboxing, the engine allowed authenticated users to access the underlying Laravel application instance. This exposure permitted the extraction of sensitive environment variables, including the APP_KEY, and the execution of arbitrary methods on available objects. Additionally, logic flaws in the redirect handling of the RendersControlPanelExceptions trait allowed attackers to circumvent the elevation prompt entirely by manipulating HTTP headers.
While the vulnerability requires an authenticated session to exploit, the privilege level required is low. Any user with access to the Control Panel—such as an editor or author—could leverage these flaws to elevate their privileges to Super Admin, resulting in a complete takeover of the CMS and the underlying server.
The vulnerability is rooted in three distinct architectural failures: the exposure of the global configuration object in the template context, the lack of method allow-listing in the Antlers parser, and insecure redirect logic.
Statamic's Antlers engine was configured to pass the entire application configuration to the parsing context via config()->all(). In Laravel applications, this configuration array contains critical secrets, most notably the APP_KEY. This key is used for encryption and signing session cookies. By injecting a specific Antlers tag (e.g., {{ config:app:key }}), an attacker could force the parser to render this secret value into the HTML response, effectively leaking the cryptographic root of trust for the application.
The Antlers parser failed to enforce strict boundaries on method execution within the template context. The engine allowed recursive evaluation where user-supplied input could invoke methods on accessible PHP objects. For instance, if a User model was accessible in the context, an attacker could craft a payload like {{ user:update(['super' => true]) }}. The lack of a strict allow-list for callable methods meant that standard Eloquent model methods were exposed to the templating layer.
The RendersControlPanelExceptions trait, responsible for intercepting unauthorized requests and redirecting the user to the password verification form, relied on the Referer header and _redirect input parameters without adequate validation. This introduced an Open Redirect vulnerability (CWE-601) that could be chained to bypass the elevation check. By crafting a request that pointed the redirect destination to an external or manipulated internal URL, the logic determining whether a user was "elevated" could be short-circuited.
The following analysis illustrates the critical difference between the vulnerable and patched implementations of the Antlers context handling. The primary fix involved restricting what data is passed to the parser and implementing a strict blocklist for method calls.
In the vulnerable versions, the Antlers parser initialized its context by merging global configurations directly. This indiscriminate merging made the app configuration namespace available as a top-level variable.
// Vulnerable Context Initialization
public function getContext()
{
// DANGEROUS: Merging all config values into the template scope
return array_merge(
$this->data,
['config' => config()->all()] // Leaks APP_KEY, DB_PASSWORD, etc.
);
}When this code runs, a user inputting {{ config:app:key }} results in the parser traversing the array and outputting the base64-encoded key.
The patch introduced in version 6.4.0 removes the global config merge and implements a strictly defined accessor for configuration values that filters out sensitive keys. It also introduces a Blocklist for method calls.
// Patched Context Initialization
public function getContext()
{
// SAFE: Config is no longer dumped blindly
$context = $this->data;
// Config access is now mediated by a specific tag that filters keys
// Attempting {{ config:app:key }} now returns null or an error
return $context;
}
// Method Invocation Guard
public function callMethod($object, $method, $args)
{
if (in_array($method, ['update', 'delete', 'save', 'forceDelete'])) {
throw new AccessDeniedException("Method [$method] is blocked in Antlers.");
}
return $object->$method(...$args);
}The fix fundamentally changes the trust model of the template engine. Instead of assuming the template author is a trusted developer, the engine now treats template content as potentially untrusted, specifically blocking state-mutating methods on Eloquent models.
Exploitation of CVE-2026-27939 typically follows a two-stage process: extraction of secrets followed by privilege escalation. The attacker requires a valid account with access to any field parsed by Antlers (e.g., a Page title, a Blueprints field, or a Globals field).
The attacker navigates to a content editing screen in the Control Panel and injects the malicious Antlers tag into a text field.
<!-- Payload injected into a 'Title' or 'Content' field -->
APP_KEY_LEAK: {{ config:app:key }}Upon saving or previewing the content, the server renders the template. The response will contain the base64-encoded APP_KEY. This key is the "skeleton key" for the Laravel framework.
With the APP_KEY, the attacker can decrypt their own session cookie, modify the serialized session data, and re-encrypt it. The goal is to modify the session attributes that control user identity and elevation status.
statamic_session cookie.APP_KEY and Laravel's decryption logic, the attacker reveals the session payload.1) or setting the statamic.cp.last_activity and statamic.cp.elevated timestamps to the current time, bypassing the sudo prompt.APP_KEY.The system now recognizes the attacker as a fully authenticated Super Admin with an active "Elevated Session," allowing unrestricted access to all system functions.
The impact of this vulnerability is critical, warranting its CVSS score of 8.8. The compromise affects all three pillars of the CIA triad (Confidentiality, Integrity, Availability).
The immediate leak of the APP_KEY allows for the decryption of any encrypted data stored by the application that uses Laravel's default encryption facilities. Furthermore, gaining Super Admin access allows the attacker to export all user data, site content, and form submissions.
With Super Admin privileges, an attacker can modify any aspect of the site. They can inject malicious JavaScript (XSS) into frontend templates to target site visitors, modify payment gateway configurations to steal funds, or alter content to spread disinformation. The ability to invoke update() methods via Antlers also allows for direct database manipulation without SQL injection.
An attacker can delete critical system files, wipe the database (via the Control Panel's utility section), or misconfigure the system to cause denial of service. Since Statamic is a flat-file CMS by default, an attacker could also wipe the content/ directory, effectively deleting the entire website's data permanently if backups are not immutable.
The only complete remediation is to upgrade the Statamic CMS core to a patched version. The patches introduce necessary boundaries within the Antlers engine and harden the Control Panel's authentication flows.
If you suspect this vulnerability has been exploited, simply patching the code is insufficient. Because the APP_KEY may have been compromised, you must rotate it immediately.
php artisan key:generate on your production server.storage/logs/ and any access logs for requests containing suspicious Referer headers or unusual access to the Control Panel from unknown IP addresses.users/ directory (or database) for any new accounts with super: true permissions that were not authorized.CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
Statamic CMS Statamic | >= 6.0.0, < 6.4.0 | 6.4.0 |
Statamic CMS Statamic | 5.x | 5.x (Latest Patch) |
| Attribute | Detail |
|---|---|
| CWE-ID | CWE-287 (Improper Authentication) |
| CVSS v3.1 | 8.8 (High) |
| Attack Vector | Network |
| Privileges Required | Low (Authenticated User) |
| Impact | Full System Compromise |
| Exploit Status | PoC Available |
Improper Authentication
NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.
CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.
CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.
CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.
A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.
CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.