/

CVE-2026-67237

Severity:

CRITICAL RISK

(9.3)

Reflected XSS (CWE-79) in RabbitMQ Management Web UI

CVE-2026-67237

Analyzed

Vulnerability type

Category:

Cross-Site Scripting

CWE:

CWE-79

Impact:

Arbitrary JavaScript execution in the management UI origin

Severity:

CRITICAL RISK

(9.3)

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

RabbitMQ can place attacker-controlled bearer-token content from an Authorization header or access_token cookie into OAuth bootstrap JavaScript without escaping it. When OAuth is enabled and a user loads the affected management endpoint, the injected content may execute JavaScript in the RabbitMQ management UI origin.

RabbitMQ can place attacker-controlled bearer-token content from an Authorization header or access_token cookie into OAuth bootstrap JavaScript without escaping it. When OAuth is enabled and a user loads the affected management endpoint, the injected content may execute JavaScript in the RabbitMQ management UI origin.

Affected context

The vulnerability affects RabbitMQ deployments using the management plugin with OAuth authentication enabled and an affected 4.2.x or 4.3.x release. The risk arises when token content is incorporated into client-side bootstrap JavaScript without context-appropriate escaping. Exploitation through the cookie path also depends on an attacker being able to plant an access_token cookie for the management host.

The vulnerability affects RabbitMQ deployments using the management plugin with OAuth authentication enabled and an affected 4.2.x or 4.3.x release. The risk arises when token content is incorporated into client-side bootstrap JavaScript without context-appropriate escaping. Exploitation through the cookie path also depends on an attacker being able to plant an access_token cookie for the management host.

Exploit preconditions

  • Attack surface: RabbitMQ management UI OAuth bootstrap endpoint
  • Required access: Ability to influence the Authorization header or, for the cookie path, plant an access_token cookie on the management host
  • Trigger point: A user or browser loads the OAuth-enabled management endpoint
  • Why exploitation is possible: Token data is embedded into JavaScript without escaping, allowing crafted content to cross from data into executable script
  • Attack surface: RabbitMQ management UI OAuth bootstrap endpoint
  • Required access: Ability to influence the Authorization header or, for the cookie path, plant an access_token cookie on the management host
  • Trigger point: A user or browser loads the OAuth-enabled management endpoint
  • Why exploitation is possible: Token data is embedded into JavaScript without escaping, allowing crafted content to cross from data into executable script

Why this happens

The underlying bug is a failure to apply context-aware output encoding when inserting authentication token data into JavaScript source. Because attacker-influenced values are treated as trusted script content, specially crafted token text can alter the generated bootstrap code and execute in the management UI origin. This maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as cross-site scripting.

The underlying bug is a failure to apply context-aware output encoding when inserting authentication token data into JavaScript source. Because attacker-influenced values are treated as trusted script content, specially crafted token text can alter the generated bootstrap code and execute in the management UI origin. This maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as cross-site scripting.

Potential impact

  • An attacker may execute arbitrary JavaScript in a victim's management UI session.
  • Malicious script could access data available to the management origin.
  • An attacker could perform management actions in the victim's browser context, subject to that user's permissions.
  • The issue could facilitate credential, session, or operational-data theft.
  • Compromise could contribute to messaging configuration changes or broader broker abuse.
  • An attacker may execute arbitrary JavaScript in a victim's management UI session.
  • Malicious script could access data available to the management origin.
  • An attacker could perform management actions in the victim's browser context, subject to that user's permissions.
  • The issue could facilitate credential, session, or operational-data theft.
  • Compromise could contribute to messaging configuration changes or broader broker abuse.

General mitigation guidance

Mitigation focuses on preventing attacker-controlled token data from becoming executable browser content.

Common defensive patterns include:

  • Apply context-aware JavaScript string encoding or use safe structured-data serialization when generating bootstrap data.
  • Prefer APIs that pass configuration as inert data rather than concatenating values into executable script.
  • Validate token formats and reject unexpected characters where appropriate, without relying on validation as a substitute for output encoding.
  • Use restrictive Content Security Policy controls as defense in depth.
  • Limit management UI privileges and avoid granting users more broker permissions than necessary.
  • Restrict who can set cookies or influence authentication headers for management hosts.

