GHSA-w9m4-7w72-r766

    Dashboard / Vulnerabilities / GHSA-w9m4-7w72-r766

    GHSA-w9m4-7w72-r766

    Published: 21 Jan 2022Last Modified: 7 Oct 2024

    Summary: Improper Access Control in Onionshare

    Details: Between September 26, 2021 and October 8, 2021, [Radically Open Security](https://www.radicallyopensecurity.com/) conducted a penetration test of OnionShare 2.4, funded by the Open Technology Fund's [Red Team lab](https://www.opentech.fund/labs/red-team-lab/). This is an issue from that penetration test. - Vulnerability ID: OTF-004 - Vulnerability type: Improper Access Control - Threat level: Moderate ## Description: Chat participants can spoof their channel leave message, tricking others into assuming they left the chatroom. ## Technical description: ![otf-004-a](https://user-images.githubusercontent.com/156128/140665619-e51cfac0-a60a-4c2f-9c8e-be26066e6f3f.png) ![otf-004-b](https://user-images.githubusercontent.com/156128/140665620-5d7c2770-c83f-4925-8912-f2849071a3b0.png) ![otf-004-c](https://user-images.githubusercontent.com/156128/140665622-78a71ace-c483-4b16-b205-481aafe7ff87.png) This series of screenshots show Alice, Bob and Eve joined a chatroom and are the only participants in the chatroom. Eve seemingly leaves the chatroom, which leads Bob and Alice to believe they are having a private chat. The last screenshot shows that Eve only emitted the leave message and is still able to read the chat and possibly write messages. This can be reproduced by joining the chat with two different instances, where one instance has slightly modified the client-side JavaScript code similar to OTF-003 (page 22). The joined emit needs to be removed from the connect event handler. Therefore the modified client is not listed in the userlist and has no active session. The modified non-listed user also needs to change their username to Eve, which is not shown in the chatroom. The modified client then emits the disconnect event and their connection is no longer usable. This results in the leave message for Eve and the removal from the user-list but not in removal of the original session of the Eve who announced to join the chat. ## Impact: An adversary with access to the chat environment can spoof his leave event but still persist in the chat with access to all sent messages and the possibility to write in the chat using OTF-003 (page 22). ## Recommendation: - Implement proper session handling

    Affected packages

    Package

    Name: onionshare-cli

    Purl: pkg:pypi/onionshare-cli

    Affected ranges

    Type: ECOSYSTEM

    Events:

    Introduced- 2.3
    Fixed -2.5

    Affected versions

    2.3
    2.3.1
    2.3.2
    2.3.3

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    GHSA-w9m4-7w72-r766 | CVE-DB