Back to skill

Security audit

ScraperAPI MCP

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent ScraperAPI MCP guidance skill, with disclosed scraping, search, crawling, and API-key requirements, but users should handle its external-service and setup risks carefully.

Install only if you intend to route scraping/search/crawler tasks through ScraperAPI and are comfortable providing a ScraperAPI API key. Prefer pinned, reviewed versions of the MCP helper packages, rotate the API key if it may have appeared in process logs, set crawl budgets and narrow URL patterns, and avoid callback URLs unless you control the HTTPS endpoint and approve sending crawl results there.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
references/setup.md:15
Finding
Unpinned Third-Party Packages Can Execute Unreviewed Code<![CDATA[ ## Vulnerability Details **File Location**: `references/setup.md`, lines 15–24 **Vulnerability Type**: Unpinned executable dependencies **Risk Level**: Medium ### Vulnerable Code ```json { "mcpServers": { "ScraperAPI": { "command": "npx", "args": ["mcp-remote", "https://mcp.scraperapi.com/mcp", "--header", "Authorization: Bearer ${SCRAPERAPI_API_KEY}"] } } } ``` ```text Python-based, installed via PyPI (`pip install scraperapi-mcp-server`). **Only the `scrape` tool is available.** Requires Python 3.11+. ``` ### Technical Analysis The documented installation paths resolve and execute third-party packages without pinning an exact version or verifying package integrity. Running `npx mcp-remote` may download and immediately execute the version currently published under that package name. Likewise, `pip install scraperapi-mcp-server` installs the package version selected by the package index at installation time. Consequently, the code executed by future users can differ from the code that existed when this Skill was audited. If an upstream package, maintainer account, distribution channel, or transitive dependency is compromised, following the documented setup can execute attacker-controlled code locally. The lack of hashes, lockfiles, or exact version constraints prevents users from reliably reproducing a reviewed dependency set. ### Attack Path 1. An attacker compromises the `mcp-remote` package, `scraperapi-mcp-server` package, a maintainer account, or a transitive dependency. 2. The attacker publishes a malicious release under the legitimate package name. 3. A user follows `references/setup.md` without specifying a reviewed version. 4. `npx` or pip resolves the malicious release from the package registry. 5. The package executes during installation or MCP server startup with the privileges of the Agent user. 6. The malicious code can access resources available to that user, potentially including project files and env ...[truncated 643 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin each dependency to an exact version that has been reviewed: - Use an explicitly versioned npm package reference. - Use `scraperapi-mcp-server==<reviewed-version>` for pip. 2. Commit lockfiles for any locally managed npm or Python environment. 3. Verify package integrity using registry checksums, pip hash checking, signed artifacts, or an internal artifact repository. 4. Install the verified npm dependency separately and start it with `npx --no-install` or an equivalent command that cannot fetch a new package at runtime. 5. Pin and audit transitive dependencies where feasible. 6. Document a controlled dependency-update process that includes source review, vulnerability scanning, and regression testing. 7. Run the MCP server under a restricted account or sandbox with access only to the files, environment variables, and network destinations required for its function. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
references/setup.md:16
Finding
ScraperAPI Bearer Token Is Passed Through the Process Argument Vector<![CDATA[ ## Vulnerability Details **File Location**: `references/setup.md`, line 16 **Vulnerability Type**: Sensitive credential exposure through command-line arguments **Risk Level**: Low ### Vulnerable Code ```json "args": ["mcp-remote", "https://mcp.scraperapi.com/mcp", "--header", "Authorization: Bearer ${SCRAPERAPI_API_KEY}"] ``` ### Technical Analysis The configuration expands `SCRAPERAPI_API_KEY` into a command-line argument used to construct an HTTP authorization header. Depending on the operating system, process launcher, MCP client, and diagnostics configuration, process arguments may be observable through: - Process inspection interfaces. - Monitoring and endpoint-management agents. - Debug or diagnostic logs. - Crash reports. - Process-launch audit records. Although exploitation generally requires local process visibility or access to collected diagnostics, exposing a reusable bearer token in the argument vector unnecessarily increases the credential's exposure surface. ### Attack Path 1. The MCP client expands `${SCRAPERAPI_API_KEY}` when spawning `mcp-remote`. 2. The expanded bearer token is included in the child process argument vector. 3. A local process observer, privileged monitoring tool, diagnostic collector, or log system captures the command arguments. 4. An attacker obtains the recorded argument data. 5. The attacker extracts and reuses the bearer token against the hosted ScraperAPI service. ### Impact Assessment An exposed token could allow unauthorized use of the associated ScraperAPI account within the permissions and limits assigned to that key. Potential consequences include: - Consumption of paid scraping credits. - Execution of scraping or crawler operations under the victim's account. - Access to service-side data available to that credential. - Service disruption through quota or credit exhaustion. This issue does not itself provide operating-system privilege escalation. Its scope is primarily the ScraperAPI accoun ...[truncated 62 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Avoid placing the expanded bearer token in the process argument vector. 2. Prefer a credential mechanism supported directly by the MCP client or remote connector, such as: - A protected environment variable consumed internally by the connector. - Standard input or an inherited protected file descriptor. - An operating-system credential store. - A secret-reference configuration that is resolved without becoming a command argument. 3. Ensure the secret is not copied into debug logs, crash reports, telemetry, or process-launch audit records. 4. Restrict access to process inspection and diagnostic output. 5. Use a narrowly scoped API key where the service supports scope restrictions. 6. Establish key rotation procedures and rotate any key suspected of having been recorded in process or diagnostic logs. 7. Document the credential's expected exposure boundaries and secure handling requirements. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger list is very broad and includes generic phrases such as finding information online, market research, competitive intelligence, and when unsure which ScraperAPI tool to use. This can cause the skill to activate in situations where simpler or safer built-in tools would be more appropriate, increasing the chance of unnecessary external data access, unexpected API usage, and inadvertent scraping of third-party sites.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
This markdown file describes extracting agent names, brokers, and phone numbers as part of the tool output, but it does not include any warning or usage note about handling personal contact information. Under the markdown-specific SQP-2 criteria, descriptions should warn when behavior could affect privacy, especially where personally identifiable contact data is returned.

Missing User Warnings

Low
Confidence
86% confidence
Finding
The document explicitly advises extracting URLs from search results to scrape full content, which can lead to collection or transmission of webpage data, but it does not include any user-facing warning about privacy, permissions, or site terms. Under the markdown-file criteria, guidance that can affect user data or external content access should disclose those implications.

Missing User Warnings

Low
Confidence
88% confidence
Finding
The guide tells users to combine Google News results with scraping to read full articles, but gives no caution that this behavior may access, store, or process third-party content and related metadata. For markdown documentation, potentially privacy- or integrity-affecting behaviors should be accompanied by a warning.

Rp1

Low
Category
MCP Rug Pull
Confidence
60% confidence
Finding
pip install without ==version installs the latest release, which could include malicious changes.

Static analysis

No suspicious patterns detected.