Jul 8, 2026·5 min read·14 visits
An authenticated attacker can bypass session freshness gates by submitting their own WebAuthn cryptographic signature inside a victim's stale session, gaining unauthorized access to administrative or sensitive functions.
An authentication freshness bypass vulnerability exists in the WebAuthn re-authentication path of Flask-Security-Too versions 5.8.0 and 5.8.1. The flaw allows an authenticated attacker to elevate the freshness status of a victim session using their own WebAuthn credential, bypassing re-authentication constraints.
The security package Flask-Security-Too implements WebAuthn support to facilitate passwordless and multi-factor authentication. To secure highly sensitive operations, the library utilizes session freshness validation via the @auth_required(within=...) decorator. When a user attempts to access a protected resource, the server checks if the session was authenticated within a specified time window.
If the session is stale, the application enforces re-authentication before the request can proceed. Users can satisfy this requirement using their registered WebAuthn credentials. The vulnerability resides in this re-authentication workflow and permits an attacker to falsify the freshness status of a session.
The attack surface requires the attacker to be an authenticated user on the same application instance. This vulnerability is classified under CWE-305, allowing an attacker to utilize WebAuthn as an alternate channel to bypass re-authentication requirements.
The flaw is located in the webauthn_verify_response view within flask_security/webauthn.py. When a re-authentication flow is initiated, the application issues a challenge and expects a cryptographic WebAuthn assertion in response. This response is validated using the WebAuthnSigninResponseForm.
During validation, the form parses the credential identifier from the client's assertion and retrieves the associated database user. However, the backend validation logic fails to check whether this retrieved user matches the active current_user of the session. The signature validation is processed successfully as long as the credential belongs to any valid user in the database.
Because of this validation oversight, once the signature is verified, the server executes session["fs_paa"] = time.time(). This line unconditionally updates the security freshness timestamp on the active session. Consequently, the victim's session is designated as fresh based on the cryptographic proof of the attacker's WebAuthn key.
The vulnerable code segment demonstrates the absence of identity binding verification. In flask_security/webauthn.py at commit 5c44c76e33a20b67d02115e26d2da4bab18c094e, the application processes the signature validation as follows:
@auth_required(lambda: cv("API_ENABLED_METHODS"))
def webauthn_verify_response(token: str) -> ResponseValue:
form = t.cast(
WebAuthnSigninResponseForm, build_form_from_request("wan_signin_response_form")
)
# ... verification steps ...
if form.validate_on_submit():
# Code updates last use data
form.cred.lastuse_datetime = _security.datetime_factory()
_datastore.put(form.cred)
# Unconditional update of session freshness
session["fs_paa"] = time.time()The WebAuthnSigninResponseForm.validate method resolves the user object strictly from the credential ID query. It executes self.user = _datastore.find_user_from_webauthn(self.cred). It never compares this self.user instance against the active session user, allowing cross-user re-authentication assertions to succeed.
This behavior contrasts with the patched OAuth flow implemented in a previous release. The OAuth re-authentication path explicitly checks if user and user.email == current_user.email before updating the session freshness parameter. The lack of an equivalent check on the WebAuthn code path leaves the freshness mechanism exposed.
An exploitation sequence requires the attacker to possess an active account on the deployment and a registered WebAuthn credential. The attacker must also have access to the victim's session, which has entered a stale freshness state. This scenario often occurs in shared workstation environments or when session tokens are partially exfiltrated.
The attacker initiates the re-authentication sequence within the victim's session by making a request to the /wan-verify endpoint. The server responds with a WebAuthn challenge wrapped in a temporary state token. Because these state tokens lack user binding, they are highly portable.
Instead of utilizing the victim's credentials, the attacker signs this challenge using their own WebAuthn key. The attacker then submits the assertion back to the endpoint. The backend validates the assertion against the attacker's public key, marks the form as valid, and advances the session freshness timer on the victim's active session.
The impact of this security freshness bypass is significant, as it completely subverts the isolation between authentication strengths. Freshness gates are critical defense-in-depth mechanisms designed to protect highly sensitive operations from unauthorized modification. These operations include password resets, multi-factor authentication enrollment, and email modifications.
By leveraging this bypass, an attacker can modify the security parameters of the victim's account. This allows the attacker to register a permanent authenticating credential under their control or change the primary email address. This results in complete and persistent account takeover.
The vulnerability does not allow direct initial access but acts as a privilege escalation and security bypass tool. It elevates a standard, stale session to a fresh administrative-grade session. No user interaction from the victim is required once the session is active.
Remediation requires upgrading the flask-security-too package to version 5.8.2 or later. This patch introduces a verification step to ensure the WebAuthn assertion belongs to the active session owner. The security check compares the user object retrieved from the credential with the session's active user identity.
If upgrading immediately is not feasible, deployers should disable WebAuthn re-authentication. This can be accomplished by removing WebAuthn from the allowed verification options in the configuration. Adjust the SECURITY_WAN_ALLOW_AS_VERIFY parameter to exclude WebAuthn verification.
In addition, implementing robust monitoring of the /wan-verify endpoint can help identify anomalous behavior. Security teams should monitor for instances where the authenticated session user differs from the user owner of the WebAuthn credential utilized during re-authentication.
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N| Product | Affected Versions | Fixed Version |
|---|---|---|
flask-security-too pallets-eco | >= 5.8.0, <= 5.8.1 | 5.8.2 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-305 |
| Attack Vector | Network |
| CVSS Score | 5.3 (Medium) |
| Exploit Status | Proof-of-Concept Available |
| Impact | Re-authentication Freshness Bypass |
| KEV Status | Not Listed |
The application processes a WebAuthn signature without validating that the authenticated identity matches the current session user.
CVE-2026-61539 is a critical remote code execution vulnerability in Xinference, an inference API framework for open-source LLMs. In version 2.5.0 and earlier, model-generated outputs representing Llama3 tool calls are passed directly to Python's built-in eval() function inside the parser components. By manipulating conversational input or injecting instructions, an attacker can influence the LLM to output a Python expression containing malicious system commands, resulting in unauthenticated remote code execution on the host. This vulnerability has been resolved in Xinference version 2.7.0.
An uncontrolled resource consumption vulnerability (CWE-400/CWE-789) exists within the kin-openapi Go library prior to version 0.142.0. The vulnerability occurs during the processing of highly sparse array indexes inside query parameters defined in deepObject style. An unauthenticated remote attacker can exploit this flaw to cause an immediate Out-of-Memory (OOM) crash of the target application.
A critical prototype pollution and sandbox escape vulnerability was discovered in the JSONata query and transformation library before versions 1.8.8 and 2.2.0. By providing a malicious JSONata expression that bypasses ownership checks on object properties, remote attackers can execute arbitrary code in the context of the host Node.js application.
CVE-2026-63135 is a critical stored Cross-Site Scripting (XSS) vulnerability affecting YOURLS (Your Own URL Shortener) versions 1.5.1 up to (but not including) 1.10.4. Unauthenticated remote attackers can inject malicious JavaScript arrays by crafting an HTTP Referer header sent to a short URL redirect. This value is saved in the database logs and executed without context-aware escaping when an administrative user views the corresponding statistics visualization page.
CVE-2026-68508 is a high-severity arbitrary code execution vulnerability in facebookresearch/hydra (hydra-core) prior to version 1.3.4. The vulnerability exists within the dynamic instantiation system hydra.utils.instantiate(), which resolves and executes arbitrary Python callables from configuration files. An attacker capable of submitting untrusted configurations can achieve arbitrary code execution in the context of the consuming process.
A critical sandbox escape vulnerability in JSONata versions prior to 1.8.8 and 2.2.1 allows unauthenticated remote attackers to execute arbitrary code on the host machine. By submitting crafted JSONata expressions, an attacker can manipulate internal AST structures, bypass object clone helpers, spoof native function flags, and escape the evaluation environment to execute system commands through the Node.js runtime.