Vulnerabilities/

sanitize-html allowedTags Bypass via Entity-Decoded Text in nonTextTags Elements

Severity:
Medium

Description

Commit 49d0bb7 introduced a regression in sanitize-html that bypasses allowedTags enforcement for text inside nonTextTagsArray elements (textarea and option). Entity-encoded HTML inside these elements passes through the sanitizer as decoded, unescaped HTML, allowing injection of arbitrary tags including XSS payloads.

Recommendation

Update the sanitize-html package to the latest compatible version. Followings are version details:

References

Related Issues

Tags:
npm
sanitize-html
Anything's wrong? Let us know Last updated on April 16, 2026