Skip to content

User uploads proxied from S3 lack `Content-Security-Policy` headers, may be served with `Content-Disposition: inline`

Moderate
alexmv published GHSA-wm83-3764-5wqh Feb 7, 2023

Package

Zulip Server (Application)

Affected versions

main branch (2023-01-09)

Patched versions

main branch (2023-02-07)

Description

Impact

Users could upload files with arbitrary Content-Type which would be served from the Zulip hostname with Content-Disposition: inline and no Content-Security-Policy header, allowing them to trick other users into executing arbitrary Javascript in the context of the Zulip application. Among other things, this enables session theft.

Only deployments which use the S3 storage (not the local-disk storage) are affected, and only deployments which deployed 04cf68b (merged on January 9th), which has only been in main. This vulnerability does not affect any numbered release.

Workarounds

Switching from S3 storage to the local-disk storage would nominally mitigate this, but is likely more involved than upgrading to the latest main which addresses the issue.

Patches

The vulnerability was fixed in the main branch with commit 2f6c5a8. Users running a Zulip server from the main branch should upgrade from main again to deploy this fix.

Severity

Moderate
5.4
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

CVE ID

CVE-2023-22735

Weaknesses