Skip to content
XSS Disclosed report Beginner CVE-2023-48301

HTML injection in search UI when selecting a circle with HTML in the display name

A low-privilege user could put HTML markup into a Circle's display name, and the search interface rendered it without encoding. When an admin viewed the shared-with-circles list, the injected meta refresh tag made the browser redirect to an attacker-chosen site.

cx75fa Follow

Originally disclosed on HackerOne

  • Triaged in 10 hours
  • Fixed in 11 days
  • Paid in 15 days
  • Disclosed after 36 days

Summary by the program

Security advisory at https://github.com/nextcloud/security-advisories/security/advisories/GHSA-wgpw-qqq2-gwv6

The report

HTML injection is a web security issue where attackers insert harmful code into a web application, affecting how it appears and functions. This can lead to data theft, phishing, malware distribution, and session hijacking, posing significant risks to users and the application's integrity. Prevention involves thoroughly checking and encoding user-generated content to ensure it's safe for rendering in web pages.

Reproduction Steps:

  1. Log in to the application using a low-privilege user account.
  2. Access the "Contacts" section and initiate the creation of a new Circle.
  3. When naming the Circle, insert the following payload: <meta http-equiv="refresh" content="2; https://evil.com/" />.
  4. Share the Circle with a user account having an "Admin" role.
  5. Switch to the "Admin" user role and go to "Files" > "Shared with Circles."
  6. Observe that the browser will redirect to a malicious website within a 2-second timeframe.

Video POC :

HTMLInjection.mp4 From the original on HackerOne

Impact

HTML injection can have significant impacts, including:

Data theft Phishing attacks Malware distribution Session hijacking These consequences can harm both users and the application's security.

The original report as published on HackerOne, by cx75fa. 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 Circle display name was inserted into the search UI page without HTML encoding, so markup in the name was rendered as active HTML.

Impact

An attacker could redirect an admin to a malicious site, which may support phishing or data theft; the report does not show script execution, only a redirect.

What the attacker needed

A low-privilege account; ability to create and share a Circle; victim is an admin who opens the list

The fix

User-generated content such as Circle names should be checked and encoded before it is rendered in web pages.

How it was found

  1. Log in with a low-privilege account.
  2. Create a new Circle in the Contacts section.
  3. Set the Circle name to HTML that triggers a redirect.
  4. Share the Circle with an admin account.
  5. As the admin, open Files and then Shared with Circles.
  6. Watch the browser redirect to the attacker's site after about two seconds.

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 Circle is a group of contacts in this app. The app showed the group's name on a page without cleaning it first, so text that looked like a web page instruction was treated as real code. That let a normal user plant a redirect that fired for an admin who simply opened a list.

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 cx75fa

View all

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

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.