Back to skill

Security audit

Notion API Tools

Security checks for vulnerabilities and agentic risk

Overview

This Notion CLI is mostly purpose-aligned, but it includes under-documented commands that can modify Notion blocks immediately.

Install only if you are comfortable giving the agent a Notion integration token that can read or modify whatever pages and databases are shared with that integration. Review the block append and update commands before use, and prefer a limited Notion integration or test workspace because mutations happen immediately.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (16)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill exposes capabilities requiring environment access and network access, but the manifest does not declare any tool scope or allowed-tools constraints. This weakens reviewability and enforcement, making it easier for an agent to invoke broader-than-expected capabilities when handling a sensitive Notion token and making outbound API calls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill advertises a create-page command that writes to Notion, but it does not clearly warn users that running it will modify remote user data. In agentic contexts, missing mutation warnings can cause unintended writes, surprise side effects, or misuse of an authorized integration token against production workspaces.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The top-of-file documentation says the CLI is for search, query data_sources, create page, and also block retrieval/list-append editing. However, the implemented commands additionally include update-block, which is a broader block modification capability than the documented 'append block children' editing scope. This is an active mismatch between the file's stated intent and implemented behavior.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/notion-api.mjs (reported line 7)May include surrounding context.

js
* Minimal Notion API CLI (no deps) for:
 *  - search
 *  - query data_sources
 *  - create page
 *  - retrieve blocks + list/append block children (for simple page editing)
 *
 * Auth:

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/notion-api.mjs (reported line 81)May include surrounding context.

js
const query = args._.join(' ');
  if (!query) die('usage: search <query> [--page-size N]');
  const page_size = args['page-size'] ? Number(args['page-size']) : 10;
  const out = await notionFetch('https://api.notion.com/v1/search', {
    method: 'POST',
    body: { query, page_size }
  });

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/notion-api.mjs (reported line 81)May include surrounding context.

js
const query = args._.join(' ');
  if (!query) die('usage: search <query> [--page-size N]');
  const page_size = args['page-size'] ? Number(args['page-size']) : 10;
  const out = await notionFetch('https://api.notion.com/v1/search', {
    method: 'POST',
    body: { query, page_size }
  });

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/notion-api.mjs (reported line 95)May include surrounding context.

js
const query = args._.join(' ');
  if (!query) die('usage: search <query> [--page-size N]');
  const page_size = args['page-size'] ? Number(args['page-size']) : 10;
  const out = await notionFetch('https://api.notion.com/v1/search', {
    method: 'POST',
    body: { query, page_size }
  });

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/notion-api.mjs (reported line 101)May include surrounding context.

js
const query = args._.join(' ');
  if (!query) die('usage: search <query> [--page-size N]');
  const page_size = args['page-size'] ? Number(args['page-size']) : 10;
  const out = await notionFetch('https://api.notion.com/v1/search', {
    method: 'POST',
    body: { query, page_size }
  });

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/notion-api.mjs (reported line 122)May include surrounding context.

js
const query = args._.join(' ');
  if (!query) die('usage: search <query> [--page-size N]');
  const page_size = args['page-size'] ? Number(args['page-size']) : 10;
  const out = await notionFetch('https://api.notion.com/v1/search', {
    method: 'POST',
    body: { query, page_size }
  });

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/notion-api.mjs (reported line 129)May include surrounding context.

js
const query = args._.join(' ');
  if (!query) die('usage: search <query> [--page-size N]');
  const page_size = args['page-size'] ? Number(args['page-size']) : 10;
  const out = await notionFetch('https://api.notion.com/v1/search', {
    method: 'POST',
    body: { query, page_size }
  });

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/notion-api.mjs (reported line 141)May include surrounding context.

js
const query = args._.join(' ');
  if (!query) die('usage: search <query> [--page-size N]');
  const page_size = args['page-size'] ? Number(args['page-size']) : 10;
  const out = await notionFetch('https://api.notion.com/v1/search', {
    method: 'POST',
    body: { query, page_size }
  });

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/notion-api.mjs (reported line 152)May include surrounding context.

js
const query = args._.join(' ');
  if (!query) die('usage: search <query> [--page-size N]');
  const page_size = args['page-size'] ? Number(args['page-size']) : 10;
  const out = await notionFetch('https://api.notion.com/v1/search', {
    method: 'POST',
    body: { query, page_size }
  });

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/notion-api.mjs (reported line 162)May include surrounding context.

js
const query = args._.join(' ');
  if (!query) die('usage: search <query> [--page-size N]');
  const page_size = args['page-size'] ? Number(args['page-size']) : 10;
  const out = await notionFetch('https://api.notion.com/v1/search', {
    method: 'POST',
    body: { query, page_size }
  });

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/notion-api.mjs (reported line 122)May include surrounding context.

js
}
  };

  const out = await notionFetch('https://api.notion.com/v1/pages', { method: 'POST', body: payload });
  console.log(JSON.stringify(out, null, 2));
}

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes the skill as a generic Notion API CLI for search, querying data sources/databases, and creating pages. This file also exposes retrieve-block, block-children, append-blocks, and update-block commands, including write-capable page/block editing operations that are not reflected in the manifest description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The tool exposes write operations that can modify Notion content immediately via append and update calls, with no confirmation prompt, dry-run mode, or safety interlock. In an agentic context, this increases the risk of accidental or unauthorized workspace modification if the skill is invoked with untrusted parameters or by mistake.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/notion-api.mjs:18