MEDIUM 6.1

CVE-2026-42253: Apache ActiveMQ Header Injection XSS Vulnerability

Apache ActiveMQ's web console contains a cross-site scripting (XSS) vulnerability that allows an attacker to inject malicious content into HTTP response headers. The flaw exists in how the MessageServlet handles JMS message properties—it copies them directly into HTTP headers without filtering or validation. An attacker who can craft a JMS message with specially crafted properties could inject security headers, potentially leading to session hijacking, credential theft, or malware delivery when a user views the affected web console. The vulnerability requires user interaction (a victim must view the injected content) and affects versions of ActiveMQ and ActiveMQ Web released before 5.19.7 and 6.2.6.

Source data · NVD / CISA · public domain

CVSS
3.1 · 6.1 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weaknesses (CWE)
CWE-79
Affected products
2 configuration(s)
Published / Modified
2026-06-01 / 2026-06-17

NVD description (verbatim)

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') vulnerability in Apache ActiveMQ, Apache ActiveMQ Web. The MessageServlet in the ActiveMQ web console API copies every JMS message property into an HTTP response header without any validation. This can allow overwriting and injecting security headers by setting them on JMS messages that are returned by the servlet. This issue affects Apache ActiveMQ: before 5.19.7, from 6.0.0 before 6.2.6; Apache ActiveMQ Web: before 5.19.7, from 6.0.0 before 6.2.6. Users are recommended to upgrade to version 5.19.7 or 6.2.6, which fixes the issue. The MessageServlet has now been deprecated and disabled by default.

2 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The MessageServlet in Apache ActiveMQ's web console API exhibits improper input neutralization (CWE-79) when processing JMS message properties. The servlet reflects every property from inbound JMS messages into HTTP response headers without sanitization, normalization, or allowlisting. An attacker with the ability to publish a malicious JMS message containing HTTP header injection payloads can manipulate security-critical headers such as Content-Security-Policy, X-Frame-Options, Set-Cookie, or Location. Since the servlet operates in a web context, injected headers can be leveraged to perform stored or reflected XSS attacks, clickjacking, or credential exfiltration. The vulnerability is network-adjacent (requires message broker access or network path to the broker) but becomes critical when combined with other attack vectors. The fix involves validation of message properties before header serialization and deprecation of the MessageServlet endpoint.

Business impact

Organizations running ActiveMQ web consoles face risk of unauthorized access to broker management interfaces through credential theft via XSS. Attackers exploiting this could redirect administrators to phishing sites, steal session cookies, or inject malware into the management UI. For enterprises using ActiveMQ in production messaging pipelines, compromise of the console could enable lateral movement to backend systems, message interception, or service disruption. The attack surface is primarily internal (requires network access to the web console), but organizations exposing ActiveMQ web interfaces to untrusted networks face heightened risk. Affected deployments should prioritize patching to prevent management plane compromise.

Affected systems

Apache ActiveMQ versions before 5.19.7 are affected. Apache ActiveMQ Web versions before 5.19.7 are affected. Additionally, all ActiveMQ versions from 6.0.0 up to but not including 6.2.6 are vulnerable, as are ActiveMQ Web versions 6.0.0 through 6.2.5. Organizations should check their deployed version against these thresholds. The 5.15.x, 5.16.x, 5.17.x, and 5.18.x series are all impacted if earlier than 5.19.7; the 6.0.x and 6.1.x series are impacted. Verify your exact version in ActiveMQ logs or the web console itself.

Exploitability

Exploitation requires two conditions: (1) network-level access to the ActiveMQ web console or the ability to publish a JMS message to the broker, and (2) a user interaction component—an administrator or operator must view the injected content in the web console. The attack does not require authentication to the broker itself if message publishing is open, but typically occurs in environments where internal access controls exist. The CVSS score of 6.1 reflects the user-interaction requirement and lack of availability impact; however, the XSS vector is high-impact if successfully exploited. Proof-of-concept development is straightforward for a researcher with broker access, but real-world exploitation depends on operational deployment patterns and access controls.

Remediation

Upgrade Apache ActiveMQ to version 5.19.7 or later, or upgrade to version 6.2.6 or later for the 6.x branch. These versions include input validation in the MessageServlet and deprecate the endpoint by default. Organizations unable to patch immediately should restrict network access to the ActiveMQ web console (port 8161 by default) using firewall rules or network segmentation, limit broker message publishing permissions to trusted producers only, and consider disabling the web console if not actively used. After patching, verify the MessageServlet is no longer accessible or that header validation is functioning.

