Skip to content
Access control Disclosed report Beginner CVE-2020-8278

Improper access control to messages of Social app

The Social app's displayPost function lacks access controls, allowing an unauthenticated user to view any message content by knowing or guessing the message ID. An attacker could read private direct messages if they can determine the token value.

Roger Meyer Follow

Originally disclosed on HackerOne

Medium 5.0 View original
  • Triaged in 9 hours
  • Fixed in 4 months
  • Disclosed after 4 months

The Social App (https://apps.nextcloud.com/apps/social) lacks access controls in the displayPost function (/@{username}/{token}) allowing an unauthenticated user to view any message content by knowing or guessing the message ID.

The vulnerable code is at https://github.com/nextcloud/social/blob/97fb063479d4c0ad6fccdea3774601a619f8a886/lib/Controller/ActivityPubController.php#L367. Note the TODO comment and the lack of authentication and authorization checks.

The following is a sample curl request to access a direct (private) message (replace the host, username, and the token value):

curl -X 'GET' -H 'Accept: application/activity+json' 'http://{nextcloudHost}/apps/social/@{username}/{token}'|jq

The token value consists of digits only and is based on the unix time. An attacker would have to know or guess (e.g. brute force) this message ID.

Impact

An unauthenticated attacker can view any social message, including private (direct) messages from one user to another. The attacker would have to know or guess the token value.

The original report as published on HackerOne, by sanktjodel. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

Root cause

The displayPost function lacks authentication and authorization checks, as indicated by a TODO comment.

Impact

An unauthenticated attacker could view any social message, including private direct messages, if they know or guess the token value.

What the attacker needed

Know or guess the token value

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.

The Social app lets people post messages, including private ones. A part of the app that shows a single message does not check whether the person asking is allowed to see it. So anyone who can guess the message's identifier can read it, even without logging in.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Roger Meyer

View all

1 more disclosed report, best first.

More from Nextcloud

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.