/

CVE-2026-55237

Severity:

HIGH RISK

(8.8)

DOM-based XSS (CWE-87) in AutoGPT signup redirect

CVE-2026-55237

Deferred

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-87, CWE-601

Impact:

Arbitrary JavaScript Execution / Session Compromise

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A DOM-based Cross-Site Scripting vulnerability in AutoGPT's signup flow allows untrusted URL parameters to influence client-side navigation and script execution.

When a victim follows a crafted link while authenticated, the next parameter can trigger a client-side redirect that executes attacker-controlled JavaScript in their browser.

Affected context

This vulnerability appears in the web-based signup flow of AutoGPT, where a next URL parameter is used to determine post-signup navigation.

The issue arises when the application passes the unvalidated next parameter directly into router.push or related client-side routing logic.

Risk is highest when authenticated users follow externally supplied links containing a crafted next value, especially in environments where the application has access to sensitive data or internal endpoints.

Exploit preconditions

  • Attack surface: Web browser, via AutoGPT's public signup page.
  • Required access: Ability to persuade an authenticated user (or a user who will become authenticated) to click a crafted URL containing a malicious next parameter.
  • Trigger point: Loading the signup page with the attacker-controlled next parameter, which is processed by client-side JavaScript and passed to router.push.
  • Why exploitation is possible: The client-side code implicitly trusts the next parameter, allowing it to influence navigation and DOM context without robust validation, enabling DOM-based XSS or open redirect behavior that can be chained to script execution.

Why this happens

The core issue is trusting unvalidated, attacker-controlled URL parameters inside client-side routing logic.

By feeding the next parameter directly into router.push, the code allows untrusted data to control navigation and potentially inject behavior into the DOM or script context.

This corresponds to CWE-87: Improper Neutralization of Alternate XSS Syntax and is closely related to CWE-601: Open Redirect, where navigation targets are derived from untrusted input.

The abstract pattern is: client-side scripts consuming URL parameters without validation or normalization, and using them in security-sensitive operations such as redirects or DOM updates.

Potential impact

  • Attacker-controlled JavaScript execution in the victim's browser.
  • Theft of session tokens, API keys stored in browser storage, or other sensitive data accessible to the web application.
  • Unauthorized actions performed on behalf of the victim, such as modifying workflows, configurations, or agent behavior.
  • Use of the victim's browser as a pivot point to reach internal network resources accessible only from their environment.
  • Phishing or UI redress attacks that present deceptive content within the trusted application origin.

General mitigation guidance

Effective mitigation focuses on minimizing trust in URL-derived data and constraining client-side navigation behavior.

Recommended defensive patterns include:

  • Treat all URL parameters, including next or redirect values, as untrusted and validate them against a strict allowlist of known-safe paths.
  • Normalize and sanitize navigation targets before passing them into router.push or similar routing APIs, ensuring they cannot escape the application's origin or inject script-like payloads.
  • Prefer framework-level routing helpers that enforce same-origin and path-only redirects, avoiding direct use of untrusted strings in navigation calls.
  • Apply a robust Content Security Policy (CSP) to reduce the impact of any remaining XSS bugs (e.g., disallow unsafe-inline, restrict script sources).
  • Design flows so that redirect targets are stored on the server side (e.g., in a short-lived token) rather than taken directly from query parameters.

How teams detect issues like this

Detection can rely on a mix of automated analysis and focused code review:

  • Static application security testing (SAST) rules that flag uses of router.push, window.location, or similar APIs when their arguments originate from location.search, location.hash, URLSearchParams, or other user-controlled inputs.
  • Code review checklists that require explicit validation for any next, redirect, or return_to parameters and confirm they are constrained to relative, application-internal paths.
  • Dynamic application security testing (DAST) and browser-based security scanning that fuzz URL parameters to detect unexpected script execution or open redirects.
  • Security linting or custom ESLint rules in front-end repositories to warn when untrusted input influences navigation, DOM sinks, or eval-like constructs.

Sources

SourceLink
github.comgithub.com/Significant-Gravitas/AutoGPT/security/advisories/GHSA-j2cp-jg5q-38wj

Frequently asked

questions

It can be exploited wherever users access the AutoGPT signup page through attacker-supplied links. The attacker does not need network proximity, only a way to deliver a crafted URL (e.g., email, chat, or embedded links).

The attacker does not need their own account, but the victim typically must be authenticated (or will become authenticated during the flow) for the impact to be significant, since the malicious script runs in the context of the victim's session.

Constrain all redirect or navigation parameters (such as next) to a strict set of allowed relative paths, reject or normalize anything else, and avoid passing raw parameter values directly into client-side routing APIs.

Establish coding standards that treat URL and query parameters as untrusted, require validation before they influence navigation or the DOM, enforce these rules via linters and code review, and complement them with a strong CSP and regular security testing.

Find out what's already
exploitable in your codebase.