Patch guidance

For ActiveMQ 5.x deployments: upgrade to version 5.19.7 or later. For ActiveMQ 6.x deployments: upgrade to version 6.2.6 or later. Verify against the official Apache ActiveMQ security advisory for exact version numbers and release dates. Test patches in a non-production environment first, particularly if your deployment relies on custom MessageServlet integrations, as the servlet is now deprecated. After upgrading, restart the ActiveMQ service and confirm the web console is operational. Check release notes for any breaking changes or configuration adjustments required.

Detection guidance

Monitor HTTP response headers from the ActiveMQ web console for anomalous or duplicate headers that do not align with expected application behavior. Search web server logs for requests to /admin/msg* or /api/message endpoints combined with header injection payloads (e.g., strings containing newline characters %0d%0a or raw CRLF in JMS message properties). Implement Web Application Firewall (WAF) rules to detect and block header injection attempts. Monitor JMS broker logs for messages containing header-like payloads in their properties. Set up alerts for administrative console access patterns that deviate from baseline, as successful exploitation may result in unusual browser behavior or session anomalies.

Why prioritize this

This vulnerability rates MEDIUM severity (CVSS 6.1) and is not yet listed in CISA's Known Exploited Vulnerabilities (KEV) catalog. Prioritization should be based on deployment context: organizations with internally-segmented networks and restricted console access can defer patching longer, while those exposing ActiveMQ management interfaces or with permissive message publishing policies should patch urgently. The attack requires user interaction but has clear lateral movement potential in compromised environments. Score it relative to your infrastructure—if ActiveMQ is core to production messaging and the web console is accessible, elevate priority to high.

Risk score, explained

The CVSS v3.1 score of 6.1 (MEDIUM) reflects: network-based attack vector (AV:N), low attack complexity (AC:L), no privileges required (PR:N), but required user interaction (UI:R), changed scope (S:C), and limited confidentiality and integrity impact (C:L, I:L) with no availability impact (A:N). The 'changed scope' indicates the vulnerability can affect resources beyond the vulnerable component (other users or services). The score does not fully capture the management-plane compromise risk or lateral movement potential in certain architectures; organizations should contextualize this score against their threat model. If your ActiveMQ console is network-reachable from untrusted sources, consider the effective risk higher than the base score suggests.

Frequently asked questions

Do we need broker-level authentication to exploit this, or can we inject messages from outside the network?

Exploitation typically requires either (1) direct network access to publish JMS messages to the broker, or (2) the ability to craft a message that flows through an existing trusted producer. In networks with properly configured firewall rules and restricted message publisher permissions, the attack surface is limited to internal actors. However, if your broker allows unauthenticated or loosely-authenticated message publishing over the network, the risk increases significantly. Review your broker's access control lists and network segmentation.

Will the patch break any of our custom integrations with MessageServlet?

Yes, potentially. Version 5.19.7 and 6.2.6 deprecate and disable the MessageServlet by default. If you have custom applications or scripts relying on this endpoint, you will need to rearchitect those integrations after patching. Check the official Apache ActiveMQ migration guide and security advisory for re-enabling options or alternative APIs before applying patches to production.

Is there a workaround if we can't patch immediately?

Yes. Implement strict network-level access controls by blocking external access to the ActiveMQ web console port (default 8161), restrict JMS message publishers to a trusted allowlist, and consider disabling the web console entirely if it is not actively used. Additionally, deploy a WAF or HTTP proxy in front of the console to filter for header injection patterns. These controls mitigate the risk but do not eliminate it; patching remains the proper fix.

How do we detect if this vulnerability has been exploited in our environment?

Review web server logs and ActiveMQ audit logs for (1) unusual HTTP response headers in console traffic, (2) JMS messages with embedded header-like payloads in their properties, and (3) anomalous administrative console sessions or user actions that do not match baseline behavior. Enable detailed logging on the MessageServlet before patching, and correlate web console access logs with JMS broker message timestamps to identify injection attempts. After patching, monitor for any attempts to access the deprecated endpoint.

This analysis is based on published vulnerability data as of June 2026 and the CVE-2026-42253 advisory. Organizations should verify patch availability and version applicability against the official Apache ActiveMQ security notices before deployment. CVSS scores and severity ratings reflect industry-standard calculations but should be contextualized within your organization's threat model and network architecture. This document does not constitute legal advice or guarantee of security. Always test patches in non-production environments and maintain backups before applying updates. Source: NVD (public-domain), retrieved 2026-07-07. Analysis generated by SEC.co (claude-haiku-4-5).