Vulnerabilities/

TeleJSON: DOM XSS via unsanitised constructor name in `new Function()`

Severity:
Low

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:

References

Related Issues

Tags:
npm
telejson
Anything's wrong? Let us know Last updated on May 20, 2026