Mitigation focuses on preventing attacker-controlled token data from becoming executable browser content.

Common defensive patterns include:

  • Apply context-aware JavaScript string encoding or use safe structured-data serialization when generating bootstrap data.
  • Prefer APIs that pass configuration as inert data rather than concatenating values into executable script.
  • Validate token formats and reject unexpected characters where appropriate, without relying on validation as a substitute for output encoding.
  • Use restrictive Content Security Policy controls as defense in depth.
  • Limit management UI privileges and avoid granting users more broker permissions than necessary.
  • Restrict who can set cookies or influence authentication headers for management hosts.

How teams detect issues like this

Organizations can look for:

  • Static-analysis findings where HTTP headers or cookies are concatenated into JavaScript, HTML, or script templates.
  • Code-review signals involving authentication values inserted into inline scripts without context-specific encoding.
  • Tests that supply metacharacters through Authorization headers and cookies and verify that responses contain inert, correctly encoded data.
  • Web-application monitoring for unexpected script content or unusual requests to OAuth bootstrap endpoints.
  • Policy enforcement requiring safe serialization libraries, output-encoding utilities, and security tests for management interfaces.

Automated code-review and SAST tools may help identify these data-flow patterns.

Organizations can look for:

  • Static-analysis findings where HTTP headers or cookies are concatenated into JavaScript, HTML, or script templates.
  • Code-review signals involving authentication values inserted into inline scripts without context-specific encoding.
  • Tests that supply metacharacters through Authorization headers and cookies and verify that responses contain inert, correctly encoded data.
  • Web-application monitoring for unexpected script content or unusual requests to OAuth bootstrap endpoints.
  • Policy enforcement requiring safe serialization libraries, output-encoding utilities, and security tests for management interfaces.

Automated code-review and SAST tools may help identify these data-flow patterns.

Sources

SourceLink
github.comgithub.com/rabbitmq/rabbitmq-server/commit/5cd6d841d84450324a4613501ed917d98828af23
github.comgithub.com/rabbitmq/rabbitmq-server/commit/a8041d528c1a71af4cb75ade247ed082fe6b83fb
github.comgithub.com/rabbitmq/rabbitmq-server/releases/tag/v4.2.8
github.comgithub.com/rabbitmq/rabbitmq-server/releases/tag/v4.3.2
github.comgithub.com/rabbitmq/rabbitmq-server/security/advisories/GHSA-2rf7-f6r6-8rwh

Frequently asked

questions

It can be remotely exploitable when the management UI is reachable and OAuth is enabled, but exploitation generally also requires influencing token input and causing a user or browser to load the affected endpoint.

The endpoint is exposed before authentication under the stated OAuth configuration. However, the attacker still needs a viable way to control the Authorization header or plant the access_token cookie, depending on the exploitation path.

Treat token values as untrusted data, serialize them safely, and apply context-appropriate output encoding before placing them into JavaScript. Avoid constructing executable script through string concatenation.

Apply secure coding rules to authentication and management interfaces, test all header and cookie inputs for injection, enforce restrictive browser security policies, and use least-privilege management accounts.

It can be remotely exploitable when the management UI is reachable and OAuth is enabled, but exploitation generally also requires influencing token input and causing a user or browser to load the affected endpoint.

The endpoint is exposed before authentication under the stated OAuth configuration. However, the attacker still needs a viable way to control the Authorization header or plant the access_token cookie, depending on the exploitation path.

Treat token values as untrusted data, serialize them safely, and apply context-appropriate output encoding before placing them into JavaScript. Avoid constructing executable script through string concatenation.

Apply secure coding rules to authentication and management interfaces, test all header and cookie inputs for injection, enforce restrictive browser security policies, and use least-privilege management accounts.

Find out what's already
exploitable in your codebase.