Skip to content
File upload Disclosed report Intermediate CVE-2023-28833

Ability to control the filename when uploading a logo or favicon on theming

When uploading a logo or favicon in the theming settings, the filename could be controlled by modifying the request's key parameter. An attacker could therefore place files with arbitrary names in the web application and also learn the server path from an error message.

ctulhu Follow

Originally disclosed on HackerOne

  • Triaged in 14 hours
  • Fixed in 3 months
  • Paid in 3 months
  • Disclosed after 5 months

Summary by the program

Security advisory at https://github.com/nextcloud/security-advisories/security/advisories/GHSA-ch7f-px7m-hg25

The report

Summary:

Hello,

When uploading a logo or favicon the filename can be controlled by attacker since the key can be modified which serves as the filename.

Screenshot_from_2022-11-23_04-34-59.png
Screenshot_from_2022-11-23_04-34-59.png From the original on HackerOne
Screenshot_from_2022-11-23_04-19-22.png
Screenshot_from_2022-11-23_04-19-22.png
Screenshot_from_2022-11-23_04-36-27.png
Screenshot_from_2022-11-23_04-36-27.png

Due to an error the path is also disclosed

Screenshot_from_2022-11-23_04-40-24.png
Screenshot_from_2022-11-23_04-40-24.png From the original on HackerOne

Steps To Reproduce:

[add details for how we can reproduce the issue]

  1. go to http://localhost/settings/admin/theming
  2. upload a logo or favicon
  3. intercept the request using burp
  4. modify the key

Impact

The attacker can upload any files directly in the webapp and path disclosure. Combining both information can be useful in later attacks.

The original report as published on HackerOne, by ctulhu. 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 upload handler used a client-supplied key as the stored filename without validating or normalising it.

Impact

An attacker could upload files with attacker-chosen names directly into the web application and obtain a path disclosure, which the reporter suggests could help in later attacks.

What the attacker needed

Access to theming settings; ability to intercept HTTP requests

How it was found

  1. Open the theming settings page in the admin area.
  2. Upload a logo or favicon.
  3. Intercept the upload request with a proxy tool.
  4. Change the key value in the request.

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 theming settings let you upload a logo or favicon. The upload request has a field that names the file, and changing it changes the stored filename. This could let someone store files under chosen names and see the server path.

What is File upload?

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.

More by ctulhu

View all

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

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.