Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-66057 Overview
CVE-2026-66057 is an open redirect vulnerability [CWE-601] in the Frappe full-stack web application framework. The OAuth login flow uses an unsanitized, client-controlled state parameter to select the post-authentication navigation target. Attackers can craft a malicious state value that redirects authenticated users to an attacker-controlled destination. The flaw affects Frappe versions prior to 15.116.0 and 16.29.0.
Critical Impact
A crafted OAuth state parameter enables attacker-controlled post-login redirection, enabling phishing, credential theft, and session abuse scenarios against Frappe users.
Affected Products
- Frappe Framework versions prior to 15.116.0
- Frappe Framework versions prior to 16.29.0
- Applications built on vulnerable Frappe releases using OAuth login
Discovery Timeline
- 2026-10-13 - CVE-2026-66057 published to NVD
- 2026-10-14 - Last updated in NVD database
Technical Details for CVE-2026-66057
Vulnerability Analysis
Frappe implements OAuth-based login flows that accept a state parameter from the client. In vulnerable releases, the framework uses this parameter to determine where the user is navigated after successful authentication. Because the value is not sanitized or validated against an allowlist of trusted destinations, an attacker can supply an external URL. The resulting redirect occurs after a legitimate authentication, lending the attacker-chosen destination the appearance of trust. The fix stores the OAuth redirect_to value server-side rather than deriving navigation from the client-controlled state parameter.
Root Cause
The root cause is improper validation of a user-controlled redirect target, classified as URL Redirection to Untrusted Site [CWE-601]. The OAuth state parameter is intended to prevent cross-site request forgery, not to carry navigation data. Reusing it to select post-login destinations without validation allowed arbitrary host values to flow into the redirect decision.
Attack Vector
Exploitation requires an attacker to craft an OAuth login URL for a Frappe-based site that embeds a malicious state parameter. The attacker then delivers that link to a target user through phishing, chat, or similar channels. When the victim completes authentication, the Frappe server redirects the browser to the attacker-chosen location. User interaction is required, and attacks typically pair the redirect with credential-harvesting or token-exfiltration pages.
# Patch excerpt - frappe/utils/oauth.py
# fix(oauth): store OAuth redirect_to server-side instead
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
-import base64
import json
from collections.abc import Callable
from typing import TYPE_CHECKING
Source: GitHub Commit 1e0a3b9
Detect Identity Attacks the Moment Authentication Fails
Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.
Stop Identity AttacksDetection Methods for CVE-2026-66057
Indicators of Compromise
- OAuth authorization requests containing a state parameter that decodes to an external URL or host.
- HTTP 302 responses from Frappe OAuth endpoints redirecting to domains outside the organization's trusted list.
- Spikes in referrer traffic from Frappe login endpoints to unfamiliar external hosts.
Detection Strategies
- Inspect web server and reverse-proxy logs for OAuth callback requests with unusually long or encoded state values.
- Correlate authentication events with subsequent outbound redirects, flagging destinations outside approved domains.
- Deploy phishing identification signatures that look for Frappe-branded landing pages hosted on unrelated infrastructure.
Monitoring Recommendations
- Enable centralized logging for all Frappe OAuth routes, including request parameters and response Location headers.
- Alert when post-authentication redirects target domains not present in a maintained allowlist.
- Monitor user reports of unexpected redirects after signing in and route them to the security team for triage.
How to Mitigate CVE-2026-66057
Immediate Actions Required
- Upgrade Frappe to version 15.116.0 or 16.29.0 or later as soon as feasible.
- Audit any custom OAuth integrations that read the state parameter for navigation decisions.
- Rotate OAuth client secrets if logs indicate suspicious redirect activity during the exposure window.
Patch Information
Frappe fixed CVE-2026-66057 in versions 15.116.0 and 16.29.0. The fix changes the OAuth flow to store the redirect_to value server-side instead of trusting the client-controlled state parameter. Review the GitHub Security Advisory GHSA-78c5-55xg-jm7m, the merged Pull Request #40962, and release notes for v15.116.0 and v16.29.0.
Workarounds
- Enforce a reverse-proxy rule that validates the Location header on OAuth callback responses against an allowlist of internal hosts.
- Disable OAuth login methods temporarily until the patched version is deployed if upgrade is not immediately possible.
- Educate users to verify the destination domain after signing in and to report unexpected redirects.
# Upgrade Frappe to a patched version using bench
bench switch-to-branch version-15 frappe --upgrade
bench update --patch
# Verify installed version is 15.116.0 or 16.29.0 or later
bench version | grep frappe
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

