fix: Fix add/edit task project event XSS vulnerability - EXO-86231#594
Merged
Conversation
) Prior to this change, when creating or editing a task project, a JavaScript payload inserted in the name field could be executed when the task project is deleted, leading to an XSS vulnerability. After this commit, the name value is sanitized using HTMLSanitizer.sanitize when getting the project dto, preventing the XSS vulnerability. Resolves Meeds-io/si#11
|
Jihed525
approved these changes
Apr 29, 2026
exo-swf
pushed a commit
that referenced
this pull request
Apr 29, 2026
) Prior to this change, when creating or editing a task project, a JavaScript payload inserted in the name field could be executed when the task project is deleted, leading to an XSS vulnerability. After this commit, the name value is sanitized using HTMLSanitizer.sanitize when getting the project dto, preventing the XSS vulnerability. Resolves Meeds-io/si#11
boubaker
reviewed
May 7, 2026
| ProjectDto projectDto = new ProjectDto(); | ||
| projectDto.setId(project.getId()); | ||
| projectDto.setName(project.getName()); | ||
| projectDto.setName(HTMLSanitizer.sanitize(project.getName())); |
Member
There was a problem hiding this comment.
Suggested change
| projectDto.setName(HTMLSanitizer.sanitize(project.getName())); | |
| projectDto.setName(project.getName()); |
As reminded here:
Please ensure to not workaround the best practice that we adopted since the beginning: don't alter user data when saving , but sanitize the data on display only. If there is an executable JS to purify, please ensure that it's considered here (Html rendering), here (Html rendering) and here (For Email notifs especially)
In other terms, the architectural choice made is: Sanitize OnRead from DB and not altering data OnWrite on DB.
There are centralized Sanitizers, adapt them globally instead of making the modification in each html apart.
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Prior to this change, when creating or editing a task project, a JavaScript payload inserted in the name field could be executed when the task project is deleted, leading to an XSS vulnerability. After this commit, the name value is sanitized using HTMLSanitizer.sanitize when getting the project dto, preventing the XSS vulnerability.
Resolves Meeds-io/si#11