Threat intelligence, Threat Research

Zammad Unauthenticated WebSocket Session Leak to Remote Code Execution

by Security News

Zammad Pre-Auth Session Leak
to RCE (CVE-2026-102489)

OVERVIEW

SonicWall Capture Labs threat research team became aware of the threat CVE-2026-102489, assessed its impact, and developed mitigation measures. The flaw, also known as the Zammad Unauthenticated WebSocket Session Leak to Remote Code Execution, is a critical vulnerability affecting the Zammad open-source helpdesk and customer support system (zammad/zammad, a Ruby on Rails application) in versions 6.3.0 through 6.5.4. It lets an unauthenticated attacker read a logged-in agent's session cookie out of a WebSocket error message, replay that cookie to take over the account, and, when the hijacked account is an administrator, reach code execution on the server. Classified under CWE-384 (Session Fixation) and rated CVSS 9.8 (Critical), the issue was reported by the Dutch Institute for Vulnerability Disclosure (DIVD) under case DIVD-2026-00015 and disclosed through the Zammad project on October 5, 2026. The vulnerability is listed in the CISA Known Exploited Vulnerabilities catalog (added October 2, 2026) following a DIVD-observed breach. Its EPSS score is 49.9% (98.9th percentile). On DEB and RPM installations the attacker can continue from the zammad service account to full root via the chained local flaw CVE-2026-102490. Zammad 6.5.5 and 7.2.0 rewrite the affected dispatcher, so administrators should upgrade immediately.

TECHNICAL OVERVIEW

Zammad is a web-based ticketing and customer-support platform written in Ruby on Rails. Its classic agent interface keeps a live WebSocket to a dedicated legacy websocket server, a separate process from the main Rails application, which pushes real-time updates to connected browsers. The vulnerability lives in how that server dispatches the small JSON events the browser sends over the socket.

figure1.png
Figure 1: Zammad CVE-2026-102489 chain: WebSocket clients leak, admin hijack, package ERB write, RCE as zammad

Each time a browser connects, the server records that connection in a class-level registry. The handshake headers are stored verbatim in that entry, and those headers include the browser's Cookie. Because the registry is a class variable shared across every connection, it accumulates the session cookie of every client currently attached to the socket, administrators included.

figure2.png
Figure 2: onopen stores each client handshake headers including Cookie in the class-level clients registry

When a message arrives, the server hands the whole registry to the event dispatcher as the clients argument and resolves the client-supplied event name into a handler class with constantize. An event name of base resolves to Sessions::Event::Base, the abstract parent class of every real handler. The dispatcher instantiates it and calls run. On any error it returns the exception message to the caller.

figure3.png
Figure 3: Sessions Event run resolves the event via constantize and returns the exception message to the caller

Two further mistakes turn that error path into a full session leak. First, Base#initialize mass-assigns every argument into an instance variable, so the entire clients registry becomes @clients on the object. Second, Base defines no run method, so the call raises NoMethodError. On Ruby 3.2, the runtime the 6.x line ships with, the NoMethodError message embeds the receiver's full #inspect, which now contains the @clients dump with every connected cookie. That message is returned to the unauthenticated socket in a single unmasked frame. The same code on Ruby 3.4 (Zammad 7.0 and 7.1) does not leak, because Ruby 3.4 no longer embeds the receiver in the error message.

figure4.png
Figure 4: Base initialize mass-assigns every param into an ivar, placing clients on the inspected receiver

With a valid administrator cookie in hand, the attacker reaches code execution through the package API. Package.install writes the files of an uploaded package to any path under the Rails root; the only check is that the location string contains no .. or %2e%2e. The attacker writes a mailer template to app/views/mailer/password_reset/en.html.erb.custom, a filename the template loader prefers over the stock view. Sending an unauthenticated password-reset request for the administrator then renders that template synchronously with ERB evaluation trusted, so the embedded Ruby runs as the zammad operating-system user before any mail is delivered. The fix in Zammad 6.5.5 and 7.2.0 validates the event name against a strict pattern, rejects abstract classes and classes without a run method, returns a generic error with no exception text, and passes only the caller's own client entry to the handler rather than the whole registry.

figure5.png
Figure 5: Zammad 6.5.5 validates the event name, rejects abstract classes, and returns a generic error

TRIGGERING THE VULNERABILITY

The following conditions must be met for successful exploitation of CVE-2026-102489:

  • Network-Reachable WebSocket Endpoint: The target must expose the Zammad classic interface so that its legacy websocket server is reachable, typically proxied at /ws on the same host and port as the web application. Deployments that sit behind TLS require the attacker to reach the plaintext socket or an inline position that can read it.
  • Vulnerable Version on Ruby 3.2: The Zammad build must be in the 6.3.0 through 6.5.4 range running on Ruby 3.2, where the NoMethodError message embeds the receiver. Versions 6.5.5 and 7.2.0 fix the dispatcher, and the 7.0 and 7.1 line on Ruby 3.4 does not leak even though the code is otherwise present.
  • A Connected Privileged Session: An agent or administrator must have the classic interface open, holding a live WebSocket connection, at the time of the attack. The leak only returns cookies of clients currently attached to the socket, so an idle instance with no connected staff yields an empty registry.
  • Administrator Permission for the Package API: Code execution requires that the hijacked session belongs to an account with the admin.package permission, which the package-install endpoint enforces. Hijacking an administrator session satisfies this directly.
  • Password-Reset Feature Enabled: The render trigger relies on the lost-password workflow being enabled, which is the default. The password-reset endpoint renders the planted mailer template and does not require authentication.

