Description
telejson versions prior to 6.0.0 (released 2022) are vulnerable to DOM-based Cross-Site Scripting (XSS) through unsafe deserialisation. Attacker-controlled input from the _constructor-name_ property in parsed JSON is passed directly to new Function() without sanitisation, allowing arbitrary JavaScript execution.
Recommendation
Update the telejson package to the latest compatible version. Followings are version details:
- Affected version(s): < 6.0.0
- Patched version(s): 6.0.0
References
Could your website be exposed too?
SmartScanner can check your website for TeleJSON: DOM XSS via unsanitised constructor name in `new Function()` and gives you actionable findings to investigate.
Start a free scanRelated Issues
- CleverTap Web SDK is vulnerable to DOM-based XSS via handleCustomHtmlPreviewPostMessageEvent function - CVE-2026-26861
- Unhead has XSS bypass in `useHeadSafe` via attribute name injection and case-sensitive protocol check - CVE-2026-31860
- SCEditor has DOM XSS via emoticon URL/HTML injection - CVE-2026-25581
- SunEditor Embed Plugin has DOM XSS via External Script Element After Iframe Embed - CVE-2026-54606


