Zammad WebSocket Session Leak to Authenticated Session Hijack and RCE (CVE-2026-102489)
Published: 2026-11-25 • Researcher: Horizon3.ai Attack Team (repo owner horizon3ai, commit author Zach); DIVD CSIRT and Zammad GmbH (advisory)
Exploitation signals
Confirmed exploited in the wild. Added to CISA KEV 2026-10-02. Federal remediation deadline 2026-10-05.
EPSS 14.5% · 97th percentile
- Severity
- Critical
- CVE
- CVE-2026-102489
- Category
- web
- Affected product
- Zammad helpdesk / ticket system (Ruby on Rails)
- Affected versions
- 6.3.0 through 6.5.4 (NVD CPE range, exploitable). The bug is also present in 7.0.0 through 7.1.2 per NVD, but not exploitable due to framework changes; the vendor states 7.0 and later are not affected in practice and shipped a hardening change in 7.2.0.
- Disclosed
- 2026-11-25
- Patch status
- Patched
Tags
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-102489
- https://github.com/horizon3ai/CVE-2026-102489
- https://horizon3.ai/attack-research/disclosures/cve-2026-102489-zammad-session-leak-rce/
- https://zammad.com/en/advisories/cve-2026-102489-cve-2026-102490
- https://csirt.divd.nl/DIVD-2026-00015
- https://csirt.divd.nl/CVE-2026-102489
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2026-102489
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-11-25 |
| Last Updated | 2026-10-07 |
| Author / Researcher | Horizon3.ai Attack Team (repo owner horizon3ai, commit author Zach); DIVD CSIRT and Zammad GmbH (advisory) |
| CVE / Advisory | CVE-2026-102489 |
| Category | web |
| Severity | Critical |
| CVSS Score | 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H); DIVD also scored 9.4 on CVSS 4.0 |
| Status | Weaponized |
| Tags | Zammad, RCE, session-hijack, WebSocket, information-disclosure, unauthenticated, Ruby-on-Rails, ERB-template-injection, CWE-384 |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Zammad helpdesk / ticket system (Ruby on Rails) |
| Versions Affected | 6.3.0 through 6.5.4 (NVD CPE range, exploitable). The bug is also present in 7.0.0 through 7.1.2 per NVD, but not exploitable due to framework changes; the vendor states 7.0 and later are not affected in practice and shipped a hardening change in 7.2.0. |
| Language / Platform | Ruby (Rails); Linux, Docker deployments |
| Authentication Required | No for the attacker; a victim authenticated user must be connected to the WebSocket endpoint (passive user interaction) |
| Network Access Required | Yes |
Summary
Zammad exposes a WebSocket event dispatcher that resolves user-supplied event names against Ruby constants. Sending the event name base resolves Sessions::Event::Base, a valid constant that has no run method, so the handler raises a NoMethodError whose message includes the full receiver inspect. That inspect contains the clients map, which holds the request context of every connected user, including their Cookie header. An unauthenticated attacker can therefore harvest valid session cookies, hijack an authenticated session (ideally an administrator), install a malicious ERB view through the package API, and trigger server-side template evaluation through a password reset to execute commands as the zammad OS user.
Vulnerability Details
Root Cause
The WebSocket event dispatcher builds a class name from the client-supplied event value without restricting the resolution to the intended event subclasses. Because Sessions::Event::Base is a real constant but does not implement run, the dispatcher raises a NoMethodError while inspecting the receiver. Ruby’s NoMethodError message embeds the receiver object’s inspect output, and that output includes the @clients instance variable: a map keyed by client/session that stores each connected user’s request context, including the raw Cookie header. The disclosure therefore turns a harmless error into a cross-user session leak. Zammad’s advisory describes the underlying weakness as CWE-384 (session fixation / session handling) and notes the affected code was hardened in 7.2.0.
Attack Vector
An unauthenticated attacker opens a WebSocket connection to the target’s /ws endpoint, sending a Cookie header with a syntactically valid but attacker-chosen session value so the connection is accepted. The attacker then sends the JSON frame {“event”:“base”}. The resulting error frame carries the exception text containing other users’ Cookie headers. The attacker extracts the _zammad_session values, validates them against /api/v1/users/me, and selects a session whose role_ids include the admin role (role id 1). Using that hijacked session and its CSRF token, the attacker uploads a crafted Zammad package (.zpm) whose file entry writes app/views/mailer/password_reset/en.html.erb.custom containing an ERB payload. A request to /api/v1/users/password_reset triggers rendering of the malicious mailer view, evaluating the ERB and running the command.
Impact
Remote code execution as the zammad OS user on the Zammad host. The PoC writes the output of an arbitrary command to a file on the target (/tmp/zammad_rce.txt by default) and then deletes the installed package to reduce forensic traces. A compromised helpdesk host typically holds ticket data, customer records, mail and integration credentials, and may be a pivot point toward internal networks. CISA added the CVE to the Known Exploited Vulnerabilities catalog on 2026-10-02, indicating active exploitation in the wild.
Environment / Lab Setup
OS: Linux (Docker-based Zammad deployment)
Target: Zammad 6.3.0 - 6.5.4 (e.g. a Docker Compose deployment of 6.5.4,
see the Zammad documentation for the official compose setup)
Victim: At least one authenticated agent/admin logged in with the
browser open, so a WebSocket connection is established
Attacker: Python 3.9+ with requests and websocket-client
Tools: Python 3, curl, browser (victim session)Setup Steps
| |
Proof of Concept
Step-by-Step Reproduction
- Discover the session cookie name — fetch the target root page and read the _zammad_session cookie name from the Set-Cookie header.
- Harvest cookies — connect to /ws with an attacker-supplied session cookie and send {“event”:“base”}; parse the error frame for Cookie headers leaked from the clients map, then extract session values.
- Validate and pick a session — call /api/v1/users/me with each captured cookie; prefer a session whose role_ids contains 1 (admin).
- Fetch a CSRF token — request the target root with the hijacked cookie and read the CSRF-TOKEN response header.
- Install the malicious package — POST a .zpm to /api/v1/packages that writes app/views/mailer/password_reset/en.html.erb.custom with an ERB payload that runs the requested command and writes its output to a file.
- Trigger rendering — POST /api/v1/users/password_reset for the hijacked user’s login; Zammad renders the password-reset mailer and evaluates the ERB.
- Read the result and clean up — wait roughly six seconds, read the output file on the target, and delete the ZammadRceAddon package.
Exploit Code
See
CVE-2026-102489.pyin this folder (upstream script, archived with an added research-only header). The upstream README isupstream-README.md.
Key harvest primitive:
| |
Key payload primitive:
| |
Expected Output
| |
On the target, /tmp/zammad_rce.txt contains the command output, for example:
| |
Detection & Indicators of Compromise
- WebSocket frames carrying {“event”:“base”} or other event names that resolve to non-event constants, immediately followed by error frames containing “Sessions::Event::Base”, “NoMethodError”, “@clients” or “Cookie”=>.
- WebSocket connections that present a syntactically valid but unknown _zammad_session value, then disconnect shortly after the first error frame.
- A small burst of /api/v1/users/me requests using many different session cookies from one source address.
- Package uploads to /api/v1/packages containing a file location under app/views/mailer/password_reset/ or a .custom ERB view, especially from a session whose normal behaviour does not include package management.
- /api/v1/users/password_reset calls shortly after a package install, followed by unexpected mailer rendering.
- New files such as /tmp/zammad_rce.txt, or outbound connections spawned by the zammad user.
- Rails production log entries: NoMethodError for Sessions::Event::Base with a large inspect payload; package install/remove audit entries for an unexpected addon.
SIEM / IDS rule (example):
| |
Remediation
| Action | Detail |
|---|---|
| Patch | Upgrade to Zammad 7.2.0 or later, which contains the vendor’s hardening change. Zammad 6.5 and older are out of support and receive no security updates, so upgrading off 6.x is the real fix. Zammad 7.0/7.1 are not exploitable in practice per the vendor, but 7.2.0 or later is recommended. |
| Workaround | Restrict WebSocket and API exposure to trusted networks, block package uploads from untrusted sessions, and terminate/rotate all active sessions after any suspected exposure. No single configuration switch is documented by the vendor as a full workaround. |
| Config Hardening | Restrict access to the Zammad server to trusted administrators, run Zammad in a segmented network, limit package installation to trusted admins, enforce short session lifetimes, and monitor /api/v1/packages and /ws for anomalous activity. |
References
Notes
Auto-ingested from https://github.com/horizon3ai/CVE-2026-102489 on 2026-11-25.
Review verdict: this is a real end-to-end exploit, not a detector. The single Python script performs the complete chain — WebSocket information disclosure, session harvesting and validation, authenticated package upload, ERB template injection through the password-reset mailer, command execution, and cleanup. Status is therefore Weaponized. The repository contains no scanner, inventory, or audit logic, and no license file is present, so the code is archived with attribution for authorized research only.
Limitations: the disclosure requires at least one authenticated user to be connected to the WebSocket endpoint at the time of attack, which the upstream README calls out explicitly. The stolen session must still be valid and, for the most reliable result, belong to an admin who can install packages. Command output is written to a file on the target rather than returned over the network, so the attacker needs another way to read it (or must use a command that exfiltrates). The script depends on requests and websocket-client and disables TLS verification, so it should only be run against systems you own or have written authorization to test.
| |