Bug 2027229 (CVE-2021-41281)

Summary: CVE-2021-41281 matrix-synapse: remote overwrite vulnerability
Product: [Other] Security Response Reporter: Marian Rehak <mrehak>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED UPSTREAM QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: djc, fedora, V02460
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-29 07:51:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2026127, 2027230    
Bug Blocks:    

Description Marian Rehak 2021-11-29 07:20:56 UTC
Synapse instances with the media repository enabled can be tricked into downloading a file from a remote server into an arbitrary directory. The last 2 directories and file name of the path are chosen randomly by Synapse and cannot be controlled by an attacker, which limits the impact. Homeservers with the media repository disabled are unaffected. Homeservers with a federation whitelist are also unaffected, since Synapse will check the remote hostname, including the trailing `../`s, against the whitelist. Server administrators should upgrade to 1.47.1 or later. Server administrators using a reverse proxy could, at the expense of losing media functionality, may block the certain endpoints as a workaround. Alternatively, non-containerized deployments can be adapted to use the hardened systemd config.

Reference:

https://github.com/matrix-org/synapse/releases/tag/v1.47.1
https://github.com/matrix-org/synapse/security/advisories/GHSA-3hfw-x7gx-437c
https://github.com/matrix-org/synapse/commit/91f2bd090

Comment 1 Marian Rehak 2021-11-29 07:25:20 UTC
Created matrix-synapse tracking bugs for this issue:

Affects: fedora-all [bug 2027230]

Comment 2 Product Security DevOps Team 2021-11-29 07:51:21 UTC
This CVE Bugzilla entry is for community support informational purposes only as it does not affect a package in a commercially supported Red Hat product. Refer to the dependent bugs for status of those individual community products.