Skip to content

The same file cannot be opened with different rights

High
oanalavinia published GHSA-mvq3-xxg2-rj57 Nov 8, 2023

Package

maven com.xwiki.collabora:application-collabora (Maven)

Affected versions

>1.0

Patched versions

1.3

Description

Impact

As part of the application use cases, depending on the rights that a user has over a document, he should be able to open the office attachments files in view or edit mode. Right now, if a user opens an atachment file in edit mode in collabora, this right will be preserved for all future users, until the editing session is closes, even if some of them have only view right.

Steps to reproduce:

  1. Login with user1 that has edit access on Sandbox.TestPage1 and access the page
  2. Got to the Attachments tab
  3. Click on New office file and create the test.odt file
  4. Remain with the editor opened for editing this file
  5. From an incognito browser window, login with user2 that has view access on Sandbox.TestPage1 and access the page
  6. Go to the Attachments tab
  7. Click on the Collabora button next to the newly created test.odt file

Expected result:
The file is opened in view mode

Actual result:
The file is opened in edit mode. So, the first person that opens a file will mark the edit action for all future editors as long as the window is still opened. Because of this, if a user with view right will be the first to open a file, user with edit rights won't be able to edit it as long as the editor is opened.

Investigation
The problem comes from here. Collabora server is the one issuing this request and it seems that the userCanWrite query parameter is cached, even if, for example, token is not. But probably because it expects the token but no other parameters.

Patches

The issue has been fixed as part of Application Collabora 1.3 by 60c6e40

Workarounds

There are no known workarounds besides upgrading.

References

No references.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Physical
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

CVE ID

CVE-2023-46743

Weaknesses

No CWEs