DocsNotificationsCVE Email Alerts

CVE Email Alerts

After every run of the CVE matcher, each user in immediate mode receives one email per new CVE above their threshold and in their scope, listing every affected host with the package, version, type and path. When more than NOTIFICATION_BURST_LIMIT CVEs (default 10) are due to one user at once, they receive a single summary email instead.


When It Is Sent

At the end of every run of the matcher (match_cves_to_assets, hourly and weekly full run) the Celery task dispatch_finding_notifications is queued with the start time of the run, even when the matcher fails halfway (the findings already written are notified). It groups by CVE the new findings: CVE findings created since that time that are still active and open when the dispatch runs (suppressed, false positive, risk accepted and resolved findings are excluded). A failure to queue the task is logged and does not fail the matcher. Run without arguments, the task looks at the findings of the last 24 hours.

Who Receives It

Active users with an email address whose notification preferences (/docs/notifications/preferences) have email notifications on and the Immediate frequency. Users in Hourly or Daily digest mode (/docs/notifications/digests) receive here only the known exploited vulnerabilities (the CVE is in the CISA KEV catalog, Always notify KEV is on and finding.kev is selected); their other CVEs go to the digest. A CVE is notified to a user when at least one of its new findings is in the user's scope and either:

  • the finding.created event is selected and the finding severity is at or above the minimum severity, or
  • the CVE is in the CISA KEV catalog, Always notify KEV is on and the finding.kev event is selected

Scope

A finding is in the user's scope when its host belongs to one of the selected environments (or no environment is selected) and to one of the selected teams (or no team is selected); a host without an environment or team is outside a non-empty scope. The minimum severity is checked only on the findings in scope: a critical finding on a host outside the scope does not trigger an email for a medium finding inside it.

Content

The email is in HTML with a plain-text alternative, uses inline CSS only and follows the light or dark theme of the mail client. It contains:

  • Severity, CVSS score, publication date and description from the NVD mirror; for a CVE not in NVD, the finding description and CVSS, and the date "Unknown"
  • The KEV, EPSS (percentage) and Exploit badges when present, and the priority (the best band and highest score among the listed findings)
  • Links to CVE.org, NVD and OSV, and the "Open in AsPeekIt" button to /dashboard/security?cve=<id>&status=open
  • Every active open finding of the CVE in the user's scope (old ones too), grouped by host and sorted by host name, with package, installed version, type (ecosystem, or the source) and path
  • A footer explaining why the email was sent (threshold or KEV, and the scope) with a link to /dashboard/settings to change the preferences

Burst Protection

A single dispatch can find hundreds of new CVEs at once, for example at the first package inventory of a host. The dispatch first plans, per user, the new alerts and the retries, leaving out the CVEs already notified to the user. When they are more than NOTIFICATION_BURST_LIMIT (environment variable, default 10, at least 1), the user receives ONE summary email instead of one email per CVE:

  • Subject "[AsPeekIt] New vulnerabilities summary: <N> new CVEs"; the body uses the digest layout (/docs/notifications/digests): the CVEs sorted by priority with severity, priority and number of hosts, at most 50 listed and the rest as "and N more CVEs", without the Resolved and SLA breached counts
  • A footer explains that one summary was sent instead of N separate alerts
  • Once the summary is sent, every CVE in it is recorded as notified (cve:<id>): none is alerted again nor retried. The summary itself is delivered once, with the event key burst:<time of the dispatch>
  • If the summary fails, every CVE in it is recorded as failed and the retry phase of the next dispatch picks them up again (as a summary, if they are still above the limit)
  • At or below the limit, the usual one email per CVE is sent. The summary is logged as a warning ("CVE alert burst for user ...") and counted once in the task result

Note: The same limit applies to the in-app notifications (/docs/notifications/in-app) and to each external channel (/docs/notifications/channels).

Truncation

At most 20 hosts are listed; when more are affected the list ends with "and N more hosts" (for example 50 hosts: the first 20 and "and 30 more hosts"). The filtered queue in AsPeekIt always shows all of them.

Idempotency

Each email is delivered with the event key cve:<id> on the email channel: a user receives at most one email per CVE, ever. Hosts affected by the same CVE in later runs do not send a new email. Every attempt is recorded in NotificationLog.

docker exec idp-backend python manage.py shell -c \
  "from apps.notifications.tasks import dispatch_finding_notifications as d; print(d(since='2026-11-27T00:00:00Z'))"

Retries and Recovery

Each dispatch runs in three phases:

  • Stale pending deliveries: a pending email older than 1 hour (the worker died between claiming the delivery and recording its outcome) is marked failed with the error "Stale pending delivery (worker lost)"
  • New CVEs: the alerts of the CVEs with new findings since the start of the run
  • Retry: every CVE email that failed and was not sent since is retried at each dispatch for 7 days from its first failed attempt (later failed retries do not extend the window), whatever the window of the dispatch, if the user still qualifies on the current open findings of the CVE in their scope

Note: An SMTP failure is recorded as failed, does not stop the other users and is retried by the next dispatches for 7 days from the first failed attempt. A rare double email is possible after a stale pending delivery (the worker died after the SMTP send). If the task itself was lost (broker down), run a dispatch by hand with a wider since: only what was not sent yet is sent.

Configuration

The links of the email use FRONTEND_BASE_URL, the public URL of the frontend (environment variable, default http://localhost:3000, without a trailing slash). The sender is DEFAULT_FROM_EMAIL and the SMTP server is configured with the EMAIL_* settings. The task returns and logs a summary {cves, sent, skipped, failed, retried} (retried: the emails sent by the retry phase). The emails carry the Auto-Submitted: auto-generated header, so mail servers do not answer them with auto-replies.

Warning: Set FRONTEND_BASE_URL in production: with the default the links of the emails point to localhost.