Social App does not validate server certificates for outgoing connections
The Social App disabled TLS certificate verification for outgoing connections to other ActivityPub servers. An attacker in a privileged network position could impersonate a server with a self-signed certificate and intercept or alter the traffic.
Originally disclosed on HackerOne
- Triaged in 32 hours
- Fixed in 4 months
- Disclosed after 4 months
The Social App (https://apps.nextcloud.com/apps/social) does not validate the server TLS certificate for connections to other ActivityPub servers. These connections are used to retrieve the public key for a user or posting a message to another ActivityPub server. The public key for a user is used to validate the ActivityPub user.
The vulnerable code is at https://github.com/daita/my-small-php-tools/blob/d8778803612af20699c7efb0637bfe62478e596c/lib/Traits/TRequest.php#L151. The initRequest method disables verifying of the peer's certificate by setting CURLOPT_SSL_VERIFYPEER to FALSE. This code is called from CurlService.php (https://github.com/nextcloud/social/blob/97fb063479d4c0ad6fccdea3774601a619f8a886/lib/Service/CurlService.php#L265).
This issue has been tested on Nextcloud version version 19.0.0.12 with Social version 0.3.1.
Impact
An attacker can perform a man-in-the-middle attack by impersonating the victim server by using a self-signed TLS certificate. The attacker would have to be in a privileged network position between the Nextcloud instance and the target ActivityPub server.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker in a privileged network position could perform a man-in-the-middle attack by impersonating the victim server with a self-signed certificate.
What the attacker needed
Privileged network position between servers
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When one computer talks securely to another, it checks a digital certificate to confirm it is talking to the right server. This app turned that check off, so someone who can sit on the network path could pretend to be the real server and the app would not notice.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.