Vulnerability library
Security checkJune 12, 2026

Apostrophe has default XSS via `xmp` raw-text passthrough in `sanitize-html`

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

High severitynpmsanitize-html

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

Under the default configuration, sanitize-html can turn attacker-controlled content inside a disallowed xmp element into live HTML or JavaScript. This is a sanitizer bypass in the default disallowedTagsMode: 'discard' path and can lead to stored XSS in applications that render sanitized output back to users.

Recommendation

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

  • Affected version(s): = 2.17.3
  • Patched version(s): 2.17.4

References

Could your website be exposed too?

SmartScanner can check your website for Apostrophe has default XSS via `xmp` raw-text passthrough in `sanitize-html` and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated June 12, 2026