Back to skill

Security audit

Cal.com

Security checks for vulnerabilities and agentic risk

Overview

This Cal.com API skill is legitimate in purpose but should be reviewed because one example could leak API keys and some booking/webhook actions lack clear safety warnings.

Install only if you are comfortable giving an agent access to real Cal.com API credentials and scheduling data. Use narrowly scoped keys, keep secrets in environment variables or a secrets manager, restrict requests to https://api.cal.com/v2, require explicit confirmation before creating, cancelling, rescheduling, deleting, or disconnecting resources, and avoid logging raw webhook payloads or forwarding them to untrusted endpoints.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
references/authentication.md:275
Finding
Bearer Credential Disclosure Through an Unrestricted Request URL## Vulnerability Details **File Location**: `references/authentication.md`, lines 275-307 **Vulnerability Type**: Credential disclosure and server-side request forgery caused by an unrestricted authenticated request destination **Risk Level**: High ### Vulnerable Code ```javascript async function makeAuthenticatedRequest(url, options = {}) { let response = await fetch(url, { ...options, headers: { ...options.headers, 'Authorization': `Bearer ${apiKey}` } }); if (response.status === 401) { // Refresh the API key const refreshResponse = await fetch('https://api.cal.com/v2/api-keys/refresh', { method: 'POST', headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' }, body: JSON.stringify({}) }); if (refreshResponse.ok) { const { data } = await refreshResponse.json(); apiKey = data.apiKey; // Retry original request with new key response = await fetch(url, { ...options, headers: { ...options.headers, 'Authorization': `Bearer ${apiKey}` } }); } } return response; } ``` ### Technical Analysis The helper accepts an unrestricted `url` argument and unconditionally attaches the Cal.com bearer credential. It does not require a relative API path, validate the destination origin, restrict the scheme to HTTPS, or prevent redirects to an untrusted origin. If an attacker can influence `url`, the initial request discloses the current API key to the selected destination. The behavior following an HTTP 401 response makes the issue more severe: the helper requests a replacement API key and then transmits that newly generated key to the same unrestricted destination. The unrestricted request target can also create a server-side request forgery condition. Depending on the runtime's netw ...[truncated 1935 chars]
Remediation
## Remediation Suggestions - Replace the arbitrary URL parameter with a relative Cal.com API path. - Resolve paths against a fixed base URL such as `https://api.cal.com/v2/`. - Before attaching credentials, enforce: - The `https:` scheme. - The exact expected hostname. - An approved port. - No URL user information. - An approved API path prefix. - Disable automatic cross-origin redirects or validate the destination after every redirect. - Never retry an authenticated request against a destination that has not passed origin validation. - Keep API-key refresh logic separate from general request logic. - Use narrowly scoped credentials and avoid platform-admin keys unless explicitly required. - Add tests covering attacker-controlled hosts, alternate ports, HTTP URLs, user-information URL syntax, redirect chains, loopback addresses, and private network addresses. A safer interface would resemble: ```javascript const CAL_API_ORIGIN = 'https://api.cal.com'; function buildCalApiUrl(path) { const url = new URL(path, 'https://api.cal.com/v2/'); if (url.origin !== CAL_API_ORIGIN || !url.pathname.startsWith('/v2/')) { throw new Error('Unapproved Cal.com API destination'); } return url; } ```

T09 · Insecure Skill Coding Practices

Warning
Location
references/webhooks.md:313
Finding
Webhook Logging Guidance Encourages Persistent Storage of Sensitive Personal Data## Vulnerability Details **File Location**: `references/webhooks.md`, lines 313-318 **Vulnerability Type**: Excessive logging and retention of sensitive webhook data **Risk Level**: Medium ### Vulnerable Guidance ```markdown ## Best Practices 1. **Always verify signatures**: Use the webhook secret to verify payloads 2. **Respond quickly**: Return 200 within 5 seconds, process async if needed 3. **Handle retries**: Webhooks are retried on failure, implement idempotency 4. **Use HTTPS**: Always use HTTPS endpoints for security 5. **Log payloads**: Store webhook payloads for debugging 6. **Monitor failures**: Track webhook delivery failures ``` ### Technical Analysis The guidance recommends storing complete webhook payloads for debugging without requiring redaction, minimization, access controls, encryption, or retention limits. The webhook payloads documented in the same file can contain organizer and attendee names, email addresses, time zones, meeting titles, descriptions, meeting URLs, booking identifiers, form responses, metadata, cancellation reasons, and potentially recording or transcription event information. Full-payload logging therefore creates a secondary repository of scheduling and personal data outside the primary Cal.com data store. Application logs commonly have broader access than production databases and may be exported to third-party monitoring systems, retained for long periods, copied into support tickets, or exposed during incident debugging. Storing entire payloads is not necessary for routine webhook diagnostics and exceeds data-minimization requirements. ### Attack Path 1. A webhook is configured for events such as `BOOKING_CREATED`, `FORM_SUBMITTED`, or recording-related notifications. 2. Cal.com sends a legitimate payload containing attendee, organizer, meeting, or form data. 3. An implementation follows the documentation and stores the complete payload in application or observability l ...[truncated 1011 chars]
Remediation
## Remediation Suggestions - Replace the recommendation to log complete payloads with explicit data-minimization guidance. - Log only operational fields needed for diagnosis, such as: - Trigger type. - Webhook or delivery identifier. - Booking UID only when necessary. - Receipt timestamp. - Processing status and duration. - A sanitized error code. - Redact names, email addresses, meeting URLs, descriptions, form responses, metadata, cancellation reasons, recording references, and transcription data. - Do not log webhook secrets, signatures, authorization headers, or raw request bodies. - Apply short, documented retention periods. - Encrypt logs in transit and at rest. - Restrict log access using role-based controls and audit log access. - Avoid sending sensitive fields to third-party observability services unless contractually approved and necessary. - Provide an opt-in, time-limited diagnostic mode that uses structured redaction rather than unrestricted payload logging. - Add automated tests or log filters to detect accidental personal-data and secret leakage.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (30)

Credential Access

High
Category
Privilege Escalation
Content
|--------|-------------|
| `x-cal-client-id` | OAuth client ID |
| `x-cal-secret-key` | OAuth client secret key |
| `Authorization` | Bearer token (managed user access token) |

### Example Platform Request
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
|--------|-------------|
| `x-cal-client-id` | OAuth client ID |
| `x-cal-secret-key` | OAuth client secret key |
| `Authorization` | Bearer token (managed user access token) |

### Example Platform Request
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
### Disconnect a Calendar

```http
DELETE /v2/calendars/{calendar}/disconnect
```

## Supported Calendar Types
Confidence
80% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
## Delete an Event Type

```http
DELETE /v2/event-types/{eventTypeId}
```

## Team Event Types
Confidence
80% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
## Delete a Schedule

```http
DELETE /v2/schedules/{scheduleId}
```

Note: You cannot delete your last schedule. At least one schedule must exist.
Confidence
80% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
Release a slot reservation if the user abandons the booking flow.

```http
DELETE /v2/slots/reservations/{uid}
```

### Path Parameters
Confidence
80% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
Release a slot reservation if the user abandons the booking flow.

```http
DELETE /v2/slots/reservations/{uid}
```

### Path Parameters
Confidence
80% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
## Delete a Webhook

```http
DELETE /v2/webhooks/{webhookId}
```

## Event Type Webhooks
Confidence
80% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

External Transmission

Medium
Category
Data Exfiltration
Content
All API requests should be made to:
```
https://api.cal.com/v2
```

## Authentication
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
All API requests should be made to:
```
https://api.cal.com/v2
```

## Authentication
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
All API requests should be made to:
```
https://api.cal.com/v2
```

## Authentication
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
All API requests should be made to:
```
https://api.cal.com/v2
```

## Authentication
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
All API requests should be made to:
```
https://api.cal.com/v2
```

## Authentication
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
All API requests should be made to:
```
https://api.cal.com/v2
```

## Authentication
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
All API requests should be made to:
```
https://api.cal.com/v2
```

## Authentication
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
All API requests should be made to:
```
https://api.cal.com/v2
```

## Authentication
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill instructs use of a Bearer API key but does not warn against exposing, logging, hardcoding, or sharing that secret. In an agent context, omission of secret-handling guidance can lead to credential leakage through prompts, tool logs, code samples, or downstream requests.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The booking examples collect and transmit attendee name, email, and timezone, which are personal data, without any notice about consent, minimization, retention, or lawful handling. In agent-driven workflows, this increases the risk of unnecessary disclosure or processing of PII.

Missing User Warnings

Medium
Confidence
85% confidence
Finding
The skill documents cancellation and rescheduling actions without warning that they change real bookings and may affect users or customers. In an autonomous agent setting, lack of confirmation and impact disclosure can cause unintended destructive actions against production schedules.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
Webhook setup sends booking event data to a subscriber URL but does not warn that event payloads may contain sensitive scheduling or attendee information or that the destination is an external receiver. This can lead to data exfiltration, accidental third-party disclosure, or insecure webhook handling.

External Transmission

Medium
Category
Data Exfiltration
Content
### Example Platform Request

```bash
curl -X GET "https://api.cal.com/v2/bookings" \
  -H "x-cal-client-id: your_client_id" \
  -H "x-cal-secret-key: your_secret_key" \
  -H "Authorization: Bearer managed_user_access_token" \
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
if (response.status === 401) {
    // Refresh the API key
    const refreshResponse = await fetch('https://api.cal.com/v2/api-keys/refresh', {
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${apiKey}`,
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The documentation describes cancellation as a simple API call and even highlights that attendees automatically receive cancellation emails, but it does not warn that this operation is disruptive and can alter calendars, notifications, and meeting state for real users. In an agent skill context, missing guardrails around destructive actions increases the chance that an LLM-driven integration will cancel bookings without explicit user confirmation or adequate impact awareness.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
This markdown file documents a DELETE endpoint that disconnects a calendar, which can affect booking availability and integration state, but it provides no user-facing warning or cautionary note. Under the markdown-specific missing-warning rule, destructive or system-affecting behavior should be disclosed in the skill description.

Missing User Warnings

Medium
Confidence
85% confidence
Finding
The ICS feed save operation accepts a remote calendar URL without any warning about privacy, trust, or external data ingestion. In an agent/tooling context, this can lead users to import third-party calendar data that may expose sensitive schedule metadata or cause the system to consume untrusted remote content without appropriate validation expectations.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
references/authentication.md:29