Vulnerabilities in pkg:npm/novu/api

PACKAGE
Advisory Summary

GHSA-26wg-9xf2-q495 is a HIGH (CVSS 8.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Novu/api libraries in the npm ecosystem. The issue involves novu has a xss sanitization bypass. Remediation is available by upgrading affected packages to version 3.15.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/novu/api

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/novu/api. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-26wg-9xf2-q495 - HIGH Novu has a XSS sanitization bypass

GHSA-26wg-9xf2-q495 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-26wg-9xf2-q495
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Novu/api
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix GHSA-26wg-9xf2-q495

To remediate this vulnerability, upgrade all affected Novu/api dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

novu/api fixed: 3.15.0
npm install novu/api@3.15.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls novu/api

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-26wg-9xf2-q495, inspect your project dependencies using npm:

npm ls novu/api

Analyze the terminal output to locate any version of Novu/api in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.15.0), your application is affected.

Note: The npm ls novu/api command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Novu/api, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 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 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"> ``` 3. Wait a second and notice the XSS popup showing the current origin: <img width="1515" height="610" alt="image" src="https://github.com/user-attachments/assets/7d519a50-3bed-4f04-b78c-9c5938717433" /> 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.

GHSA-26wg-9xf2-q495 Affected Novu/api Versions

1 component(s)
Fixed Versions:
3.15.0
Product / Package Ecosystem Affected Versions Fixed Version
novu/api
npm
< 3.15.0
3.15.0

References

Frequently Asked Questions

What is GHSA-26wg-9xf2-q495?
GHSA-26wg-9xf2-q495 is a security vulnerability in Novu/api involving Novu has a XSS sanitization bypass under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Novu/api versions are affected?
Affected versions include releases prior to 3.15.0 across affected packages: novu/api.
What version fixes GHSA-26wg-9xf2-q495?
Upgrading to 3.15.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is novu/api affected?
Yes, novu/api is affected in releases prior to 3.15.0. Upgrade your dependency to 3.15.0 or later.
What is the CVSS score of GHSA-26wg-9xf2-q495?
GHSA-26wg-9xf2-q495 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with GHSA-26wg-9xf2-q495?
GHSA-26wg-9xf2-q495 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check npm dependencies for GHSA-26wg-9xf2-q495?
Run the dependency tree command: 'npm ls novu/api'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-26wg-9xf2-q495",
  "modified" : "2026-04-14T23:23:01Z",
  "published" : "2026-04-14T23:23:01Z",
  "aliases" : [ ],
  "summary" : "Novu has a XSS sanitization bypass",
  "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't detected. \n\nPS. there seems to also be another even more lax sanitizer here, but I wasn't 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<a oncontentvisibilityautostatechange=\"alert(window.origin)\" style=\"display:block;content-visibility:auto\">\n```\n\n3. Wait a second and notice the XSS popup showing the current origin:\n\n<img width=\"1515\" height=\"610\" alt=\"image\" src=\"https://github.com/user-attachments/assets/7d519a50-3bed-4f04-b78c-9c5938717433\" />\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's account. If the attacker has prepared an XSS payload there, they will now be allowed to view it, so it triggers.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "novu/api"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.15.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/novuhq/novu/security/advisories/GHSA-26wg-9xf2-q495"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/novuhq/novu"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-14T23:23:01Z",
    "nvd_published_at" : null
  }
}