Description
SVG XSS is possible if a server that does not set up CSP properly provides a page that uses Babylonjs GUI.Image.
Environment
- Server doesn't set proper CSP
- javascript in SVG
Example
SVG XSS example
localhost Server Code
from flask import Flask
from flask_cors import CORS
import time
app = Flask(__name__)
CORS(app)
if __name__ == '__main__':
app.run(host='0.0.0.0', port=54321)

Improvement
When Babylonjs' image loader parses svg, tags other than those related to svg should not be executed after parsing such as <link> or <img> tag