Skip to content

fix: Fix add/edit task project event XSS vulnerability - EXO-86231#594

Merged
azayati merged 1 commit into
developfrom
merge-86231
Apr 29, 2026
Merged

fix: Fix add/edit task project event XSS vulnerability - EXO-86231#594
azayati merged 1 commit into
developfrom
merge-86231

Conversation

@azayati
Copy link
Copy Markdown
Member

@azayati azayati commented 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

)

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
@azayati azayati requested a review from Jihed525 April 29, 2026 10:45
@azayati azayati enabled auto-merge (squash) April 29, 2026 10:46
@sonarqubecloud
Copy link
Copy Markdown

@azayati azayati merged commit c169919 into develop Apr 29, 2026
9 checks passed
@azayati azayati deleted the merge-86231 branch April 29, 2026 10:52
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
ProjectDto projectDto = new ProjectDto();
projectDto.setId(project.getId());
projectDto.setName(project.getName());
projectDto.setName(HTMLSanitizer.sanitize(project.getName()));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@boubaker good catch, fixed here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants