Lucene search

K
huntrKevin-mizu125791B6-3A68-4235-8866-6BC3A52332BA
HistorySep 13, 2022 - 2:52 p.m.

XSS via Mathematical Typesetting

2022-09-1314:52:14
kevin-mizu
www.huntr.dev
19
mathematical typesetting
asciimath
latex
xss
bug bounty
security risk
javascript wrapper

0.001 Low

EPSS

Percentile

30.2%

🔒️ Requirements

Feature: Extras > Mathematical Typesetting enabled.

User interaction: Access vulnerable page || diagram and wheel click on a link.

📝 Description

The Mathematical Typesetting feature allows to use inline content such as AsciiMath or LaTeX. Using it allows you to create a tag via \href macro. By default, it allows you to use dangerous wrappers like javascript: which permits on click XSS. (wheel click in draw.io context)

🕵️‍♂️ Proof of Concept

Step 1: Enable Mathematical Typesetting.

math.png

Step 2: Copy | Past $$\href{javascript:alert()}{CLICK}$$ in the diagram.

link.png

Step 3: Wheel click on the link.

xss.png

Check Requierements section if it’s not working.

🛠️ Fix suggestion

Use ui/safe extension which prevents several security risks such as javascript wrapper in the href attribute.

0.001 Low

EPSS

Percentile

30.2%

Related for 125791B6-3A68-4235-8866-6BC3A52332BA