Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-64716

CVE-2025-64716: Anubis Web AI Firewall XSS Vulnerability

CVE-2025-64716 is an XSS vulnerability in Anubis Web AI Firewall affecting subrequest authentication with unvalidated redirect URLs. This post covers technical details, affected versions, impact, and mitigation.

Published:

CVE-2025-64716 Overview

CVE-2025-64716 is an open redirect vulnerability in Anubis, a Web AI Firewall utility that challenges user connections to protect upstream resources from scraper bots. Versions prior to 1.23.0 fail to validate the redirect URL scheme when subrequest authentication is enabled. The vulnerability is classified as [CWE-79] (Improper Neutralization of Input During Web Page Generation) and allows attackers to redirect users to arbitrary URL schemes. While modern browsers block javascript: redirects, other schemes may still trigger dangerous client-side behavior. Any deployment using subrequest authentication is affected. Version 1.23.0 contains the fix.

Critical Impact

Attackers can craft requests that redirect authenticated users to arbitrary URL schemes, potentially enabling client-side script execution or phishing scenarios in deployments using Anubis subrequest authentication.

Affected Products

  • Anubis Web AI Firewall versions prior to 1.23.0
  • Deployments configured with subrequest authentication mode
  • Go package github.com/TecharoHQ/anubis (see GO-2025-4086)

Discovery Timeline

  • 2025-11-13 - CVE-2025-64716 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-64716

Vulnerability Analysis

Anubis operates as a reverse-proxy challenge layer that validates human users before forwarding traffic to protected upstream applications. When configured in subrequest authentication mode, Anubis reads forwarded request headers (X-Forwarded-Proto, X-Forwarded-Host, X-Forwarded-Uri) to reconstruct the original destination URL used in redirect responses. The vulnerability stems from missing validation of the X-Forwarded-Proto header. Attackers who can influence these headers, or who craft links pointing to the Anubis endpoint, can force redirects to non-HTTP URL schemes. The Exploit Prediction Scoring System (EPSS) rates this issue at 0.528% probability.

Root Cause

The redirect construction logic in lib/http.go accepted any non-empty value for the protocol header. The function checked that proto, host, and uri were present but did not restrict proto to http or https. This allowed values such as javascript, data, or other schemes to be reflected into the Location header of the response.

Attack Vector

Exploitation requires user interaction and the ability to influence forwarded headers or send a victim to a crafted URL served through the Anubis subrequest flow. An attacker constructs a request that causes Anubis to build a redirect URL with an attacker-controlled scheme. The victim's browser then follows the redirect, and depending on the scheme and browser policy, this may execute script content, launch external handlers, or facilitate phishing.

go
// Patch: lib/http.go — restrict X-Forwarded-Proto to http/https
 if proto == "" || host == "" || uri == "" {
 	return "", errors.New(localizer.T("missing_required_forwarded_headers"))
 }
+
+	switch proto {
+	case "http", "https":
+		// allowed
+	default:
+		lg := internal.GetRequestLogger(s.logger, r)
+		lg.Warn("invalid protocol in X-Forwarded-Proto", "proto", proto)
+		return "", errors.New(localizer.T("invalid_redirect"))
+	}
+
 	// Check if host is allowed in RedirectDomains (supports '*' via glob)
 	if len(s.opts.RedirectDomains) > 0 && !matchRedirectDomain(s.opts.RedirectDomains, host) {
 		lg := internal.GetRequestLogger(s.logger, r)

Source: GitHub Commit 7ed1753

Detection Methods for CVE-2025-64716

Indicators of Compromise

  • HTTP Location response headers issued by Anubis containing schemes other than http:// or https://
  • Inbound requests carrying non-standard X-Forwarded-Proto values such as javascript, data, or file
  • Anubis warning log entries referencing invalid protocol in X-Forwarded-Proto after upgrading

Detection Strategies

  • Inspect reverse-proxy and Anubis access logs for X-Forwarded-Proto header values outside the expected http/https set.
  • Monitor Anubis responses for 3xx status codes with anomalous Location header schemes.
  • Correlate outbound redirect events with user-agent activity to identify suspicious redirect chains originating from Anubis endpoints.

Monitoring Recommendations

  • Deploy web-server or WAF rules that reject requests with malformed X-Forwarded-Proto values before they reach Anubis.
  • Alert on any Anubis process log entry containing invalid_redirect after upgrading, as these indicate active probing.
  • Track the version of Anubis running across environments and flag any instance below 1.23.0.

How to Mitigate CVE-2025-64716

Immediate Actions Required

  • Upgrade Anubis to version 1.23.0 or later where the scheme allow-list is enforced.
  • Audit reverse-proxy configurations to ensure X-Forwarded-Proto cannot be overridden by untrusted clients.
  • Configure the RedirectDomains option in Anubis to constrain valid redirect targets.

Patch Information

The fix is available in Anubis 1.23.0. Commit 7ed1753 adds a switch statement restricting X-Forwarded-Proto to http or https. See the GitHub Security Advisory GHSA-cf57-c578-7jvv and Go vulnerability database entry GO-2025-4086 for advisory details.

Workarounds

  • If upgrading is not immediately possible, configure the upstream reverse proxy to strip or overwrite X-Forwarded-Proto with a trusted value.
  • Disable subrequest authentication mode until the patched version is deployed.
  • Restrict RedirectDomains to a minimal allow-list of trusted hosts to limit redirect scope.
bash
# Example nginx snippet to enforce trusted X-Forwarded-Proto before Anubis
location / {
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-Host  $host;
    proxy_set_header X-Forwarded-Uri   $request_uri;
    proxy_pass http://anubis_upstream;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.