Zulip Server 12.5 security release
Mateusz ManderaWe released Zulip Server 12.5 today! This is a security release, fixing a critical security issue (GHSA-f7qf-999g-f6h9) and two other security issues. It also makes OpenID Connect logins use PKCE. Zulip Server 13.3, also released today, fixes the same security issues.
Zulip Server 13.0 was released just a week ago, and many installations will need some time to prepare for upgrading to a new major release. Given the severity of GHSA-f7qf-999g-f6h9, we didn’t want those installations to have to rush a major upgrade to get these fixes, so we’re also publishing them for the 12.x series. This is an exception: as described in our release lifecycle documentation, we generally don’t backport fixes to previous release series, so we recommend planning your upgrade to Zulip Server 13.x.
We have requested CVE IDs for these issues, but they have not yet been assigned. Each issue is instead referenced below by its GitHub security advisory.
Upgrading
We strongly recommend that all installations running Zulip Server 12.x upgrade to this new release as soon as possible, or directly to Zulip Server 13.3. See the upgrade instructions in the Zulip documentation. Zulip Cloud has already been upgraded with the improvements in this release.
Zulip Server 10.x and 11.x are affected too, and are no longer supported, so installations running them should upgrade to 13.3.
Commercial support for server upgrades is available for installations that purchase a Business or Enterprise plan. For community support, everyone is welcome to drop by the Zulip development community.
GHSA-f7qf-999g-f6h9: Arbitrary file access through file uploads.
Since Zulip Server 10.0, the Zulip web and desktop apps upload files through
tusd, a resumable upload server that Zulip runs alongside the Zulip server. With
the default
LOCAL_UPLOADS_DIR backend,
which stores uploaded files in a directory on the Zulip server, tusd keeps its
own internal records about each upload in that same directory. tusd 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.
As a result, any user with an account in any organization on the server,
including guests, could make the server read, append data to, or delete
arbitrary files that the zulip system user can access. This could be used to
obtain the server’s secrets and to run arbitrary code on the server, giving the
attacker full control of the server and the data of all of its organizations.
This bug affects Zulip Server 10.0 through 12.4, and 13.0 through 13.2, on servers that store uploaded files on local disk, which is the default for self-hosted installations. Servers that store uploaded files in S3 are not affected, and neither is Zulip Cloud.
If you cannot upgrade immediately, you can prevent exploitation by blocking access to tusd, as described in the advisory. This disables uploading files from the web and desktop apps until you upgrade.
After upgrading, check whether your server was exploited using the script in the advisory. Upgrading does not remove files left behind by an attack, and those can still be used to append to and delete files on the upgraded server, so delete any files the script lists.
This vulnerability was reported by Thibault Herard (@ThibHrrd) of OWN.
Notable changes
- GHSA-f7qf-999g-f6h9: Arbitrary file access through file uploads.
- GHSA-6c7c-7xjc-qm48: Any user, including guests, could obtain a copy of a file uploaded by another user, including one in another organization on the same server, if they knew the file’s URL. They did not need access to the message the file was shared in. This affected files uploaded through the resumable upload API, which the web and desktop apps use for all uploads.
- GHSA-2fx7-3vcm-hg62: On servers that allow importing from Slack while creating an organization, anyone could obtain the confirmation link of a person creating an organization that way, and take over that organization, including its imported data. Users with an account on the server could also delete another person’s uploaded Slack export, or obtain a copy of it (on local disk, even while it was still uploading). Importing from Slack while creating an organization is disabled by default on self-hosted servers.
- OpenID Connect logins now always use PKCE. If your identity provider rejects
PKCE for Zulip’s client, enable PKCE for that client, or set
SOCIAL_AUTH_OIDC_USE_PKCE = Falsein/etc/zulip/settings.pyto turn it off for all OpenID Connect providers. Turning it off is not recommended, because PKCE protects against an authorization code injection attack caused by apython-social-authbug (GHSA-h2r5-x5m7-3935).
Community
We love feedback from the Zulip user community. Here are a few ways you can connect:
- Join chat.zulip.org and provide feedback directly to the development community!
- Follow us on LinkedIn, Mastodon, or Bluesky, or join our announcement mailing list.