Skip to content
Access control Disclosed report Beginner

Trusted server shared secret stored unencrypted in the database

Trusted server shared secret tokens are stored in plain text in the database table. If an attacker obtains the database, they can read these tokens and continue syncing down address books from trusted servers.

rtod Follow

Originally disclosed on HackerOne

  • Disclosed after 53 days

The attack vector here is that somebody gets their hands on your database.

When two servers have added each other as trusted server they exchange shared secret token. With this token they can sync down each other user lists.

However it seems that this token is stored in plain text in the oc_trusted_servers table. This seems especially odd since you do store credentials for external storage encrypted in the database. Simply encrypting the shared secret in the database would help.

Impact

If the database of a system is compromised the attacker can easily obtain the token of any trusted server. And keep syncing down the address book with that.

The original report as published on HackerOne, by rtod. 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

Likely the application stores the trusted server shared secret as plain text instead of encrypting it at rest, unlike other credentials it already encrypts.

Impact

If the database is compromised, an attacker could obtain the token of any trusted server and keep syncing down the address book with it.

What the attacker needed

Database compromise

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.

Two servers can trust each other and share a secret token so they can copy each other's user lists. This report says that secret token is saved in the database without any protection, so anyone who steals a copy of the database can read it and use it to keep copying the user lists.

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 rtod

View all

33 more disclosed reports, 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.