{"answers":{"affected":"2 open source packages ship an affected version, including novu/api.","exploited":"There is no known exploitation of GHSA-26wg-9xf2-q495 in the wild and no public exploit code.","fix":"Upgrade novu/api to 3.15.0 or later.","what":"GHSA-26wg-9xf2-q495 is a cross-site scripting vulnerability in novu/api, published on 14 Apr 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-26wg-9xf2-q495 and fix it if it is affected.\n\nWhat it is: GHSA-26wg-9xf2-q495 is a cross-site scripting vulnerability in novu/api, published on 14 Apr 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-26wg-9xf2-q495 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- novu/api (npm): affected all versions; fixed in 3.15.0\n- novu/api (npm): affected all versions; fixed in 3.15.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-26wg-9xf2-q495/ (Markdown: https://insights.sbomify.com/GHSA-26wg-9xf2-q495/index.md)","id":"GHSA-26wg-9xf2-q495","markdown":"https://insights.sbomify.com/GHSA-26wg-9xf2-q495/index.md","name":"GHSA-26wg-9xf2-q495","record":{"aliases":[],"analysis":{"component_type":"web_application","fix_type":"patch","impacts":["code_execution","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"Novu notification platform","requires_auth":"low_privilege","summary":"Incomplete HTML sanitization in Novu allows attackers to inject malicious scripts via email previews, potentially leading to account takeover.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### 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\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's account. If the attacker has prepared an XSS payload there, they will now be allowed to view it, so it triggers.","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Novu has a XSS sanitization bypass","id":"GHSA-26wg-9xf2-q495","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["3.15.0"],"introduced":["0"],"last_affected":[],"package":"novu/api","purl":null,"source":"GHSA-26wg-9xf2-q495"},{"ecosystem":"npm","fixed":["3.15.0"],"introduced":["0"],"last_affected":[],"package":"novu/api","purl":"pkg:npm/novu/api","source":"GHSA-26wg-9xf2-q495"}],"products":null,"published":"2026-04-14","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Incomplete HTML sanitization in Novu allows attackers to inject malicious scripts via email previews, potentially leading to account takeover.","url":"https://insights.sbomify.com/GHSA-26wg-9xf2-q495/"}