Skip to content
XSS Disclosed report Beginner CVE-2016-9468

Content (Text) Injection at NextCloud Server 9.0.52 - via http://custom_nextcloud_url/remote.php/dav/files/

The Nextcloud server reflects unvalidated text from the URL path into the error page, allowing an attacker to craft a link that displays a convincing message to a victim. The attacker could use this to trick a user into visiting a fake domain or contacting a fake email address.

abcdefghijklmnopqrstuvwxyzabc Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 3 months
  • Paid in 3 months
  • Disclosed after 5 months

Dear Next Cloud Security Team,

I would like to report an issue. This is not a critical issue since the affect and not even "touch" something sensitive that stored at the server via the application. As a summary, this is issue need the user interaction for exploiting the "target". So, based on this simple summary, I put it as a "Design Issue".

I. Introduction

Generally, Content (which is Text in this case) Injection is an Attack that using the missing input validation at an trusted URL or even form in the specific web application. Usually, this attack can work with the non-aware user that targeted as a victim. In short, based on OWASP, this attack is typically used as, or in conjunction with, social engineering because the attack is exploiting a code-based vulnerability and a user's trust. .

II. Summary of the Issue

As described above, the issue could allow the Attacker inject any "very convince" message via the URL that not give the "total" validation of the input yet. Please kindly note, I put the word of "total" because the validation is only for "/" character. .

III. Situation and Condition

3.1. The location of this affected URL could be found in 2 (two) different URL, which is: http://nextcloud_custom_URL/remote.php/dav/files/<Inject_here> and http://nextcloud_custom_URL/remote.php/dav/files/<registered_user>/<Inject_here> 3.2. As an information, one of those URL will works if we know the registered user at the application (noted with <registered_user>) in the sub point #3.1. 3.3. Both of those URL need the different "convince word" to gaining the "user's trust". .

IV. Proof of Concept

The proof of concept isn't that hard. The victim just need to visit one of those 2 (two) URL with "convince" word. For example: 4.1. http://nextcloud_custom_URL/remote.php/dav/files/nxtgrpone2/The%20location%20of%20the%20files%20are%20moved%20to%20another%20url%20that%20could%20be%20found%20at%20fakenextcloud.com%20domain.%20Please%20visit%20the%20file%20at%20those%20new%20location%20with%20%22sample%20fake%20file.txt%22 --> please see the "1st URL.png" as reference.

4.2. http://localhost/nextcloud/remote.php/dav/files/of%20yoko%20is%20removed%20in%20this%20old%20server.%20Please%20kindly%20visit%20the%20the%20new%20server%20with%20the%20same%20username%20at%20fakenextcloud.com%20domain.%20Please%20contact%20us%20again%20in%[email protected]%20if%20you%20get%20the%20same%20error%20again,%20which%20is%20files --> please see the "2nd URL.png" as reference. .

V. Recommendation

5.1. Well, even it will be a classic looks and sounds, giving the validation of the input at those affected URL will minimize the risk. In this case, every invalid input should be redirected to custom URL; 5.2. The second one, related the URL that affected "if" Attacker knows the registered user, then it would be good if the user enumeration is disable. .

Best Regard,

YoKo

Attachments

1st_URL.png
1st_URL.png From the original on HackerOne
2nd_URL.png
2nd_URL.png

The original report as published on HackerOne, by abcdefghijklmnopqrstuvwxyzabc. 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 reflects the URL path into the error page without proper validation or encoding, only blocking the slash character.

Impact

An attacker could trick a user into visiting a fake domain or contacting a fake email address, but the attack requires user interaction and does not directly compromise sensitive data.

What the attacker needed

Victim clicks a crafted link; attacker knows a registered username (for one URL variant)

The fix

The application should validate and encode all input reflected in error pages, redirecting invalid input to a custom URL, and disable user enumeration.

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 type a web address, the server sometimes shows an error page that includes part of the address you typed. Here, the server did not check what was in that part, so an attacker could put a fake message in the address. If a victim clicks the link, they see the attacker's message on the real Nextcloud site, which makes the trick more believable.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by abcdefghijklmnopqrstuvwxyzabc

View all

1 more disclosed report, 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.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.