Zulip uploads let users read, modify and delete server files
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · GHSA-f7qf-999g-f6h9. Fix status from GitHub. Impact type from CWE-862.
Summary
Zulip Server from 10.0 before 12.5 and from 13.0 before 13.3 is affected on servers that store uploaded files on local disk. A missing input check lets an uploaded file be mistaken for an internal upload record of the tusd upload server (CWE-20). A user with an account in any organization on the server can make tusd read, append to or delete files that the zulip system user can access, which can lead to code execution as that user. Servers that use the S3 storage backend are not affected.
Written with Claude Haiku 5.5 from the sources below · 2026-11-19
Description from the GitHub advisory
### Summary On Zulip servers that store uploaded files on local disk, which is the default for self-hosted installations, a user could upload a malicious file to make Zulip's upload server (tusd) treat it as tusd's own record of an upload. The user could then make tusd read, append to, or delete arbitrary files that the `zulip` system user can access. This exposes the server's secrets, and allows running code as the `zulip` user. Severity is critical: it only requires a user account in any organization on the server. Servers using the S3 storage backend are not affected. ### Details Since Zulip Server 10.0, the web app uploads files through tusd, which Zulip runs alongside the Zulip server. With the local storage backend, tusd keeps its own internal records about each upload in the same directory where Zulip stores uploaded files, and trusts the information in those records, including where an upload's data is stored. Zulip did not prevent an uploaded file from being mistaken for one of these records. ### Impact A user with an account in any organization on the server could: - read files that the `zulip` user can read, including the server's secrets; - append to files that the `zulip` user can write, which can be used to run arbitrary code as the `zulip` user; - delete files that the `zulip` user can delete. This allows a full compromise of the Zulip server, including the data of all of its organizations. Only servers that store uploaded files on local disk (`LOCAL_UPLOADS_DIR` set in `/etc/zulip/settings.py`) are affected. This affects Zulip Server 10.0 through 13.2. This is fixed in Zulip Server 13.3 and 12.5. ### Workarounds Blocking access to tusd prevents exploitation until upgrading. To do so, create `/etc/nginx/zulip-include/app.d/block-tusd.conf` with the following contents, and then run `systemctl reload nginx`: ```nginx location = /api/v1/tus { return 403; } location ^~ /api/v1/tus/ { return 403; } ``` This disables uploading files from the Zulip web and desktop apps, which upload files only through tusd. It also disables uploading a Slack export when creating an organization, if your server allows that. If you have set `tusd_server_listen` in `/etc/zulip/zulip.conf` to make tusd listen on an address other than `127.0.0.1`, you must also block other access to tusd's port (9900). ### Checking whether your server was exploited Exploiting this bug leaves an uploaded file in the uploads directory that points tusd at a file outside it. The following script lists such files, along with the file each one points at. Save it as `check-tusd-uploads.py` and run it as root, passing your `LOCAL_UPLOADS_DIR` (by default `/home/zulip/uploads`): ```python #!/usr/bin/env python3 """Find .info files that tusd would read as an upload's metadata and that point its data file somewhere other than the upload itself. tusd stores each upload's metadata as "<upload path>.info", with Storage.Path set to "<upload path>". A file whose Storage.Path points anywhere else was planted, so this prints each such file and its target, and exits with status 1 if any were found. """ import json import os import sys import time uploads_dir = os.path.abspath(sys.argv[1] if len(sys.argv) > 1 else "/home/zulip/uploads") found = 0 scanned = 0 checked = 0 last_report = time.monotonic() for dirpath, dirnames, filenames in os.walk(uploads_dir): for filename in filenames: scanned += 1 if time.monotonic() - last_report >= 5: print(f"Scanned {scanned} files, checked {checked} .info files...", file=sys.stderr) last_report = time.monotonic() if not filename.endswith(".info"): continue info_path = os.path.join(dirpath, filename) if not os.path.isfile(info_path): continue checked += 1 try: with open(info_path, "rb") as f: target = json.load(f)["Storage"]["Path"] except (ValueError, TypeError, KeyError): # tusd can't use this as metadata. continue if not isinstance(target, str) or target == "": # tusd can't use this, or falls back to the upload's own path. continue upload_path = info_path.removesuffix(".info") if os.path.realpath(target) != os.path.realpath(upload_path): print(f"SUSPICIOUS: {info_path} points tusd at {target}", flush=True) found += 1 print( f"Done: scanned {scanned} files, checked {checked} .info files under {uploads_dir}.", file=sys.stderr, ) if found: print(f"Found {found} suspicious file(s); see the SUSPICIOUS lines above.") sys.exit(1) print("No suspicious files found.") ``` ```console $ python3 check-tusd-uploads.py /home/zulip/uploads ``` If it lists any files, the server may have been exploited. Delete the listed `.info` files: upgrading does not remove them, and they can still be used to append to and delete files on the upgraded server. If you have moved your uploads directory since upgrading to Zulip Server 10.0, the script also lists files that tusd recorded under the old location; these are harmless. A clean result does not strictly rule out exploitation, since the uploaded file may have been deleted after use. ### Zulip Cloud We found no evidence of exploitation on Zulip Cloud. ### References - [File upload backends](https://zulip.readthedocs.io/en/latest/production/upload-backends.html)
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | Zulip Server | >= 10.0, < 12.5 | 12.5 | Patch available | GHSA-f7qf-999g-f6h9 |
| — | Zulip Server | >= 13.0, < 13.3 | 13.3 | Patch available | GHSA-f7qf-999g-f6h9 |
- Zulip Server Vendor— Affected >= 10.0, < 12.5 Fixed in 12.5 Patch available GHSA-f7qf-999g-f6h9
- Zulip Server Vendor— Affected >= 13.0, < 13.3 Fixed in 13.3 Patch available GHSA-f7qf-999g-f6h9
Remediation
Upgrade Zulip Server to 12.5 for the 12.x line or to 13.3 for the 13.x line. Until upgrading, block access to /api/v1/tus and /api/v1/tus/ in nginx, which disables uploads from the Zulip web and desktop apps.
Written with Claude Haiku 5.5 from the sources below · 2026-11-19
- Fix · GHSA-f7qf-999g-f6h9 Zulip Server Fixed in 12.5 Advisory →
- Fix · GHSA-f7qf-999g-f6h9 Zulip Server Fixed in 13.3 Advisory →
Timeline
- 2026-11-19 Threatist record created from GHSA-f7qf-999g-f6h9
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences