/

CVE-2026-57858

Severity:

HIGH RISK

(8.9)

Stored XSS (CWE-79) in Cal.com Cal.diy Booking Pages

CVE-2026-57858

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Client-Side Code Execution and Account Compromise

Severity:

HIGH RISK

(8.9)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Cal.com Cal.diy contains a stored cross-site scripting vulnerability in the BookingPageTagManager component, where an authenticated event owner can place unsanitized JavaScript in an analytics tracking ID. The script may execute in the browser of visitors to the affected public booking page, enabling session theft, forged requests, and propagation to other events when additional conditions are present.

Affected context

The issue occurs in Cal.com Cal.diy versions 2.1.1 through 6.2.0 when an event owner can configure an analytics tracking identifier for a public booking page. Risk exists when that value is embedded into an inline script without context-appropriate validation or output encoding, allowing the stored value to execute for page visitors.

Exploit preconditions

  • Attack surface: Public booking pages rendered by the BookingPageTagManager component
  • Required access: Authenticated permissions to create or manage an event and its analytics tracking configuration
  • Trigger point: A visitor loads an affected public booking page
  • Why exploitation is possible: The tracking identifier is stored and later inserted into an inline JavaScript context without adequate sanitization or encoding

Why this happens

The underlying bug is a failure to treat an analytics tracking identifier as untrusted data before embedding it in executable JavaScript. A value that crosses a script-string boundary can alter the surrounding program and cause browser-side code execution. This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as cross-site scripting.

Potential impact

  • Attackers may steal accessible session information or other page data
  • Attackers could forge authenticated requests in a victim's browser
  • User actions and booking-related data may be modified
  • A malicious payload can spread to additional events when chained with writable or CSRF-affected functionality
  • Public booking pages may be used to target multiple visitors

General mitigation guidance

Mitigation generally focuses on reducing trust in tracking configuration values and preventing data from entering executable contexts.

Common defensive patterns include:

  • Validate analytics identifiers against a strict allowlist and expected format
  • Avoid constructing inline JavaScript from user-controlled values
  • Prefer non-executable data attributes or trusted API integrations for analytics configuration
  • Apply context-aware output encoding when values must be rendered
  • Use a restrictive Content Security Policy that limits inline script execution
  • Apply least privilege to event-management roles and limit who can alter public-page settings
  • Use CSRF protections and authorization checks on state-changing event-management endpoints

How teams detect issues like this

Organizations can look for this issue through:

  • Static analysis rules that identify user-controlled data entering inline script blocks
  • Code review checks for string interpolation or concatenation inside JavaScript contexts
  • Tests that submit metacharacters and verify that rendered values remain inert
  • Inventory and monitoring of event analytics configuration changes
  • Content Security Policy violation reporting for unexpected script execution
  • Policy enforcement requiring context-aware output encoding and approved analytics integration patterns

Automated security review tools may help identify dangerous data flows, but findings should be confirmed against the rendering context and authorization model.

Sources

SourceLink
ashtonr.comashtonr.com/blog/cve-2026-57858/
github.comgithub.com/calcom/cal.com
vulncheck.comvulncheck.com/advisories/cal-com-cal-diy-stored-xss-via-bookingpagetagmanager-analytics-tracking-id

Frequently asked

questions

It can affect remote visitors of a public booking page, but exploitation generally requires an authenticated event owner or another principal with permission to modify the relevant tracking configuration.

The attacker needs event-management access sufficient to store a malicious analytics tracking value. Visitors generally do not need an account to trigger the stored script by opening the public booking page.

Keep user-controlled values out of inline executable JavaScript. Validate identifiers against a strict expected format and use safe, context-aware encoding or non-executable configuration mechanisms.

Combine secure output handling with authorization controls, CSRF defenses, Content Security Policy, security-focused tests, and monitoring of changes to public event configuration.

Find out what's already
exploitable in your codebase.