Skip to content
XSS Disclosed report Beginner

Stored XSS via Create Project (Add new translation project)

The Project Name field in Weblate did not validate or sanitise input, allowing a user with permission to change the project name to store an SVG payload with an onload handler. When any user, including an administrator, visited their profile page, the stored script executed in their browser.

th3_alchem1st Follow

Originally disclosed on HackerOne

Medium 4.7 View original
  • Fixed in 4 hours
  • Disclosed after 27 days

Hi, Input validation and/or sanitisation is not currently applied in the Project Name field in https://<domain>/create/project/. As, a result, it is possible to have a stored XSS that will affect all the users in the Weblate application. To identify this XSS I used the Docker environment from https://github.com/WeblateOrg/docker.

Steps to reproduce:

  1. Administrator creates a project and then adds a user in that project.
  2. Depending on permissions the user will login go to watched projects pick the project -> Manage -> Settings and will have the ability to change the Project Name. Here I changed it to <svg/onload=alert(document.domain)> and hit save.
  3. When the user visits his /accounts/profile/ page, he will trigger the Stored XSS.

I also found that even a user that doesn't have access to that project, but I guess the project is public, he will also get xss'ed. Furthermore, with this he also has the ability to xss the Admin, all the have to do is visit the /accounts/profile/ page.

So, this has the potential to affect all users.

Impact

Input validation and/or sanitisation on the Project Name field.

Please let me know if you require any additional information regarding this issue.

Thanks.

Attachments

xss-weblate.png
xss-weblate.png From the original on HackerOne

The original report as published on HackerOne, by th3_alchem1st. 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

Impact

Any user who viewed their profile page, including administrators, could have the stored script run in their browser, potentially affecting all users.

What the attacker needed

A user account with permission to edit project settings; victim visits their profile page

How it was found

  1. An administrator creates a project and adds a user to it.
  2. The user logs in, goes to watched projects, selects the project, opens Manage then Settings, and changes the Project Name to an SVG with an onload handler.
  3. The user visits their profile page, which triggers the stored XSS.

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 stored XSS flaw lets an attacker save malicious code into a website field, and that code later runs in other people's browsers. Here, the project name field accepted an SVG image with an onload handler, so when anyone opened their profile page the code ran.

What is XSS?

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

More from Weblate

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.