
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-25227 is an authenticated remote code execution (RCE) vulnerability in authentik, an open-source identity provider. Affecting versions from 2021.3.1 through before 2025.8.6, 2025.10.0 through before 2025.10.4, and 2025.12.0 through before 2025.12.4, the flaw allows users with delegated "Can view * Property Mapping" or "Can view Expression Policy" permissions to execute arbitrary code within the authentik server container via the policy/property mapping test endpoint. It was disclosed on February 12, 2026, and reported by researcher @rahulgovind. The CVSS v3.1 base score is 9.1 (Critical) per the GitHub Security Advisory, though NVD records 7.2 (High) (GitHub Advisory, Feedly).
The vulnerability is classified as CWE-94 (Improper Control of Generation of Code / Code Injection). The root cause lies in the wrap_expression method within authentik/lib/expression/evaluator.py, where context variable names (keys) were used unsanitized as Python function argument names in a dynamically constructed handler function. An attacker could craft a malicious context key — such as one containing Python import statements — that would be injected directly into the generated function signature, causing arbitrary code execution when the expression was evaluated. The fix applies slugify() in addition to the existing regex sanitization (sanitize_arg) to neutralize special characters in argument names before they are embedded in the generated code (GitHub Commit, GitHub Advisory).
Successful exploitation allows an authenticated attacker to execute arbitrary code within the authentik server container with full access to the authentik database and all environment variables, enabling privilege escalation and complete instance takeover. This can result in unauthorized modification of authentication configurations, exposure of credentials and secrets stored in environment variables, and disruption of authentication services for all applications relying on the identity provider. The scope of impact extends beyond the authentik container itself, as compromising the identity provider can facilitate lateral movement into any application or service that trusts authentik for authentication (GitHub Advisory).
No public proof-of-concept exploit code has been observed, and there is no evidence of in-the-wild exploitation at this time. Exploitation requires an authenticated user account with the delegated "Can view * Property Mapping" or "Can view Expression Policy" permissions, which limits the attack surface to users who have been granted these specific (but potentially over-provisioned) permissions. The EPSS score is approximately 0.033%, reflecting low current exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog (Feedly, GitHub Advisory).
GET /api/v3/propertymappings/all/ or GET /api/v3/policies/all/ to enumerate available mappings/policies and retrieve a valid UUID.POST /api/v3/propertymappings/all/<uuid>/test/ or POST /api/v3/policies/all/<uuid>/test/) with a context key containing an injected Python expression, such as: {"context": {"z=getattr(getattr(__import__(\"os\"), \"popen\")(\"id > /tmp/pwned\"), \"read\")()": "value"}}. The malicious key is embedded unsanitized into the generated Python function signature./api/v3/propertymappings/all/<uuid>/test/ or /api/v3/policies/all/<uuid>/test/ from accounts that do not normally use these endpoints; unusual outbound connections from the authentik server container to external IPs.os.popen, subprocess, __import__) within expression evaluation context./tmp/ artifacts from command execution); new or modified configuration files within the container.sh, bash, curl, wget); unexpected network connections initiated by the authentik worker process.Upgrade to authentik versions 2025.8.6, 2025.10.4, or 2025.12.4 depending on your current release branch — these versions apply proper sanitization using slugify() to context variable names before code generation. If an immediate upgrade is not possible, remove the "Can view * Property Mapping" and "Can view Expression Policy" delegated permissions from any user that does not require full administrative access, treating these permissions as equivalent to their edit counterparts. As an additional network-level workaround, block POST requests to the test endpoints: POST /api/v3/propertymappings/all/<uuid>/test/ and POST /api/v3/policies/all/<uuid>/test/ (GitHub Advisory, Release 2025.8.6, Release 2025.10.4, Release 2025.12.4).
The vulnerability was discussed on Reddit's r/selfhosted community, where self-hosters noted the importance of updating to the patched releases (Reddit). Security-focused Mastodon and Bluesky accounts, including @offseq and The Hacker Wire, highlighted the RCE nature of the flaw shortly after disclosure (Infosec.exchange, Bluesky). The vulnerability was also covered by The Hacker Wire as a notable RCE via the property mapping test endpoint (The Hacker Wire).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."