EXPLOITATION

Exploiting CVE-2026-102489 requires no credentials and no special tooling. The attacker opens a WebSocket to the target and sends a single JSON text frame, {"event":"base"}. The server replies with an error frame whose body is a Ruby NoMethodError string containing the @clients registry, and the attacker extracts a connected administrator's _zammad_session cookie from it. Because client-to-server WebSocket frames are masked while server-to-client frames are not, the trigger request is obfuscated on the wire but the leaking reply is plaintext, which makes the reply the reliable detection point.

figure6.png
Figure 6: On-wire exploit: masked base trigger, unmasked cookie leak, then package upload and password reset

The attacker replays the stolen cookie to GET /api/v1/users/me to confirm it belongs to an administrator, then posts a package to /api/v1/packages whose single file writes app/views/mailer/password_reset/en.html.erb.custom under the Rails root. That template carries an ERB expression such as <%= `id` %>. A final unauthenticated POST /api/v1/users/password_reset for the administrator's login causes the mailer to render the planted template with trusted evaluation, executing the embedded command as the zammad user. The server returns an ordinary success response, so the sequence resembles routine administrative activity in the response alone. On packaged DEB and RPM installations the attacker then escalates from zammad to root through CVE-2026-102490.

Video Demonstration

PAYLOAD KEY COMPONENTS
ComponentValuePurpose
Leak Trigger{"event":"base"} over /wsResolves the abstract Sessions::Event::Base, forcing the registry-leaking error
Leaked Secret_zammad_session_<hex> cookie in the error frameA connected administrator's live session, usable with no password
Session CheckGET /api/v1/users/me with the stolen cookieConfirms the hijacked account holds role_ids:[1] (Admin)
Write PrimitivePOST /api/v1/packages (admin.package)Package.install writes any path under the Rails root, only .. blocked
Planted Templateapp/views/mailer/password_reset/en.html.erb.customThe .custom suffix takes precedence over the stock mailer view
Execution TriggerPOST /api/v1/users/password_resetRenders the template with trusted ERB, running code as the zammad user
Runtime DependencyRuby 3.2 NoMethodError#messageEmbeds the receiver #inspect, which carries the @clients cookie dump

SONICWALL PROTECTIONS

To ensure SonicWall customers are prepared for any exploitation that may occur due to this vulnerability, the following signatures have been released:

Signature IDSignature Name
IPS: 22649Zammad Session Hijacking (CVE-2026-102489)
IPS: 22652Zammad Arbitrary File Upload

REMEDIATION RECOMMENDATIONS

The risks posed by CVE-2026-102489 can be mitigated or eliminated with the following measures:

  • Upgrade Zammad: Move to Zammad 6.5.5 or 7.2.0 or later, where the websocket dispatcher validates event names, refuses abstract handlers, and returns a generic error with no internal state. This is the direct fix and should be applied to every deployment.
  • Restrict WebSocket Exposure: Place the classic interface and its websocket endpoint behind TLS and an authenticated reverse proxy, and limit network access to the application so that untrusted clients cannot open a socket to /ws.
  • Rotate Sessions and Credentials After Exposure: On any instance that ran a vulnerable version while staff were connected, invalidate existing sessions and require re-authentication, because session cookies may already have been captured.
  • Harden Packaged Installations Against the Root Chain: On DEB and RPM installations, apply the packager.io fix for CVE-2026-102490 and restrict filesystem write access for the zammad account, so that code execution as the service user cannot escalate to root.
  • Monitor for Exploitation Artifacts: Watch for POST /api/v1/packages requests whose body references app/views/mailer/ and a .erb.custom file, for unexpected .erb.custom templates appearing under the application's mailer views, and for outbound connections from the Zammad host shortly after a password-reset request.
  • Utilizing IPS signatures: Deploy updated IPS signatures to detect and block malicious payloads.
  • Network segmentation: Isolate application servers from sensitive internal resources and implement egress filtering to detect unauthorized outbound connections.

RELEVANT LINKS

ATTRIBUTION

The vulnerability was reported by the Dutch Institute for Vulnerability Disclosure (DIVD) under case DIVD-2026-00015 and disclosed through the Zammad project. Public technical analysis was published by Horizon3. The fix shipped in Zammad 6.5.5 and 7.2.0.

Third-party vulnerability database mirrors:

Share This Article

An Article By

Security News

The SonicWall Capture Labs Threat Research Team gathers, analyzes and vets cross-vector threat information from the SonicWall Capture Threat network, consisting of global devices and resources, including more than 1 million security sensors in nearly 200 countries and territories. The research team identifies, analyzes, and mitigates critical vulnerabilities and malware daily through in-depth research, which drives protection for all SonicWall customers. In addition to safeguarding networks globally, the research team supports the larger threat intelligence community by releasing weekly deep technical analyses of the most critical threats to small businesses, providing critical knowledge that defenders need to protect their networks.

Related Articles

  • Node2Shell: Node.js Brotli Decoder Out-of-Bounds Write Remote Code Execution
    Read More
  • PHP2Shell RCE is proven on PHP 8.5.11
    Read More