Skip to content
Info disclosure Disclosed report Beginner CVE-2022-39339

[user_oidc] Unencrypted Communications

The user_oidc app allowed OpenID Connect providers to be configured with plain HTTP URLs, so sensitive values such as the client secret and tokens were sent unencrypted. An attacker able to observe that traffic could read those credentials and tokens.

lauritz Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 47 days
  • Disclosed after 4 months

The OpenID Connect User Backend allows users to login to Nextcloud using SSO and is - according to the policy - part of the main scope of this program. The implementation supports plain HTTP without TLS and transfers sensitive information such as OIDC client_secrets in an unencrypted manner.

According to the OpenID Connect specification, "to protect against information disclosure and tampering, confidentiality protection MUST be applied using TLS with a ciphersuite that provides confidentiality and integrity protection".

I did not find anything related to this within your threat model (which is unavailable at the moment btw. - therefore I am referring to this snapshot: https://web.archive.org/web/20220320042405/https://nextcloud.com/security/threat-model).

Steps to reproduce

  1. Setup Nextcloud using the docker image:
CONSOLE
docker run -p 8081:80 nextcloud:latest
  1. Enable user_oidc module via http://localhost:8081/settings/apps/integration/user_oidc
  2. Configure plugin via http://localhost:8081/settings/admin/user_oidc - add a provider with arbitrary identifier, client_id and client_secret. Include a burp collaborator URL with http:// scheme:
unencrypted_communication.png
unencrypted_communication.png From the original on HackerOne
  1. In a private window, visit http://localhost:8081/login an click the login button "test".
  2. Observe incoming request using plain HTTP:
unencrypted_communication2.png
unencrypted_communication2.png From the original on HackerOne

In a working SSO setup, sensitive information such as the client_secret is sent in plain text by Nextcloud, as can be seen in the following screenshot (Token Request issued by Nextcloud):

unencrypted_communication3.png
unencrypted_communication3.png From the original on HackerOne

Fix

The user_oidc should enforce HTTPS in its default configuration.

Impact

Sensitive information such as the OIDC client credentials and tokens are sent in plain text of HTTP without TLS.

The original report as published on HackerOne, by lauritz. 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 app did not enforce HTTPS for configured OpenID Connect provider endpoints, so plain HTTP URLs were accepted and used for token requests.

What the attacker needed

Admin access to configure the provider; provider configured with an HTTP URL; attacker can observe the network traffic

The fix

The user_oidc app should enforce HTTPS in its default configuration.

How it was found

  1. Set up a Nextcloud instance from the docker image.
  2. Enable the user_oidc app.
  3. Add a provider with an identifier, client ID and client secret, using an HTTP URL for the provider.
  4. Open the login page in a private window and click the test login button.
  5. Observe the outgoing request arriving over plain HTTP.

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 you log in through a single sign-on provider, the app has to talk to that provider over the network. If that conversation uses plain HTTP instead of HTTPS, anyone who can watch the network can read everything in it, including the secret the app uses to prove who it is. The report says this app allowed such plain HTTP connections.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by lauritz

View all

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

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.