GHSA-26WG-9XF2-Q495
Vulnerability from github – Published: 2026-04-14 23:23 – Updated: 2026-04-14 23:23Summary
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
Sanitization is implemented here: https://github.com/novuhq/novu/blob/next/libs/application-generic/src/services/sanitize/sanitizer.service.ts
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
- Create a new workflow and add an Email step
- In the body, write the following HTML code:
<a oncontentvisibilityautostatechange="alert(window.origin)" style="display:block;content-visibility:auto">
- Wait a second and notice the XSS popup showing the current origin:
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.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "novu/api"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.15.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-14T23:23:01Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "### Summary\n\nXSS sanitization is incomplete, some attributes are missing such as `oncontentvisibilityautostatechange=`. This allows for the email preview to render HTML that executes arbitrary JavaScript,\n\n### Details\n\nSanitization is implemented here:\nhttps://github.com/novuhq/novu/blob/next/libs/application-generic/src/services/sanitize/sanitizer.service.ts\n\nWith `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:\nhttps://portswigger.net/web-security/cross-site-scripting/cheat-sheet\nAnd found that the `oncontentvisibilityautostatechange=` attribute isn\u0027t detected. \n\nPS. there seems to also be another even more lax sanitizer here, but I wasn\u0027t able to figure out where it is used:\nhttps://github.com/novuhq/novu/blob/next/packages/framework/src/utils/sanitize.utils.ts\n\n### PoC\n\n1. Create a new workflow and add an *Email* step\n2. In the body, write the following HTML code:\n\n```html\n\u003ca oncontentvisibilityautostatechange=\"alert(window.origin)\" style=\"display:block;content-visibility:auto\"\u003e\n```\n\n3. Wait a second and notice the XSS popup showing the current origin:\n\n\u003cimg width=\"1515\" height=\"610\" alt=\"image\" src=\"https://github.com/user-attachments/assets/7d519a50-3bed-4f04-b78c-9c5938717433\" /\u003e\n\nhttps://dashboard.novu.co/env/dev_env_gVtdgDEhgf1CetwX/workflows/onboarding-demo-workflow_wf_gVtdh2uV0h7j3ffK/steps/email-step_st_gVtqdgIrOkYVvP9F/editor\n\n### Impact\n\nThis 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.\nAn 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\u0027s account. If the attacker has prepared an XSS payload there, they will now be allowed to view it, so it triggers.",
"id": "GHSA-26wg-9xf2-q495",
"modified": "2026-04-14T23:23:01Z",
"published": "2026-04-14T23:23:01Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/novuhq/novu/security/advisories/GHSA-26wg-9xf2-q495"
},
{
"type": "PACKAGE",
"url": "https://github.com/novuhq/novu"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Novu has a XSS sanitization bypass"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.