{"incident":{"slug":"novu-nov-2026-lagging-region-handlebars-clerk-keys","caseId":"BI-2026-050","organization":"Novu","title":"Novu: Lagging UK region hit by Handlebars RCE, exposing 23,534 organizations’ keys","shortSummary":"Forty hours after Novu patched US and EU to v3.20.0, an attacker exploited Handlebars 4.7.9 in the lagging UK region, grabbed cross-region cloud credentials and Clerk keys, and read environment API keys and provider credentials for 23,534 organizations in 75 minutes while an unrouted alert sat unseen for five hours.","lede":"On November 17, 2026 at 10:05 UTC, notification platform Novu deployed v3.20.0 to its US and EU cloud regions to patch a critical Handlebars template compiler vulnerability. Five smaller regions (UK, Japan, South Korea, Singapore, and Australia) stayed behind on the previous build. Roughly forty hours later, at 01:42 UTC on November 19, an attacker created self-service accounts in the lagging regions, sent a crafted template to the UK email preview endpoint, and ran code on the API server. That single UK server held cloud credentials able to read internal secrets across every region, handing the attacker US and EU Clerk secret keys and a Cloudflare Worker deploy token. In seventy-five minutes, the attacker opened 23,534 customer organizations (about 56% of Novu Cloud) and read environment API keys and integration provider credentials while a high-severity cloud alert fired ten minutes in and failed to page on-call for over five hours.","incidentDate":"Nov 18–19, 2026","incidentDateIso":"2026-11-18","incidentEndIso":"2026-11-19","disclosedDate":"Nov 19, 2026","sourceUrl":"https://novuhq.notion.site/Novu-Incident-report-November-19th-420d03ad838f80ae916fee0d55bc802f","sourceAuthor":"Novu Incident Report, Novu GHSA-244j-pq88-5m65, Handlebars GHSA-8r5x-fm3f-whwj, and Wiz Research IOCs","vectorFilter":"API and secrets","timeToDetect":"5h 26m from UK exploit (01:42Z) to investigation (07:08Z); alert fired at 01:52:27Z unrouted","detectedBy":"Novu team (after unrouted 01:52:27 UTC high-severity alert)","initialAccess":{"label":"Handlebars RCE in lagging UK region","detail":"Crafted template hit unpatched UK email preview endpoint ~40h after US/EU moved to v3.20.0","evidence":"confirmed"},"secondaryVectorMeta":{"term":"Cross-region Clerk keys","label":"23,534 orgs opened","evidence":"confirmed"},"blastRadius":"Environment API keys & integration credentials read for 23,534 orgs (~56% of Novu Cloud) plus Agent Inbox secrets","whatItReachedShort":"23,534 orgs (22,115 US, 1,419 EU) env API keys & email/SMS/push/chat/AI provider creds, plus Agent Inbox keys through Cloudflare Workers","whatHeldShort":"No subscriber data, messages, or personal data accessed; no direct DB access; cloud escalation denied","revisions":[{"id":"Rev A","date":"Dec 5, 2026","note":"First published from Novu’s November 22 incident report (110 Notion blocks), Novu advisory GHSA-244j-pq88-5m65, upstream Handlebars advisory GHSA-8r5x-fm3f-whwj (CVE-2026-106446), pinned Novu v3.19.0 source (commit fe53c481), Wiz Research IOC CSV row 63, RIPE RDAP, RIPEstat, and passive DNS."}],"bodyMarkdown":"## How they got in\n\nA security fix is not shipped until every region runs it. On November 17, 2026 at 10:05 UTC, Novu deployed v3.20.0 to its US and EU cloud regions, bumping the Handlebars template compiler from 4.7.9 to 4.7.10 to close critical JavaScript-injection flaws disclosed upstream on October 5. Five smaller cloud regions (UK, Japan, South Korea, Singapore, and Australia) stayed behind on the previous build. [[novu-entry]]\n\nBeginning at 20:49 UTC on November 18 from a single IP address (109.238.87.4), an attacker probed Novu’s public and keyless endpoints, briefly triggering an unhandled webhook error that disrupted the US API from 21:49 to 23:21 UTC. Between 00:51 and 01:42 UTC on November 19, the attacker spun up self-service accounts and organizations across the five lagging regions using automatically generated email inboxes. At 01:42 UTC, a crafted template sent to the UK email preview endpoint executed arbitrary code directly inside the UK API Node.js process.\n\nOne technical detail remains withheld: Novu’s report cites upstream Handlebars advisory GHSA-8r5x-fm3f-whwj (CVE-2026-106446), which fires only when an untrusted parsed AST object reaches compile(), whereas Novu’s own advisory GHSA-244j-pq88-5m65 omits the proof of concept and lists three Handlebars 4.7.9 flaws fixed by 4.7.10 (and shows no CVE assigned to Novu itself despite the report referencing a public CVE for self-hosted versions). Inspecting pinned Novu v3.19.0 source confirms that CompileTemplateCommand decorated its template property with @IsDefined() alone (no @IsString()) and passed command.template straight into handlebars.compile(). Because Novu withheld the payload, we do not claim whether the attacker sent an AST object or a string; either way, a runtime string check and regional release parity would have closed the entry door. [[novu-compile-code]]\n\n## What it reached\n\nCode execution inside one regional API server became a global credential breach in eighteen minutes because that UK server held cloud credentials capable of reading internal secrets for every region. Between 01:46 and 02:00 UTC, the attacker pulled Novu’s US and EU Clerk secret keys, a scoped Cloudflare API token for deploying Workers, and other internal service keys.\n\nWith Clerk’s secret keys in hand, the attacker exploited a second design flaw between 01:59 and 02:57 UTC: Novu’s dashboard API trusted the organization reference carried inside a Clerk session token. Besides minting sign-in sessions for roughly 1,550 existing users, the attacker swapped that organization reference roughly 25,000 times across 61 attacker-owned organizations to walk customer workspaces at speed. Across 58 minutes, four read-only endpoints returned environment API keys (encrypted at rest in Novu’s database, but returned decrypted to signed-in dashboard sessions) and integration credentials for email, SMS, push, chat, and AI providers belonging to 23,534 organizations, about 56% of Novu Cloud (22,115 in US and 1,419 in EU): 55,059 successful calls to GET /v1/integrations, 31,027 to GET /v1/environments, 4,431 to GET /v1/integrations/active, and 4,416 to GET /v1/environment-variables. [[novu-endpoints]]\n\nAt the same time (02:10 to 02:45 UTC), the attacker used the stolen Cloudflare token to deploy tampered versions of four Cloudflare Workers (including Agent Inbox) and two helper Workers, dumping Agent Inbox production and staging authentication keys and service configuration secrets. Novu traced harvested OpenAI and Anthropic keys (both Novu’s own and customers’) to bursts of 2 to 5 requests per high-tier model matching published distillation prompts, echoing the wider AI-developer campaign documented by Wiz Research and disclosed by Railway, OpenCode, and Fireworks AI (though Novu has no confirmed upstream or downstream cascade link to Fireworks AI). Passive routing checks also reconcile a minor IOC discrepancy: Novu lists 109.238.87.4 under registrant ASN 201738 (UFO Technologies Limited), while BGP shows the /24 announced by AS55286 (B2 Net Solutions / ServerMania), matching row 63 of Wiz Research’s Agentic Attacks IOC feed from October 31 to November 23. [[novu-ioc-asn]]\n\n## What held\n\nNovu’s automated detection caught the intrusion within ten minutes, yet alert routing failed: a high-severity finding fired at 01:52:27 UTC (described as a WAF finding in Novu’s timeline table and as an AWS GuardDuty finding in its detection section), but an on-call integration gap left it unseen for 5 hours and 16 minutes until engineers started investigating anomalous sign-ups at 07:08 UTC. By then, the attacker’s last successful key read had ended four hours earlier at 02:57 UTC. Novu rotated and IP-restricted Clerk keys by 10:00 UTC, patched every region to v3.20.0 by 12:43 UTC, notified customers at 14:48 and 20:51 UTC, revoked every pre-incident Novu API key, redeployed clean Cloudflare Workers by 18:04 UTC, deleted the attacker’s Workers by 18:17 UTC, and briefed the Israel National Cyber Directorate on November 20. [[novu-alert]]\n\nCrucially, several internal walls held. Every attempt to escalate cloud privileges further was denied, the attacker never obtained direct database access, environment variables flagged as secret stayed masked, and Novu found no evidence that subscriber records, message content, or personal data were read or that customer workflows, roles, or integrations were altered (five Clerk sessions linked empty Novu orgs with zero data loss). Self-hosted deployments were unaffected by the cloud breach, though every self-hosted build prior to v3.20.0 carries the same Handlebars 4.7.9 vulnerability.\n\n> **One lagging region plus global secret read equals a fleet-wide breach**\n>\n> Novu’s postmortem is refreshingly candid about the three structural mistakes that stacked together: leaving five smaller regions forty hours behind a public critical patch, letting a regional API server read identity-provider secrets for every other region, and trusting an organization reference inside a session token without checking membership server-side.\n>\n> If you operate multi-region infrastructure, enforce build-parity alerts across every region, fence cloud secret reads inside each region’s own role, mask stored customer secrets after creation, and run live pager tests so a 01:52 UTC high-severity alert never sleeps until morning.","narrative":{"howTheyGotIn":["A security fix is not shipped until every region runs it. On November 17, 2026 at 10:05 UTC, Novu deployed v3.20.0 to its US and EU cloud regions, bumping the Handlebars template compiler from 4.7.9 to 4.7.10 to close critical JavaScript-injection flaws disclosed upstream on October 5. Five smaller cloud regions (UK, Japan, South Korea, Singapore, and Australia) stayed behind on the previous build. [[novu-entry]]","Beginning at 20:49 UTC on November 18 from a single IP address (109.238.87.4), an attacker probed Novu’s public and keyless endpoints, briefly triggering an unhandled webhook error that disrupted the US API from 21:49 to 23:21 UTC. Between 00:51 and 01:42 UTC on November 19, the attacker spun up self-service accounts and organizations across the five lagging regions using automatically generated email inboxes. At 01:42 UTC, a crafted template sent to the UK email preview endpoint executed arbitrary code directly inside the UK API Node.js process.","One technical detail remains withheld: Novu’s report cites upstream Handlebars advisory GHSA-8r5x-fm3f-whwj (CVE-2026-106446), which fires only when an untrusted parsed AST object reaches compile(), whereas Novu’s own advisory GHSA-244j-pq88-5m65 omits the proof of concept and lists three Handlebars 4.7.9 flaws fixed by 4.7.10 (and shows no CVE assigned to Novu itself despite the report referencing a public CVE for self-hosted versions). Inspecting pinned Novu v3.19.0 source confirms that CompileTemplateCommand decorated its template property with @IsDefined() alone (no @IsString()) and passed command.template straight into handlebars.compile(). Because Novu withheld the payload, we do not claim whether the attacker sent an AST object or a string; either way, a runtime string check and regional release parity would have closed the entry door. [[novu-compile-code]]"],"whatItReached":["Code execution inside one regional API server became a global credential breach in eighteen minutes because that UK server held cloud credentials capable of reading internal secrets for every region. Between 01:46 and 02:00 UTC, the attacker pulled Novu’s US and EU Clerk secret keys, a scoped Cloudflare API token for deploying Workers, and other internal service keys.","With Clerk’s secret keys in hand, the attacker exploited a second design flaw between 01:59 and 02:57 UTC: Novu’s dashboard API trusted the organization reference carried inside a Clerk session token. Besides minting sign-in sessions for roughly 1,550 existing users, the attacker swapped that organization reference roughly 25,000 times across 61 attacker-owned organizations to walk customer workspaces at speed. Across 58 minutes, four read-only endpoints returned environment API keys (encrypted at rest in Novu’s database, but returned decrypted to signed-in dashboard sessions) and integration credentials for email, SMS, push, chat, and AI providers belonging to 23,534 organizations, about 56% of Novu Cloud (22,115 in US and 1,419 in EU): 55,059 successful calls to GET /v1/integrations, 31,027 to GET /v1/environments, 4,431 to GET /v1/integrations/active, and 4,416 to GET /v1/environment-variables. [[novu-endpoints]]","At the same time (02:10 to 02:45 UTC), the attacker used the stolen Cloudflare token to deploy tampered versions of four Cloudflare Workers (including Agent Inbox) and two helper Workers, dumping Agent Inbox production and staging authentication keys and service configuration secrets. Novu traced harvested OpenAI and Anthropic keys (both Novu’s own and customers’) to bursts of 2 to 5 requests per high-tier model matching published distillation prompts, echoing the wider AI-developer campaign documented by Wiz Research and disclosed by Railway, OpenCode, and Fireworks AI (though Novu has no confirmed upstream or downstream cascade link to Fireworks AI). Passive routing checks also reconcile a minor IOC discrepancy: Novu lists 109.238.87.4 under registrant ASN 201738 (UFO Technologies Limited), while BGP shows the /24 announced by AS55286 (B2 Net Solutions / ServerMania), matching row 63 of Wiz Research’s Agentic Attacks IOC feed from October 31 to November 23. [[novu-ioc-asn]]"],"whatHeld":["Novu’s automated detection caught the intrusion within ten minutes, yet alert routing failed: a high-severity finding fired at 01:52:27 UTC (described as a WAF finding in Novu’s timeline table and as an AWS GuardDuty finding in its detection section), but an on-call integration gap left it unseen for 5 hours and 16 minutes until engineers started investigating anomalous sign-ups at 07:08 UTC. By then, the attacker’s last successful key read had ended four hours earlier at 02:57 UTC. Novu rotated and IP-restricted Clerk keys by 10:00 UTC, patched every region to v3.20.0 by 12:43 UTC, notified customers at 14:48 and 20:51 UTC, revoked every pre-incident Novu API key, redeployed clean Cloudflare Workers by 18:04 UTC, deleted the attacker’s Workers by 18:17 UTC, and briefed the Israel National Cyber Directorate on November 20. [[novu-alert]]","Crucially, several internal walls held. Every attempt to escalate cloud privileges further was denied, the attacker never obtained direct database access, environment variables flagged as secret stayed masked, and Novu found no evidence that subscriber records, message content, or personal data were read or that customer workflows, roles, or integrations were altered (five Clerk sessions linked empty Novu orgs with zero data loss). Self-hosted deployments were unaffected by the cloud breach, though every self-hosted build prior to v3.20.0 carries the same Handlebars 4.7.9 vulnerability."],"sideNoteTitle":"One lagging region plus global secret read equals a fleet-wide breach","sideNoteParagraphs":["Novu’s postmortem is refreshingly candid about the three structural mistakes that stacked together: leaving five smaller regions forty hours behind a public critical patch, letting a regional API server read identity-provider secrets for every other region, and trusting an organization reference inside a session token without checking membership server-side.","If you operate multi-region infrastructure, enforce build-parity alerts across every region, fence cloud secret reads inside each region’s own role, mask stored customer secrets after creation, and run live pager tests so a 01:52 UTC high-severity alert never sleeps until morning."]},"claims":[{"group":"How they got in","claim":"Novu deployed v3.20.0 (upgrading Handlebars from 4.7.9 to 4.7.10) to US and EU on Nov 17 at 10:05 UTC while UK, JP, KR, SG, and AU stayed on the previous build; on Nov 19 at 01:42 UTC the attacker sent a crafted template to the UK email preview endpoint and ran arbitrary code on the API server","evidence":"confirmed","source":"Novu Incident report (Nov 22, 2026) and GHSA-244j-pq88-5m65","sourceUrl":"https://novuhq.notion.site/Novu-Incident-report-November-19th-420d03ad838f80ae916fee0d55bc802f","receiptIds":["novu-entry","novu-advisories"]},{"group":"How they got in","claim":"The exact exploit payload sent to the UK email preview endpoint (whether a parsed JSON AST object hitting GHSA-8r5x-fm3f-whwj or a string hitting a sibling Handlebars 4.7.9 flaw listed in GHSA-244j-pq88-5m65)","evidence":"withheld","source":"Withheld by Novu (PoC intentionally omitted in GHSA-244j-pq88-5m65)","sourceUrl":"https://github.com/novuhq/novu/security/advisories/GHSA-244j-pq88-5m65","receiptIds":["novu-advisories"]},{"group":"How they got in","claim":"In pinned Novu v3.19.0 source (commit fe53c481), CompileTemplateCommand decorates template with @IsDefined() without @IsString() and CompileTemplate passes command.template directly into handlebars.compile(); a runtime string check would have blocked the AST-object path independently of the Handlebars bump","evidence":"inferred","source":"Pinned novuhq/novu v3.19.0 source cross-checked against GHSA-8r5x-fm3f-whwj","sourceUrl":"https://github.com/novuhq/novu/blob/fe53c481acb005925b990fe2484fcb6aea396e28/libs/application-generic/src/usecases/compile-template/compile-template.command.ts","receiptIds":["novu-compile-code"]},{"group":"What it reached","claim":"UK API server cloud credentials read internal secrets across every region (01:46–02:00 UTC), including US and EU Clerk secret keys and a Cloudflare Worker deploy token; between 01:59 and 02:57 UTC the attacker minted sessions for ~1,550 users, re-pointed org references ~25,000 times across 61 attacker orgs, and called four read-only endpoints to read environment API keys and integration credentials for 23,534 organizations (22,115 US, 1,419 EU; ~56% of Novu Cloud)","evidence":"confirmed","source":"Novu Incident report (Nov 22, 2026)","sourceUrl":"https://novuhq.notion.site/Novu-Incident-report-November-19th-420d03ad838f80ae916fee0d55bc802f","receiptIds":["novu-entry","novu-endpoints"]},{"group":"What it reached","claim":"Between 02:10 and 02:45 UTC the stolen Cloudflare token was used to deploy modified versions of four Workers (including Agent Inbox) and two helper Workers to read Agent Inbox production and staging authentication keys and service configuration secrets; harvested OpenAI and Anthropic keys saw 2–5 distillation-style requests per high-tier model","evidence":"confirmed","source":"Novu Incident report (Nov 22, 2026)","sourceUrl":"https://novuhq.notion.site/Novu-Incident-report-November-19th-420d03ad838f80ae916fee0d55bc802f","receiptIds":["novu-endpoints"]},{"group":"What it reached","claim":"How many harvested customer provider keys were used externally, whether keys were passed to AI-access resellers, and why Novu’s timeline names WAF at 01:52:27 UTC while its detection section names AWS GuardDuty (both confirm the 01:52:27 UTC alert was not routed to on-call)","evidence":"withheld","source":"Novu Incident report (Nov 22, 2026)","sourceUrl":"https://novuhq.notion.site/Novu-Incident-report-November-19th-420d03ad838f80ae916fee0d55bc802f","receiptIds":["novu-alert"]},{"group":"What held","claim":"No evidence of access to customer subscriber data, message content, or personal data; no attacker modifications to integrations, environments, members, roles, or workflows; no direct database access; all cloud privilege escalation attempts denied; secret-flagged env vars stayed masked; all pre-incident Novu API keys revoked on Nov 19","evidence":"confirmed","source":"Novu Incident report (Nov 22, 2026)","sourceUrl":"https://novuhq.notion.site/Novu-Incident-report-November-19th-420d03ad838f80ae916fee0d55bc802f","receiptIds":["novu-alert"]},{"group":"Observed public posture","claim":"Attacker IP 109.238.87.4 belongs to RIPE block UFO-TECHNOLOGIES-LIMITED (registrant AS201738 cited by Novu) but is announced on BGP by AS55286 (B2 Net Solutions / ServerMania) and matches row 63 of Wiz Research’s Agentic Attacks IOC CSV (Oct 31–Nov 23); Novu’s APIs sit on Cloudflare, dashboards on Netlify, and _dmarc.novu.co runs p=quarantine (pct=100)","evidence":"observed","source":"RIPE RDAP, RIPEstat, Wiz Research IOC CSV (commit 4d39ec32), and passive DNS (Dec 5, 2026)","sourceUrl":"https://github.com/wiz-sec-public/wiz-research-iocs/blob/4d39ec3255e90b1a68f0b6346f73e47fd81d0436/reports/agentic_attacks_in_the_wild_iocs.csv","receiptIds":["novu-ioc-asn"]}],"receipts":[{"id":"novu-entry","kind":"quote","evidence":"confirmed","title":"Novu Incident Report: lagging regions, UK exploit, and cross-region cloud credentials","stub":"Read Novu’s confirmation of the lagging UK build and cross-region secret reads","source":{"name":"Novu Incident Report (Notion)","host":"novuhq.notion.site","url":"https://novuhq.notion.site/Novu-Incident-report-November-19th-420d03ad838f80ae916fee0d55bc802f","date":"Nov 22, 2026"},"saved":"proofs/novu-nov-2026-lagging-region-handlebars-clerk-keys/novu-incident-report.txt","savedAt":"2026-12-05T08:08:49Z","sha256":"bfc235b792fcd7fc15b70d9bdf465f841b1721099d2e92521913e5ab18a406f3","quote":[{"label":"Lagging regions and UK email preview entry","lines":["The attacker entered through a known vulnerability in Handlebars, the template library used by Novu's email preview endpoint (GHSA-8r5x-fm3f-whwj). We fixed it in Novu v3.20.0, which was running in our US and EU regions. ==Five smaller regions (UK, Japan, South Korea, Singapore and Australia) were still running the previous build.=="]},{"label":"Cross-region cloud credential reach","lines":["At 01:42 UTC on November 19, the attacker sent a crafted template to the preview endpoint in the UK region and ran code on the API server. This gave them the server's cloud credentials. ==Those credentials could read internal secrets in every region, not only the UK.=="]}],"shows":"Novu confirms both the forty-hour regional patch lag after deploying v3.20.0 to US/EU and the cross-region secret scope that let a UK API server read US and EU Clerk keys and a Cloudflare token.","leavesOut":"The exact exploit payload sent to the UK preview endpoint and which cloud secret-manager IAM role granted cross-region read permissions."},{"id":"novu-compile-code","kind":"code","evidence":"observed","title":"Pinned Novu v3.19.0 template compiler command and usecase (commit fe53c481)","stub":"Inspect CompileTemplateCommand (@IsDefined without @IsString) and handlebars.compile()","source":{"name":"GitHub (novuhq/novu v3.19.0)","host":"github.com/novuhq/novu","url":"https://github.com/novuhq/novu/tree/fe53c481acb005925b990fe2484fcb6aea396e28/libs/application-generic/src/usecases/compile-template","date":"Nov 16, 2026"},"repo":"novuhq/novu","ref":"v3.19.0","commit":"fe53c481acb005925b990fe2484fcb6aea396e28","savedAt":"2026-12-05T08:07:37Z","files":[{"path":"libs/application-generic/src/usecases/compile-template/compile-template.command.ts","saved":"proofs/novu-nov-2026-lagging-region-handlebars-clerk-keys/compile-template.command.ts","sha256":"20ff5e8c32db398659342d9bad66225da4ea493edadcc8d0fae8aa915c80abb9","show":[[1,11]],"marks":{"6":"Validates only @IsDefined() with no @IsString() runtime type check"},"content":"import { IsDefined, IsObject } from 'class-validator';\n\nimport { BaseCommand } from '../../commands/base.command';\n\nexport class CompileTemplateCommand extends BaseCommand {\n  @IsDefined()\n  template: string;\n\n  @IsObject()\n  data: any; // eslint-disable-line @typescript-eslint/no-explicit-any\n}\n"},{"path":"libs/application-generic/src/usecases/compile-template/compile-template.usecase.ts","saved":"proofs/novu-nov-2026-lagging-region-handlebars-clerk-keys/compile-template.usecase.ts","sha256":"1e6755b201fddb8b5801402583159cdf99a0dc7aa487353e5064a52dc571cba3","show":[[151,172]],"marks":{"158":"Passes command.template straight through with no typeof string guard","163":"Invokes handlebars.compile(templateContent) inside the API Node.js process"},"content":"import { BadRequestException, Injectable } from '@nestjs/common';\nimport { HandlebarHelpersEnum } from '@novu/shared';\nimport { format } from 'date-fns';\nimport Handlebars from 'handlebars';\nimport { CompileTemplateCommand } from './compile-template.command';\n\nconst assertResult = (condition: boolean, options) => {\n  const fn = condition ? options.fn : options.inverse;\n\n  return typeof fn === 'function' ? fn(this) : condition;\n};\n\nfunction createHandlebarsInstance(i18next: any) {\n  const handlebars = Handlebars.create();\n\n  handlebars.registerHelper('json', (context) => JSON.stringify(context));\n\n  if (i18next) {\n    handlebars.registerHelper(HandlebarHelpersEnum.I18N, function (key, { hash, data, fn }) {\n      const options = {\n        ...data.root.i18next,\n        ...hash,\n        returnObjects: false,\n      };\n\n      const replace = (options.replace = {\n        // @ts-expect-error\n        ...this,\n        ...options.replace,\n        ...hash,\n      });\n      delete replace.i18next; // may creep in if this === data.root\n\n      if (fn) {\n        options.defaultValue = fn(replace);\n      }\n\n      return new handlebars.SafeString(i18next.t(key, options));\n    });\n  }\n\n  handlebars.registerHelper(HandlebarHelpersEnum.EQUALS, function (arg1, arg2, options) {\n    // @ts-expect-error\n    return arg1 == arg2 ? options.fn(this) : options.inverse(this);\n  });\n\n  handlebars.registerHelper(HandlebarHelpersEnum.TITLECASE, (value) =>\n    value\n      ?.split(' ')\n      .map((letter) => letter.charAt(0).toUpperCase() + letter.slice(1).toLowerCase())\n      .join(' ')\n  );\n\n  handlebars.registerHelper(HandlebarHelpersEnum.UPPERCASE, (value) => value?.toUpperCase());\n\n  handlebars.registerHelper(HandlebarHelpersEnum.LOWERCASE, (value) => value?.toLowerCase());\n\n  handlebars.registerHelper(HandlebarHelpersEnum.PLURALIZE, (number, single, plural) =>\n    number === 1 ? single : plural\n  );\n\n  handlebars.registerHelper(HandlebarHelpersEnum.DATEFORMAT, (date, dateFormat) => {\n    // Format date if parameters are valid\n    if (date && dateFormat && !Number.isNaN(Date.parse(date))) {\n      return format(new Date(date), dateFormat);\n    }\n\n    return date;\n  });\n\n  handlebars.registerHelper(HandlebarHelpersEnum.GROUP_BY, (array, property) => {\n    if (!Array.isArray(array)) return [];\n    const map = {};\n    array.forEach((item) => {\n      if (item[property]) {\n        const key = item[property];\n        if (!map[key]) {\n          map[key] = [item];\n        } else {\n          map[key].push(item);\n        }\n      }\n    });\n\n    const result = [];\n    for (const [key, value] of Object.entries(map)) {\n      result.push({ key, items: value });\n    }\n\n    return result;\n  });\n\n  handlebars.registerHelper(HandlebarHelpersEnum.UNIQUE, (array, property) => {\n    if (!Array.isArray(array)) return '';\n\n    return array\n      .map((item) => {\n        if (item[property]) {\n          return item[property];\n        }\n      })\n      .filter((value, index, self) => self.indexOf(value) === index);\n  });\n\n  handlebars.registerHelper(HandlebarHelpersEnum.SORT_BY, (array, property) => {\n    if (!Array.isArray(array)) return '';\n    if (!property) return array.sort();\n\n    return array.sort((a, b) => {\n      const _x = a[property];\n      const _y = b[property];\n\n      return _x < _y ? -1 : _x > _y ? 1 : 0;\n    });\n  });\n\n  // based on: https://gist.github.com/DennyLoko/61882bc72176ca74a0f2\n  handlebars.registerHelper(HandlebarHelpersEnum.NUMBERFORMAT, (number, options) => {\n    if (Number.isNaN(Number(number))) {\n      return number;\n    }\n\n    const decimalLength = options.hash.decimalLength || 2;\n    const thousandsSep = options.hash.thousandsSep || ',';\n    const decimalSep = options.hash.decimalSep || '.';\n\n    const value = parseFloat(number);\n\n    const re = `\\\\d(?=(\\\\d{3})+${decimalLength > 0 ? '\\\\D' : '$'})`;\n\n    const num = value.toFixed(Math.max(0, ~~decimalLength));\n\n    return (decimalSep ? num.replace('.', decimalSep) : num).replace(new RegExp(re, 'g'), `$&${thousandsSep}`);\n  });\n\n  handlebars.registerHelper(HandlebarHelpersEnum.GT, (arg1, arg2, options) => assertResult(arg1 > arg2, options));\n\n  handlebars.registerHelper(HandlebarHelpersEnum.GTE, (arg1, arg2, options) => assertResult(arg1 >= arg2, options));\n\n  handlebars.registerHelper(HandlebarHelpersEnum.LT, (arg1, arg2, options) => assertResult(arg1 < arg2, options));\n\n  handlebars.registerHelper(HandlebarHelpersEnum.LTE, (arg1, arg2, options) => assertResult(arg1 <= arg2, options));\n\n  handlebars.registerHelper(HandlebarHelpersEnum.EQ, (arg1, arg2, options) => assertResult(arg1 === arg2, options));\n\n  handlebars.registerHelper(HandlebarHelpersEnum.NE, (arg1, arg2, options) => assertResult(arg1 !== arg2, options));\n\n  return handlebars;\n}\n\n@Injectable()\nexport class CompileTemplate {\n  async execute(\n    command: CompileTemplateCommand,\n    // we need i18nInstance outside the command on order to avoid command serialization on it.\n    i18nInstance?: any\n  ): Promise<string> {\n    const templateContent = command.template || '';\n\n    let result = '';\n    try {\n      const handlebars = createHandlebarsInstance(i18nInstance);\n      const template = handlebars.compile(templateContent);\n\n      result = template(command.data, {});\n    } catch (e: any) {\n      throw new BadRequestException(e?.message || `Handlebars message content could not be generated ${e}`);\n    }\n\n    return result.replace(/&#x27;/g, \"'\");\n  }\n}\n"}],"shows":"Public Novu v3.19.0 source (bundled with Handlebars 4.7.9) validates template with `@IsDefined()` alone and passes it directly into `handlebars.compile()` without a runtime string check.","leavesOut":"Whether the attacker passed a parsed JSON AST object (matching GHSA-8r5x-fm3f-whwj) or a string hitting one of the sibling Handlebars 4.7.9 flaws; Novu withheld the payload."},{"id":"novu-endpoints","kind":"quote","evidence":"confirmed","title":"Novu Incident Report: Clerk org re-pointing, 23,534 orgs, Workers, and AI distillation","stub":"Read Novu’s exact numbers on forged Clerk sessions, 23,534 orgs, and Agent Inbox Workers","source":{"name":"Novu Incident Report (Notion)","host":"novuhq.notion.site","url":"https://novuhq.notion.site/Novu-Incident-report-November-19th-420d03ad838f80ae916fee0d55bc802f","date":"Nov 22, 2026"},"saved":"proofs/novu-nov-2026-lagging-region-handlebars-clerk-keys/novu-incident-report.txt","savedAt":"2026-12-05T08:08:49Z","sha256":"bfc235b792fcd7fc15b70d9bdf465f841b1721099d2e92521913e5ab18a406f3","quote":[{"label":"Clerk org-reference trust bug and Cloudflare Workers","lines":["Novu's API trusted the organization reference carried in a Clerk session token. ==By changing that reference on organizations they controlled, the attacker could load any customer organization in the dashboard API. They repeated this about 25,000 times across 61 attacker-owned organizations.==","Between 02:10 and 02:45 UTC they deployed modified versions of four Workers, including Agent Inbox, that exposed those services' configured secrets. They also created two helper Workers that read internal Worker secrets."]},{"label":"Customer scope and AI distillation intent","lines":["==23,534 organizations had their environment API keys, environment variables and integration credentials read. That is about 56% of organizations on Novu Cloud: 22,115 in the US region (about 55%) and 1,419 in the EU region.=="]}],"shows":"Maps the exact lateral mechanism: trusting a Clerk token’s org reference turned stolen Clerk secret keys into 94,933 read-only API calls across 23,534 customer orgs in 58 minutes, while modified Cloudflare Workers dumped Agent Inbox keys.","leavesOut":"Which specific customer organizations were hit, how many harvested provider keys saw external replay, and whether harvested keys were resold to AI-access brokers."},{"id":"novu-ioc-asn","kind":"output","evidence":"observed","title":"Attacker IP 109.238.87.4 BGP/RDAP, Wiz IOC CSV row 63, and Novu passive DNS","stub":"Inspect AS55286 vs AS201738 routing for 109.238.87.4, Wiz IOC overlap, and Novu DNS","source":{"name":"RIPEstat, RIPE RDAP, Wiz IOC CSV & Passive DNS","host":"stat.ripe.net / github.com/wiz-sec-public / novu.co","url":"https://github.com/wiz-sec-public/wiz-research-iocs/blob/4d39ec3255e90b1a68f0b6346f73e47fd81d0436/reports/agentic_attacks_in_the_wild_iocs.csv","date":"Dec 5, 2026"},"saved":"proofs/novu-nov-2026-lagging-region-handlebars-clerk-keys/ripestat-109-238-87-4.json","savedAt":"2026-12-05T08:07:39Z","sha256":"8e7682afd84b223894495f99ae89a1daa76c8ce1799cbffa5a1f341953112f6b","command":"curl -sS \"https://stat.ripe.net/data/prefix-overview/data.json?resource=109.238.87.4\" | jq '.data | {resource, announced, asns}' && dig +short A api.novu.co eu.api.novu.co && dig +short TXT _dmarc.novu.co","output":"RIPEstat 109.238.87.0/24 -> announced: true, AS55286 (SERVER-MANIA - B2 Net Solutions Inc.)\nRIPE RDAP 109.238.87.0/24 -> UFO-TECHNOLOGIES-LIMITED (GB registrant; Novu report cites ASN 201738)\nWiz Agentic Attacks IOC CSV row 63 -> 109.238.87[.]4, B2 Net Solutions, Oct 31-Nov 23 2026\napi.novu.co / eu.api.novu.co -> 172.66.40.115, 172.66.43.141 (Cloudflare)\ndashboard.novu.co / uk.dashboard.novu.co -> dashboard-prod-us.netlify.app.\neu.dashboard.novu.co -> dashboard-prod-eu.netlify.app.\n_dmarc.novu.co -> \"v=DMARC1; p=quarantine; pct=100; ...\"","picked":{"caption":"Reconciling Novu’s IOC with BGP and Wiz Research","lines":["109.238.87.4: RDAP registrant UFO-TECHNOLOGIES-LIMITED (AS201738), BGP-announced by AS55286 (B2 Net Solutions)","Matches Wiz Agentic Attacks IOC CSV row 63 (Oct 31–Nov 23, 2026); _dmarc.novu.co is p=quarantine"]},"shows":"Reconciles the ASN discrepancy (registrant `AS201738` versus BGP announcer `AS55286`), ties `109.238.87.4` directly to Wiz’s public Agentic Attacks IOC feed, and maps Novu’s Cloudflare API edge, Netlify dashboards, and DMARC `p=quarantine` policy.","leavesOut":"Wiz’s IOC CSV does not name Novu directly, and passive DNS records do not show Novu’s internal cloud IAM layout."},{"id":"novu-alert","kind":"quote","evidence":"confirmed","title":"Novu Incident Report: unrouted 01:52:27 UTC alert and untouched data boundaries","stub":"Read Novu’s disclosure of the unrouted alert and confirmation that subscriber data stayed safe","source":{"name":"Novu Incident Report (Notion)","host":"novuhq.notion.site","url":"https://novuhq.notion.site/Novu-Incident-report-November-19th-420d03ad838f80ae916fee0d55bc802f","date":"Nov 22, 2026"},"saved":"proofs/novu-nov-2026-lagging-region-handlebars-clerk-keys/novu-incident-report.txt","savedAt":"2026-12-05T08:08:49Z","sha256":"bfc235b792fcd7fc15b70d9bdf465f841b1721099d2e92521913e5ab18a406f3","quote":[{"label":"Missed high-severity alert (5h 16m gap)","lines":["==AWS GuardDuty generated its first high-severity finding at 01:52:27 UTC, ten minutes after the first exploit, but it was not routed to our on-call engineer due to an integration issue with our on-call system.== Our team began investigating at 07:08 UTC after seeing the generated alert."]},{"label":"Data boundaries that held","lines":["We have found no evidence that customer subscriber data, message content or other personal data was accessed. We also found no evidence that data in customer organizations was modified."]}],"shows":"Documents both the 5-hour-16-minute alert-routing gap (note: Novu’s timeline table calls the same 01:52:27 UTC finding a WAF alert while this section names AWS GuardDuty) and the read-only credential-only scope.","leavesOut":"Which exact GuardDuty or WAF rule fired at 01:52:27 UTC and why the two sections of Novu’s report name different tools for the same timestamp."},{"id":"novu-advisories","kind":"saved","evidence":"confirmed","title":"Novu security advisory GHSA-244j-pq88-5m65 (published Nov 23, 2026)","stub":"Inspect GHSA-244j-pq88-5m65 listing three upstream Handlebars 4.7.9 flaws and no assigned CVE","source":{"name":"GitHub Security Advisories","host":"github.com/novuhq/novu/security/advisories/GHSA-244j-pq88-5m65","url":"https://github.com/novuhq/novu/security/advisories/GHSA-244j-pq88-5m65","date":"Nov 23, 2026"},"saved":"proofs/novu-nov-2026-lagging-region-handlebars-clerk-keys/novu-ghsa-244j.json","savedAt":"2026-12-05T08:07:36Z","sha256":"e9bb7f672aca6796f242f02829c9058f9d3b3cab4f1d0ce2e9b6d1a075a06e8e","excerpt":{"heading":"Summary","text":"==Novu API container images before 3.20.0 bundle Handlebars 4.7.9, which is affected by several critical JavaScript-injection vulnerabilities in the Handlebars template compiler.== Novu compiles user-authored Handlebars templates on the server when rendering legacy (v1) workflow step content."},"shows":"Confirms Novu < 3.20.0 bundled Handlebars 4.7.9 with three upstream advisories fixed by 4.7.10 (`GHSA-8r5x-fm3f-whwj` / `CVE-2026-106446`, `GHSA-p8wg-vrv2-v86f`, `GHSA-xw65-4hp5-5hc7`), and shows `cve_id: null` on Novu’s own advisory despite the report mentioning a public CVE on self-hosted versions.","leavesOut":"Proof-of-concept payload details, which Novu explicitly omitted from the advisory."}],"response":{"audience":"teams running Novu Cloud integrations, self-hosted Novu deployments, or multi-region SaaS APIs","plain":[{"title":"Replace every provider key you ever pasted into Novu","text":"Open each email, SMS, push, chat, and AI provider dashboard where you generated a key for Novu, issue a fresh key there, and revoke the old one directly at the provider. Deleting an integration inside Novu does not stop a stolen key from working outside Novu."},{"title":"Generate fresh Novu keys and check AI billing from November 18 onward","text":"Novu revoked every pre-incident Novu API key on November 19, so update your apps with newly generated keys. Then review usage and billing logs across OpenAI, Anthropic, and other connected providers starting November 18 for small bursts of unexpected requests to top-tier models."},{"title":"Upgrade self-hosted Novu servers to version 3.20.0 or newer immediately","text":"Self-hosted installations were not part of the Novu Cloud intrusion, but every version before 3.20.0 bundles the same vulnerable Handlebars template compiler. Upgrade the API and Worker containers right away so an authenticated user cannot run code on the host."}],"firstHour":[{"do":"Revoke and replace every third-party integration credential stored in Novu (OpenAI, Anthropic, SendGrid, Twilio, Slack, Firebase) directly inside each provider’s own dashboard","why":"Novu confirmed the attacker read provider credentials across 23,534 organizations (about 56% of Novu Cloud) and observed 2–5 distillation-style prompts per high-tier AI model.","receipt":"novu-endpoints"},{"do":"Generate new Novu environment API keys in the dashboard and update every application deployment","why":"Novu restricted and then revoked every Novu API key that existed during the November 18–19 incident window.","receipt":"novu-alert"},{"do":"Export provider API and billing audit logs from `2026-11-18T20:00:00Z` onward and escalate any unauthorized AI spend with provider case IDs to `security@novu.co`","why":"Novu warns harvested keys may be replayed later from other IPs or AI-access resellers, not only from `109.238.87.4`.","receipt":"novu-ioc-asn"},{"do":"Self-hosted Novu operators: upgrade `@novu/api-service` and worker images to `v3.20.0`+ (Handlebars `4.7.10`) and rotate host env secrets if untrusted users held workflow-edit rights","why":"Novu advisory `GHSA-244j-pq88-5m65` confirms all images prior to `3.20.0` allow authenticated RCE exposing host environment variables and third-party keys.","receipt":"novu-advisories"}],"hunt":[{"lookIn":"Third-party AI, email, SMS, and messaging provider request logs (OpenAI, Anthropic, Twilio, SendGrid, AWS SES)","lead":"Novu traced all direct Novu-side activity to `109.238.87.4`, but warns stolen keys can be replayed from other addresses or AI resale services after `2026-11-18T20:49:00Z`.","signal":"Requests using keys previously stored in Novu from `109.238.87.4` (`AS55286` / `AS201738`), user agents `python-requests/2.32.5`, `curl/8.19.0`, `Go-http-client/2.0`, or `Chrome/148.0.0.0`, or unexpected calls to top-tier AI models.","realHit":"Bursts of 2–5 prompts per high-tier OpenAI or Anthropic model with distillation-style system prompts, or API calls originating outside your application’s egress IPs after Nov 18 20:49Z.","noise":"Routine outbound notifications dispatched from Novu Cloud’s normal regional egress prior to your key rotation.","receipt":"novu-ioc-asn","receiptOn":"signal","code":"novu-hunt-provider-logs"},{"lookIn":"Multi-region SaaS deployment pipelines, cloud secrets-manager audit logs, and Cloudflare Audit Logs","signal":"An API workload in one cloud region reading Secrets Manager/SSM entries tagged for another region, a Clerk backend API key minting sessions outside known API IPs, or a Cloudflare Worker deployment outside your CI pipeline.","realHit":"Any cross-region secret read paired with high-rate `GET /v1/integrations` or `GET /v1/environments` reads across dozens of tenant IDs from one session or IP.","noise":"Scheduled Terraform or CI/CD deploys running from dedicated release runner identities during announced maintenance windows.","receipt":"novu-entry","receiptOn":"realHit","code":"novu-guard-template-and-region"}],"also":{"who":"Engineering and security teams operating multi-region SaaS platforms","text":"Never declare a security release complete until automated build-parity checks verify every region, bind each region’s runtime IAM role strictly to its own region’s secrets, verify organization membership server-side on every API call instead of trusting session-token org claims, and test high-severity GuardDuty and Cloudflare alert paging end to end."}},"stack":{"observedOn":"Dec 5, 2026","intro":"From customer integration keys and Novu’s lagging UK preview API down to cross-region cloud secrets, Cloudflare Workers, public edge hosting, and the data that stayed untouched. Yellow marks confirmed compromised layers; white maps public edge records; green stayed safe.","layers":[{"label":"Customer environment API keys and provider credentials","status":"hit","statusText":"23,534 orgs read","evidence":"confirmed","plain":"Over 58 minutes, forged Clerk sessions called four read-only dashboard endpoints across 23,534 customer organizations (22,115 US, 1,419 EU; about 56% of Novu Cloud), returning environment API keys and email, SMS, push, chat, and AI provider credentials.","technical":["Endpoint counts: `GET /v1/integrations` (`55,059`), `GET /v1/environments` (`31,027`), `GET /v1/integrations/active` (`4,431`), `GET /v1/environment-variables` (`4,416`); ~`2,300` calls rejected (`401`/`404`).","Credentials were encrypted at rest in Novu’s database and returned decrypted to authenticated dashboard sessions; secret-flagged env vars remained masked."]},{"label":"Lagging UK API server and Handlebars template compiler","status":"hit","statusText":"RCE on UK API","evidence":"confirmed","plain":"US and EU moved to v3.20.0 on November 17, but UK, JP, KR, SG, and AU stayed on the previous build bundling Handlebars 4.7.9. Forty hours later, a crafted template sent to the UK email preview endpoint ran arbitrary code on the API server.","also":[{"text":"Pinned v3.19.0 source validates template with @IsDefined() without @IsString() before handlebars.compile().","evidence":"observed"}],"technical":["Novu `v3.20.0` (`083bdfe3`) upgraded Handlebars `4.7.9` -> `^4.7.10` (`GHSA-244j-pq88-5m65`, `GHSA-8r5x-fm3f-whwj` / `CVE-2026-106446`).","Exploit landed `2026-11-19T01:42:00Z` from `109.238.87.4` after probing began `2026-11-18T20:49:00Z`."]},{"label":"Cross-region cloud secrets, Clerk keys, and Cloudflare Workers","status":"hit","statusText":"Cross-region pivot","evidence":"confirmed","plain":"The UK API server’s cloud credentials could read internal secrets in every region, handing the attacker US and EU Clerk secret keys and a Cloudflare Worker deploy token used to tamper with four Workers including Agent Inbox.","technical":["Clerk abuse (`01:59–02:57Z`): sessions minted for ~`1,550` users; org reference re-pointed ~`25,000` times across `61` attacker orgs.","Cloudflare Workers (`02:10–02:45Z`): `4` modified Workers (incl. Agent Inbox) + `2` helper Workers dumped Agent Inbox prod/staging auth keys; cleaned `17:52–18:17Z`.","High-severity alert fired `01:52:27Z` (WAF in timeline / AWS GuardDuty in detection text) but failed to page on-call until `07:08Z`."]},{"label":"Public API edge, dashboards, and email posture","status":"context","statusText":"Public records","evidence":"observed","plain":"Novu routes its US and EU APIs through Cloudflare, serves dashboard frontends from Netlify, hosts corporate mail on Google Workspace, and enforces DMARC quarantine across novu.co.","vendors":[{"name":"Cloudflare","logo":"cloudflare","technical":"Authoritative NS and API edge (`api.novu.co`, `eu.api.novu.co` -> `172.66.40.115`, `172.66.43.141`)."},{"name":"Netlify","initial":"N","technical":"`dashboard.novu.co` & `uk.dashboard.novu.co` -> `dashboard-prod-us.netlify.app`; `eu.dashboard.novu.co` -> `dashboard-prod-eu.netlify.app`."},{"name":"Google Workspace","initial":"G","technical":"`novu.co` MX on `aspmx.l.google.com`; `_dmarc.novu.co` enforces `p=quarantine; pct=100`."}]},{"label":"Customer subscribers, messages, databases, and cloud IAM ceiling","status":"safe","statusText":"Stayed untouched","evidence":"confirmed","plain":"Novu found no evidence of direct database access, no access to customer subscriber records, message content, or personal data, and no changes to customer workflows, roles, or integrations; cloud privilege escalation attempts were denied.","technical":["Read-only dashboard API activity; five Clerk-linked empty org artifacts contacted directly with zero data loss.","All pre-incident Novu API keys revoked Nov 19; Israel National Cyber Directorate briefed Nov 20."]},{"label":"Not known yet","status":"unknown","statusText":"Not known yet","evidence":"withheld","items":["Exact template payload shape (parsed JSON AST object versus string) and which specific Handlebars 4.7.9 path executed on the UK preview endpoint.","Total number of harvested customer provider keys replayed externally, whether keys reached AI-access resellers, and why the report names both WAF and AWS GuardDuty for the 01:52:27 UTC alert."]}],"foot":"White layers combine passive DNS, RIPE RDAP, RIPEstat, and Wiz Research IOCs checked Dec 5, 2026. Naming Cloudflare, Netlify, or Clerk does not imply a vulnerability in those providers."},"diagram":{"label":"How an unpatched UK region let Handlebars RCE pull cross-region Clerk keys and read 23,534 customer organizations in 75 minutes","zones":[{"id":"entry","label":"Lagging UK region","kind":"boundary","lane":0},{"id":"secrets","label":"Cross-region secrets","kind":"boundary","lane":1},{"id":"harvest","label":"Customer & edge reads","kind":"boundary","lane":2},{"id":"safe","label":"Stayed safe","kind":"isolated","lane":1}],"nodes":[{"id":"nv-lag","zone":"entry","name":"UK preview RCE","detail":"Handlebars 4.7.9","kind":"compromised","ev":"confirmed","at":0,"story":"After US and EU upgraded to Novu v3.20.0 on Nov 17 (10:05 UTC), five smaller regions (UK, JP, KR, SG, AU) stayed on the previous build with Handlebars 4.7.9. At 01:42 UTC on Nov 19, from 109.238.87.4, the attacker sent a crafted template to the UK email preview endpoint and ran arbitrary code on the API server. The exact payload shape (AST object versus string) is withheld.","when":"Nov 19, 01:42 UTC","steps":[1],"ctl":["nv-k1"]},{"id":"nv-cloud","zone":"secrets","name":"Cross-region creds","detail":"Read all-region keys","kind":"compromised","ev":"confirmed","at":1,"story":"Code execution on the UK API server exposed the server’s cloud credentials, which could read internal secrets in every region rather than UK alone. Between 01:46 and 02:00 UTC the attacker read US and EU Clerk secret keys, a Cloudflare Worker deploy token, and other internal service keys. Cloud privilege escalation attempts were denied.","when":"Nov 19, 01:46–02:00Z","steps":[1,2],"ctl":["nv-k2"]},{"id":"nv-clerk","zone":"harvest","name":"23,534 orgs read","detail":"Clerk session abuse","kind":"compromised","ev":"confirmed","at":2,"story":"Using stolen Clerk secret keys between 01:59 and 02:57 UTC, the attacker minted sessions for ~1,550 existing users and re-pointed the Clerk org reference across 61 attacker-owned orgs ~25,000 times. Four read-only endpoints returned environment API keys and provider creds (email, SMS, push, chat, AI) for 23,534 orgs (22,115 US, 1,419 EU).","when":"Nov 19, 01:59–02:57Z","steps":[2,3],"ctl":["nv-k3","nv-d1"]},{"id":"nv-cf","zone":"harvest","name":"4 Workers tampered","detail":"Agent Inbox secrets","kind":"compromised","ev":"confirmed","at":3,"story":"With the stolen Cloudflare token, between 02:10 and 02:45 UTC the attacker deployed modified versions of four Cloudflare Workers (including Agent Inbox) and two helper Workers to read configured Worker secrets, exposing production and staging Agent Inbox authentication keys.","when":"Nov 19, 02:10–02:45Z","steps":[3,4],"ctl":["nv-k4"]},{"id":"nv-safe1","zone":"safe","name":"Subscribers & DBs","detail":"Untouched & read-only","kind":"isolated","ev":"confirmed","at":0,"story":"Novu found no evidence of direct database access, no access to customer subscriber data, message content, or personal data, and no changes to integrations, workflows, roles, or memberships.","when":"Confirmed Nov 19–22"},{"id":"nv-safe2","zone":"safe","name":"Cloud escalation","detail":"Denied; secrets masked","kind":"isolated","ev":"confirmed","at":0,"story":"Every attempt to escalate cloud privileges further was denied, environment variables marked as secret remained masked, and all pre-incident Novu API keys were revoked on Nov 19.","when":"Revoked Nov 19"}],"edges":[{"id":"nve1","from":"nv-lag","to":"nv-cloud","kind":"attack","step":1},{"id":"nve2","from":"nv-cloud","to":"nv-clerk","kind":"attack","step":2},{"id":"nve3","from":"nv-cloud","to":"nv-cf","kind":"attack","step":3}],"steps":[{"n":1,"time":"Nov 17–19, 01:42 UTC","short":"Nov 19 01:42Z","text":"Attacker hits lagging UK region with Handlebars 4.7.9 RCE","say":"Forty hours after US and EU patched to v3.20.0, the attacker creates self-service accounts in the five unpatched regions and runs code on the UK API server through the email preview endpoint."},{"n":2,"time":"Nov 19, 01:46–02:00 UTC","short":"Nov 19 01:46Z","text":"UK server cloud credentials read US/EU Clerk keys and Cloudflare token","say":"Over 18 minutes the API server’s overly broad cloud role reads internal secrets for every region; a 01:52:27 UTC high-severity alert fires but fails to route to on-call."},{"n":3,"time":"Nov 19, 01:59–02:57 UTC","short":"Nov 19 01:59Z","text":"Forged Clerk sessions read 23,534 orgs and tampered Workers grab Agent Inbox keys","say":"The attacker mints ~1,550 user sessions, re-points org references ~25,000 times across 61 orgs to call four read-only endpoints across 23,534 orgs, and deploys modified Cloudflare Workers to dump Agent Inbox secrets."},{"n":4,"time":"Nov 19, 07:08–20:51 UTC","short":"Nov 19 07:08Z","text":"Investigation starts 5h 16m after alert; keys rotated and all regions patched","say":"Novu rotates and IP-restricts Clerk keys (10:00Z), patches every region to v3.20.0 (12:43Z), cleans Cloudflare Workers (17:52–18:17Z), notifies customers (14:48Z & 20:51Z), and revokes all pre-incident Novu API keys."}],"controls":[{"id":"nv-k1","step":1,"kind":"control","name":"Lock all-region parity","tag":"Limits step 1","long":"Treat a security patch as unshipped until every region runs it, alert on per-region build drift, and enforce runtime string checks before template compilation.","nodeId":"nv-lag"},{"id":"nv-k2","step":2,"kind":"control","name":"Scope secrets per region","tag":"Limits step 2","long":"Bind API server cloud roles strictly to their own region and service, block cross-region secret reads, and restrict credential use to VPC/infrastructure boundaries.","nodeId":"nv-cloud"},{"id":"nv-k3","step":3,"kind":"control","name":"Verify org membership","tag":"Limits step 3","long":"Check organization membership server-side on every request instead of trusting a session token org reference, IP-restrict IdP secret keys, and mask stored secrets after creation.","nodeId":"nv-clerk"},{"id":"nv-d1","step":2,"kind":"fired","name":"Alert unrouted 5h 16m","tag":null,"long":"A high-severity finding fired at 01:52:27 UTC (10 minutes after exploit) but failed to page on-call due to a routing issue; investigation began at 07:08 UTC.","nodeId":"nv-clerk"},{"id":"nv-k4","step":3,"kind":"control","name":"Isolate edge deploy keys","tag":"Limits step 3","long":"Keep Cloudflare Worker deploy tokens out of runtime API secret stores, restrict them to CI egress IPs, and page on-call on any Worker deployment outside CI.","nodeId":"nv-cf"}],"detectedAt":{"time":"Nov 19, 07:08 UTC (first alert 01:52:27 UTC unrouted for 5h 16m)","short":"Alert unseen 5h 16m","text":"A high-severity cloud finding triggered 10 minutes after the UK exploit (01:52:27 UTC) but did not page on-call; Novu started investigating anomalous sign-ups at 07:08 UTC."}},"plate":{"W":939,"H":380,"label":"How an unpatched UK region let Handlebars RCE pull cross-region Clerk keys and read 23,534 customer organizations in 75 minutes","zones":[{"id":"entry","label":"Lagging UK region","kind":"boundary","x":8,"y":16,"w":192,"h":110},{"id":"secrets","label":"Cross-region secrets","kind":"boundary","x":238,"y":16,"w":442,"h":110},{"id":"safe","label":"Stayed safe","kind":"isolated","x":238,"y":146,"w":442,"h":110},{"id":"harvest","label":"Customer & edge reads","kind":"boundary","x":718,"y":16,"w":213,"h":212}],"nodes":[{"id":"nv-lag","name":"UK preview RCE","detail":"Handlebars 4.7.9","kind":"compromised","ev":"confirmed","x":20,"y":52,"w":168,"at":0,"story":"After US and EU upgraded to Novu v3.20.0 on Nov 17 (10:05 UTC), five smaller regions (UK, JP, KR, SG, AU) stayed on the previous build with Handlebars 4.7.9. At 01:42 UTC on Nov 19, from 109.238.87.4, the attacker sent a crafted template to the UK email preview endpoint and ran arbitrary code on the API server. The exact payload shape (AST object versus string) is withheld.","when":"Nov 19, 01:42 UTC","steps":[1],"ctl":["nv-k1"]},{"id":"nv-cloud","name":"Cross-region creds","detail":"Read all-region keys","kind":"compromised","ev":"confirmed","x":366,"y":52,"w":185,"at":1,"story":"Code execution on the UK API server exposed the server’s cloud credentials, which could read internal secrets in every region rather than UK alone. Between 01:46 and 02:00 UTC the attacker read US and EU Clerk secret keys, a Cloudflare Worker deploy token, and other internal service keys. Cloud privilege escalation attempts were denied.","when":"Nov 19, 01:46–02:00Z","steps":[1,2],"ctl":["nv-k2"]},{"id":"nv-safe1","name":"Subscribers & DBs","detail":"Untouched & read-only","kind":"isolated","ev":"confirmed","x":250,"y":182,"w":182,"at":0,"story":"Novu found no evidence of direct database access, no access to customer subscriber data, message content, or personal data, and no changes to integrations, workflows, roles, or memberships.","when":"Confirmed Nov 19–22"},{"id":"nv-safe2","name":"Cloud escalation","detail":"Denied; secrets masked","kind":"isolated","ev":"confirmed","x":476,"y":182,"w":192,"at":0,"story":"Every attempt to escalate cloud privileges further was denied, environment variables marked as secret remained masked, and all pre-incident Novu API keys were revoked on Nov 19.","when":"Revoked Nov 19"},{"id":"nv-clerk","name":"23,534 orgs read","detail":"Clerk session abuse","kind":"compromised","ev":"confirmed","x":730,"y":52,"w":189,"at":2,"story":"Using stolen Clerk secret keys between 01:59 and 02:57 UTC, the attacker minted sessions for ~1,550 existing users and re-pointed the Clerk org reference across 61 attacker-owned orgs ~25,000 times. Four read-only endpoints returned environment API keys and provider creds (email, SMS, push, chat, AI) for 23,534 orgs (22,115 US, 1,419 EU).","when":"Nov 19, 01:59–02:57Z","steps":[2,3],"ctl":["nv-k3","nv-d1"]},{"id":"nv-cf","name":"4 Workers tampered","detail":"Agent Inbox secrets","kind":"compromised","ev":"confirmed","x":730,"y":154,"w":189,"at":3,"story":"With the stolen Cloudflare token, between 02:10 and 02:45 UTC the attacker deployed modified versions of four Cloudflare Workers (including Agent Inbox) and two helper Workers to read configured Worker secrets, exposing production and staging Agent Inbox authentication keys.","when":"Nov 19, 02:10–02:45Z","steps":[3,4],"ctl":["nv-k4"]}],"edges":[{"id":"nve1","kind":"attack","step":1,"pts":[[188,81],[366,81]]},{"id":"nve2","kind":"attack","step":2,"pts":[[551,81],[730,81]]},{"id":"nve3","kind":"attack","step":3,"pts":[[551,81],[641,81],[641,183],[730,183]]}],"balloons":{"1":[277,81],"2":[641,81],"3":[641,132],"4":[712,180]},"noroute":[{"x1":200,"x2":238,"y":176,"label":"No route"}],"bps":[{"id":"nv-k1","step":1,"kind":"control","at":[277,81],"name":"Lock all-region parity","tag":"Limits step 1","lead":[[277,70],[277,53],[289,53]],"lx":295,"ly":57,"anchor":"start","long":"Treat a security patch as unshipped until every region runs it, alert on per-region build drift, and enforce runtime string checks before template compilation.","nodeId":"nv-lag"},{"id":"nv-k2","step":2,"kind":"control","at":[641,81],"name":"Scope secrets per region","tag":"Limits step 2","lead":[[641,92],[641,103],[629,103]],"lx":623,"ly":107,"anchor":"end","long":"Bind API server cloud roles strictly to their own region and service, block cross-region secret reads, and restrict credential use to VPC/infrastructure boundaries.","nodeId":"nv-cloud"},{"id":"nv-k3","step":3,"kind":"control","at":[641,132],"name":"Verify org membership","tag":"Limits step 3","lead":[[641,121],[641,104],[629,104]],"lx":623,"ly":108,"anchor":"end","long":"Check organization membership server-side on every request instead of trusting a session token org reference, IP-restrict IdP secret keys, and mask stored secrets after creation.","nodeId":"nv-clerk"},{"id":"nv-d1","step":2,"kind":"fired","at":[641,109],"name":"Alert unrouted 5h 16m","tag":null,"lead":[[641,120],[641,131],[629,131]],"lx":623,"ly":135,"anchor":"end","long":"A high-severity finding fired at 01:52:27 UTC (10 minutes after exploit) but failed to page on-call due to a routing issue; investigation began at 07:08 UTC.","nodeId":"nv-clerk"},{"id":"nv-k4","step":3,"kind":"control","at":[641,132],"name":"Isolate edge deploy keys","tag":"Limits step 3","lead":[[641,121],[641,104],[629,104]],"lx":623,"ly":108,"anchor":"end","long":"Keep Cloudflare Worker deploy tokens out of runtime API secret stores, restrict them to CI egress IPs, and page on-call on any Worker deployment outside CI.","nodeId":"nv-cf"}],"steps":[{"n":1,"time":"Nov 17–19, 01:42 UTC","short":"Nov 19 01:42Z","text":"Attacker hits lagging UK region with Handlebars 4.7.9 RCE","say":"Forty hours after US and EU patched to v3.20.0, the attacker creates self-service accounts in the five unpatched regions and runs code on the UK API server through the email preview endpoint."},{"n":2,"time":"Nov 19, 01:46–02:00 UTC","short":"Nov 19 01:46Z","text":"UK server cloud credentials read US/EU Clerk keys and Cloudflare token","say":"Over 18 minutes the API server’s overly broad cloud role reads internal secrets for every region; a 01:52:27 UTC high-severity alert fires but fails to route to on-call."},{"n":3,"time":"Nov 19, 01:59–02:57 UTC","short":"Nov 19 01:59Z","text":"Forged Clerk sessions read 23,534 orgs and tampered Workers grab Agent Inbox keys","say":"The attacker mints ~1,550 user sessions, re-points org references ~25,000 times across 61 orgs to call four read-only endpoints across 23,534 orgs, and deploys modified Cloudflare Workers to dump Agent Inbox secrets."},{"n":4,"time":"Nov 19, 07:08–20:51 UTC","short":"Nov 19 07:08Z","text":"Investigation starts 5h 16m after alert; keys rotated and all regions patched","say":"Novu rotates and IP-restricts Clerk keys (10:00Z), patches every region to v3.20.0 (12:43Z), cleans Cloudflare Workers (17:52–18:17Z), notifies customers (14:48Z & 20:51Z), and revokes all pre-incident Novu API keys."}],"stripRows":[{"id":"sr-step-1","nodeId":"nv-cloud","step":1,"lineStyle":"solid","bpIds":["nv-k1"]},{"id":"sr-step-2","nodeId":"nv-clerk","step":2,"lineStyle":"solid","bpIds":["nv-k2","nv-d1"]},{"id":"sr-step-3","nodeId":"nv-cf","step":3,"lineStyle":"solid","bpIds":["nv-k3","nv-k4"]}],"detectedAt":{"time":"Nov 19, 07:08 UTC (first alert 01:52:27 UTC unrouted for 5h 16m)","short":"Alert unseen 5h 16m","text":"A high-severity cloud finding triggered 10 minutes after the UK exploit (01:52:27 UTC) but did not page on-call; Novu started investigating anomalous sign-ups at 07:08 UTC."}},"codeArtifacts":[{"id":"novu-hunt-provider-logs","filename":"hunt-novu-ioc-and-ai-replay.sh","language":"sh","description":"Filters JSONL provider API or billing audit logs from Nov 18 20:00 UTC onward for Novu’s published attacker IP (109.238.87.4) and user agents, or off-baseline bursts to high-tier AI models. Limits step 3.","code":"#!/usr/bin/env bash\nset -euo pipefail\nLOG=\"${1:-provider-audit.ndjson}\"\nUA_RE='python-requests/2\\.32\\.5|curl/8\\.19\\.0|Go-http-client/2\\.0|Chrome/148\\.0\\.0\\.0'\njq -c --arg re \"$UA_RE\" 'select(\n  (.timestamp >= \"2026-11-18T20:00:00Z\") and (\n    .source_ip == \"109.238.87.4\" or\n    (.user_agent // \"\" | test($re))\n  )\n)' \"$LOG\""},{"id":"novu-guard-template-and-region","filename":"guard-handlebars-and-region-iam.ts","language":"ts","description":"Runtime string guard for NestJS/class-validator template DTOs plus an AWS IAM deny policy blocking cross-region Secrets Manager reads from regional API server roles. Limits steps 1 and 2.","code":"import { IsDefined, IsString } from 'class-validator';\n\nexport class SafeCompileTemplateCommand {\n  @IsDefined()\n  @IsString()\n  template!: string;\n}\n\nexport function assertStringTemplate(input: unknown): string {\n  if (typeof input !== 'string') {\n    throw new Error('Template input must be a string, not a pre-parsed AST object');\n  }\n  return input;\n}\n// Pair with an IAM Deny on secretsmanager:GetSecretValue where\n// aws:ResourceTag/Region != aws:PrincipalTag/Region"}],"reproductionLab":{"title":"Reproduction lab","summary":"Checks your own Node.js lockfiles for vulnerable Handlebars versions (< 4.7.10) and scans class-validator DTOs for template fields missing @IsString().","bundleMeta":"Read-only repository check, MIT license","safetyNote":"Run only against your own authorized source repositories.","commands":"# Flag any bundled Handlebars older than 4.7.10 in lockfiles\nrg -n '\"handlebars\":\\s*\"[\\^~]?4\\.[0-7]\\.[0-9]\"' package.json pnpm-lock.yaml package-lock.json 2>/dev/null || echo \"PASS: no Handlebars < 4.7.10 found\"\n\n# Locate @IsDefined() template properties lacking @IsString()\nrg -n -A 3 '@IsDefined\\(\\)' src/ libs/ 2>/dev/null | rg -n 'template' || true"},"iocs":[{"type":"ip","value":"109.238.87.4","context":"Single attacker source IP published by Novu (RDAP UFO-TECHNOLOGIES-LIMITED / AS201738, BGP announced by AS55286 B2 Net Solutions; matches Wiz Agentic Attacks IOC CSV row 63)."},{"type":"url","value":"https://novuhq.notion.site/Novu-Incident-report-November-19th-420d03ad838f80ae916fee0d55bc802f","context":"Official Novu November 19 incident report detailing the lagging UK region, cross-region cloud credential read, 23,534 affected organizations, and Cloudflare Worker tampering."},{"type":"url","value":"https://github.com/novuhq/novu/security/advisories/GHSA-244j-pq88-5m65","context":"Official Novu GitHub Security Advisory for Handlebars 4.7.9 RCE in @novu/api-service < 3.20.0 (patched in v3.20.0)."},{"type":"url","value":"https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-8r5x-fm3f-whwj","context":"Upstream Handlebars critical advisory (CVE-2026-106446) for AST type confusion in compile(), fixed in 4.7.10."}],"publishedAt":"2026-12-05T09:00:00Z","origin":"editorial"}}