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.
- 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:
- Log in to the application using a low-privilege user account.
- Access the "Contacts" section and initiate the creation of a new Circle.
- When naming the Circle, insert the following payload:
<meta http-equiv="refresh" content="2; https://evil.com/" />. - Share the Circle with a user account having an "Admin" role.
- Switch to the "Admin" user role and go to "Files" > "Shared with Circles."
- Observe that the browser will redirect to a malicious website within a 2-second timeframe.
Video POC :
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.
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
- Log in with a low-privilege account.
- Create a new Circle in the Contacts section.
- Set the Circle name to HTML that triggers a redirect.
- Share the Circle with an admin account.
- As the admin, open Files and then Shared with Circles.
- 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.