PT-2026-35092 · Npm · Novu/Api

Published

2026-04-14

·

Updated

2026-04-14

CVSS v3.1

8.1

High

VectorAV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

Summary

XSS sanitization is incomplete, some attributes are missing such as oncontentvisibilityautostatechange=. This allows for the email preview to render HTML that executes arbitrary JavaScript,

Details

With allowedAttributes: false, all attributes are allowed through sanitize-html. Even dangerous ones like oncontentvisibilityautostatechange=. The DANGEROUS ATTRIBUTES array tries to handle this by denying more attributes after the fact, but this list is incomplete. I copied all well-known payloads from: https://portswigger.net/web-security/cross-site-scripting/cheat-sheet And found that the oncontentvisibilityautostatechange= attribute isn't detected.
PS. there seems to also be another even more lax sanitizer here, but I wasn't able to figure out where it is used: https://github.com/novuhq/novu/blob/next/packages/framework/src/utils/sanitize.utils.ts

PoC

  1. Create a new workflow and add an Email step
  2. In the body, write the following HTML code:
html
<a oncontentvisibilityautostatechange="alert(window.origin)" style="display:block;content-visibility:auto">
  1. Wait a second and notice the XSS popup showing the current origin:
image
https://dashboard.novu.co/env/dev env gVtdgDEhgf1CetwX/workflows/onboarding-demo-workflow wf gVtdh2uV0h7j3ffK/steps/email-step st gVtqdgIrOkYVvP9F/editor

Impact

This may look like a Self-XSS similar to https://github.com/novuhq/novu/security/advisories/GHSA-w8vm-jx29-52fr, but it can be more impactful. First of all, if multiple users can access this dashboard, the link above can directly bring the to the email step editor to trigger the XSS. An attacker can also use the Google/GitHub OAuth flows without completing the code callback step, and send that URL to the victim to intentionally log the vicitm into the attacker's account. If the attacker has prepared an XSS payload there, they will now be allowed to view it, so it triggers.

Fix

XSS

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

GHSA-26WG-9XF2-Q495

Affected Products

Novu/Api