Skip to content

Improper Access Control in Onionshare

Moderate severity GitHub Reviewed Published Jan 18, 2022 in onionshare/onionshare • Updated Jan 29, 2023

Package

pip onionshare-cli (pip)

Affected versions

>= 2.3, < 2.5

Patched versions

2.5

Description

Between September 26, 2021 and October 8, 2021, Radically Open Security conducted a penetration test of OnionShare 2.4, funded by the Open Technology Fund's Red Team lab. This is an issue from that penetration test.

  • Vulnerability ID: OTF-009
  • Vulnerability type: Improper Access Control
  • Threat level: Low

Description:

Authenticated users (or unauthenticated in public mode) can send messages without being visible in the list of chat participants.

Technical description:

Prerequisites:

  • Existing chatroom
  • Access to the chatroom (Public or known Private Key)
  • Either a modified frontend client or manual requests from burp/curl

If a user opens the chatroom without emitting the join message he will not be present in session.users[x] list. Therefore there is no listing in the frontend and no chat participant knows another party joined the chat. It is still possible to send messages in the chatroom.

If a user decides to abuse OTF-003 (page 22) he can impersonate messages from existing users; others would not be able to distinguish original and faked messages. This is also a prerequisite for OTF-004 (page 19).

Impact:

An adversary with access to the chat environment can send messages to the chat without being visible in the list of chat participants.

Recommendation:

  • Allow chat access only after emission of the join event.
  • Implement proper session handling.

References

@micahflee micahflee published to onionshare/onionshare Jan 18, 2022
Published by the National Vulnerability Database Jan 18, 2022
Reviewed Jan 19, 2022
Published to the GitHub Advisory Database Jan 21, 2022
Last updated Jan 29, 2023

Severity

Moderate

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
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

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:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N

EPSS score

0.061%
(27th percentile)

Weaknesses

CVE ID

CVE-2022-21695

GHSA ID

GHSA-99p8-9p2c-49j4

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.