Minimize security impact from mermaid XSS
Problem
The mermaid gem is a security problem and has caused numerous XSS - https://gitlab.com/gitlab-com/gl-security/appsec/appsec-team/-/issues/172
Two recent security issues
Impact
Even though these XSSes are security vulnerabilities in 3rd party library, which should be fixed upstream. We should also take considerable action to minimize its impact on gitlab.com and self hosted instances.
Ideas
- Render sanitized SVG
- Using sandboxed iframe
- Get rid of
mermaidand move to different vendor
Note
Edited by Dheeraj Joshi