Back to skill

Security audit

Bright Data Best Practices

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent Bright Data scraping documentation, but its setup guidance includes unsafe remote and unpinned CLI execution patterns users should review before installing.

Install only if you are comfortable using Bright Data for web scraping and sharing requested URLs or search inputs with that service. Prefer pinned, reviewable CLI installation methods over curl-to-bash or unpinned npx, avoid hardcoding credentials in URLs or source files, and keep Bright Data API keys and browser passwords out of logs, prompts, and repositories.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
references/cli-setup.md:16
Finding
Remote Installer Piped Directly into Bash Without Integrity Verification<![CDATA[ ## Vulnerability Details **File Location**: `references/cli-setup.md:14-17` **Vulnerability Type**: Remote payload retrieval and immediate shell execution **Risk Level**: Critical ### Vulnerable Code ```markdown **Curl installer (macOS/Linux):** ```bash curl -fsSL https://cli.brightdata.com/install.sh | bash ``` ``` ### Technical Analysis The installation instruction downloads a mutable script from an external server and pipes it directly into Bash. The downloaded content is neither displayed for review nor checked against a trusted cryptographic hash or signature before execution. HTTPS protects transport integrity and authenticates the server under the assumptions of the TLS trust model, but it does not guarantee that the hosted script remains benign. Compromise of the vendor website, CDN, DNS infrastructure, TLS credentials, deployment pipeline, or hosting account could cause different commands to be returned after the Skill has already passed review. Because Bash executes the response immediately, the effective payload is controlled by the remote endpoint at installation time. It inherits the privileges and accessible environment of the user running the command. ### Attack Path 1. An attacker compromises, replaces, or gains control over content served from `https://cli.brightdata.com/install.sh`. 2. A user or AI agent follows the documented installation instruction. 3. `curl` retrieves the attacker-controlled response. 4. The pipe sends that response directly to Bash without inspection or integrity verification. 5. Bash executes the payload with the invoking user's permissions. 6. The payload can access files, credentials, environment variables, network resources, and other assets available to that user. If the command is run with elevated privileges, the compromise can extend to the entire host. ### Impact Assessment Successful exploitation provides arbitrary command execution under the invoking account. A malicious installer could: - ...[truncated 574 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Remove the direct `curl | bash` installation path. Prefer the documented package-manager installation after pinning an audited release. If a shell installer must remain available: 1. Download a version-specific artifact to a local file instead of piping it into a shell. 2. Publish its SHA-256 digest through a separately protected release channel. 3. Verify the digest or a cryptographic publisher signature before execution. 4. Allow the user to inspect the downloaded script. 5. Execute it as a separate command only after successful verification. 6. Avoid `sudo` and document the minimum permissions required. 7. Pin the installer URL to an immutable release rather than a mutable generic path. For example: ```bash curl -fL -o brightdata-install.sh \ https://cli.brightdata.com/releases/VERSION/install.sh printf '%s %s\n' 'EXPECTED_SHA256' 'brightdata-install.sh' | sha256sum -c - less brightdata-install.sh bash brightdata-install.sh ``` The expected digest must come from a trusted, independently authenticated source; a checksum downloaded from the same potentially compromised location does not provide sufficient protection. ]]>

T08 · Insecure Dependencies

Warning
Location
references/cli-setup.md:21
Finding
Unpinned Bright Data CLI Package Is Automatically Downloaded and Executed<![CDATA[ ## Vulnerability Details **File Location**: `references/cli-setup.md:19-22` **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: Medium ### Vulnerable Code ```markdown **One-off (no install):** ```bash npx --yes --package @brightdata/cli brightdata <command> ``` ``` ### Technical Analysis The command does not specify an exact version of `@brightdata/cli`. Consequently, package resolution can select a newer, mutable registry release that was not reviewed with this Skill. The `--yes` option suppresses the normal installation confirmation, reducing the opportunity for the user to inspect what will be downloaded and executed. An npm package can execute application code when the requested command starts and may also execute lifecycle scripts during installation, subject to the npm configuration in use. If the package publication account, package contents, dependency chain, or registry delivery path is compromised, invoking this instruction could execute malicious code locally. The scoped package name reduces ordinary name-confusion risk, but it does not mitigate compromise of the legitimate package, publisher account, release process, or transitive dependencies. ### Attack Path 1. An attacker compromises the package publisher, release pipeline, package registry account, or a dependency included by a future release. 2. A malicious version is published under the legitimate `@brightdata/cli` package name. 3. A user or AI agent runs the documented unversioned `npx` command. 4. npm resolves and downloads the current package version without an explicit confirmation because of `--yes`. 5. Package lifecycle code or the CLI entry point executes under the invoking user's account. 6. Malicious code can access resources available to that account and can install additional components. ### Impact Assessment Successful exploitation could result in arbitrary code execution with the invoking user's privileges. Exposed assets may include ...[truncated 538 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Pin the CLI to a specific version that has been reviewed: ```bash npx --package @brightdata/cli@X.Y.Z brightdata <command> ``` Additional hardening should include: 1. Replace `X.Y.Z` only through a controlled dependency-update process. 2. Review package provenance, publisher identity, release signatures, and registry metadata before updating. 3. Use npm integrity metadata and a lockfile for repeatable project installations where practical. 4. Audit transitive dependencies and monitor the package for publisher or ownership changes. 5. Avoid `--yes` when interactive confirmation and inspection are feasible. 6. In CI, execute the package in an isolated, minimally privileged worker with only the credentials required for the specific task. 7. Prevent the CLI process from accessing unrelated secrets and sensitive filesystem paths. 8. Consider disabling lifecycle scripts during installation if the verified CLI supports operation under that restriction. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (88)

Ae1

High
Category
analysis-evasion
Content
See **[references/browser-api.md](references/browser-api.md)** for complete reference including all CDP functions, bandwidth optimization, CAPTCHA patterns, and
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
See **[references/browser-api.md](references/browser-api.md)** for complete reference including all CDP functions, bandwidth optimization, CAPTCHA patterns, and
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

External Script Fetching

High
Category
Supply Chain
Content
npm install -g @brightdata/cli
```

**Curl installer (macOS/Linux):**
```bash
curl -fsSL https://cli.brightdata.com/install.sh | bash
```
Confidence
96% confidence
Finding
`curl ... | bash` executes a remote script directly with no integrity verification, pinning, or review step. If the hosting domain, network path, or served script is compromised, users could run arbitrary attacker-controlled code during setup.

Chaining Abuse

High
Category
Tool Misuse
Content
**Curl installer (macOS/Linux):**
```bash
curl -fsSL https://cli.brightdata.com/install.sh | bash
```

**One-off (no install):**
Confidence
97% confidence
Finding
The `| bash` chain is the dangerous execution step that turns remote content retrieval into immediate code execution. In a skill intended for coding assistants and developers, this is more dangerous because it may be copied verbatim into automated or semi-automated workflows without scrutiny.

Credential Access

High
Category
Privilege Escalation
Content
The zones probe is the most reliable auth check: it requires valid credentials and returns quickly.

**Config file locations:**
- Linux: `~/.config/brightdata-cli/credentials.json`
- macOS: `~/Library/Application Support/brightdata-cli/credentials.json`
- Windows: `%APPDATA%\brightdata-cli\credentials.json`
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
The zones probe is the most reliable auth check: it requires valid credentials and returns quickly.

**Config file locations:**
- Linux: `~/.config/brightdata-cli/credentials.json`
- macOS: `~/Library/Application Support/brightdata-cli/credentials.json`
- Windows: `%APPDATA%\brightdata-cli\credentials.json`
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
The zones probe is the most reliable auth check: it requires valid credentials and returns quickly.

**Config file locations:**
- Linux: `~/.config/brightdata-cli/credentials.json`
- macOS: `~/Library/Application Support/brightdata-cli/credentials.json`
- Windows: `%APPDATA%\brightdata-cli\credentials.json`
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

External Transmission

Medium
Category
Data Exfiltration
Content
```python
# Submit
response = requests.post(
    "https://api.brightdata.com/request",
    params={"async": "1"},
    headers={"Authorization": f"Bearer {API_KEY}"},
Confidence
70% 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
```python
# Sync (up to 20 URLs, returns immediately)
response = requests.post(
    "https://api.brightdata.com/datasets/v3/scrape",
    params={"dataset_id": "YOUR_DATASET_ID", "format": "json"},
    headers={"Authorization": f"Bearer {API_KEY}"},
Confidence
70% 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
import time

# Trigger
snapshot_id = requests.post(
    "https://api.brightdata.com/datasets/v3/trigger",
    params={"dataset_id": DATASET_ID, "format": "json"},
    headers={"Authorization": f"Bearer {API_KEY}"},
Confidence
70% 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
84% confidence
Finding
This markdown file includes connection strings that embed `${AUTH}` directly in WebSocket/HTTPS URLs, and later examples hardcode `username:password` values into those endpoints. While the file explains how to authenticate, it does not clearly warn readers that embedding credentials in URLs or source examples can expose secrets via logs, shell history, screenshots, or copied code.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The documentation demonstrates sending a base64-encoded client certificate and private key to `Browser.addCertificate` without any warning about secure key handling. In an assistant-driven coding workflow, users may copy this literally and embed private keys in code, repositories, prompts, logs, or telemetry, creating a realistic secret-exposure risk.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
### Security / Client Certificates

#### `Browser.addCertificate`
Install a client SSL/TLS certificate for authenticated domain access. Certificate is automatically removed when the session ends.

```javascript
await client.send("Browser.addCertificate", {
Confidence
80% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

External Transmission

Medium
Category
Data Exfiltration
Content
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`
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
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`
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
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`
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
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`
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
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`
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
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`
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
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`
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
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`
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
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`
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
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`
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
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.