Skip to content
Crypto Disclosed report Beginner CVE-2023-39954

App stores client secret unencrypted in database

The Nextcloud server stores its OAuth client secret in plain text in the database. An attacker with read-only access to a database snapshot could impersonate the Nextcloud server.

rullzer Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 40 days
  • Disclosed after 3 months

Summary by the program

https://github.com/nextcloud/security-advisories/security/advisories/GHSA-3f92-5c8p-f6gq

The report

To identify the nextcloud server need to have the client id and the client secret. The id is public but the secret is not. Currently this is stored in plain text in the database. Here you can't use hashing as you need the actual value. But Nextcloud should at the very least make sure that this data is properly encrypted at rest in the database.

Impact

An attacker that obtains read only access to (a snapshot of) the database can impersonate the Nextcloud server without issues

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

Impact

An attacker with read-only access to a database snapshot could impersonate the Nextcloud server.

What the attacker needed

Read-only access to a database snapshot

The fix

The secret should be encrypted at rest in the database, since hashing is not possible because the actual value is needed.

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.

A client secret is like a password that proves a server's identity to another service. Here it was saved without encryption, so anyone who could read the database could steal it and pretend to be the server.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

More by rullzer

View all

9 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.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.