Vulnerabilities/

LiquidJS's strip_html filter bypass via newline characters in HTML tags enables XSS

Severity:
Medium

Description

The strip_html filter in liquidjs is intended to remove HTML tags from a string before rendering, and is widely used as an XSS sanitizer. The implementation uses a regex whose catch-all branch (<.*?>) does not match line terminators, so any HTML tag containing a \n or \r character passes through unmodified.

Recommendation

No fix is available yet. Followings are affected versions:

References

Related Issues

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