Back to skill

Security audit

Wip Xai Grok Private

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly matches its xAI search and media purpose, but it needs review because image editing can read arbitrary local file paths and it automatically tries to use a local 1Password secret.

Install only if you are comfortable sending prompts, search queries, and media to xAI. Avoid using the MCP image-editing tool with local file paths unless the skill is fixed to restrict paths and file sizes, and be aware it may try to read the xAI API key from 1Password if the environment variable is missing.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (1)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
core.mjs:244
Finding
Unrestricted Local File Read Through Image Editing Input<![CDATA[ ## Vulnerability Details **File Location**: `core.mjs:244-260` **Vulnerability Type**: Arbitrary local file read and resource exhaustion **Risk Level**: Medium ### Vulnerable Code ```javascript if (!prompt) throw new Error('prompt is required'); if (!image) throw new Error('image is required (URL or base64 data URI)'); const images = Array.isArray(image) ? image : [image]; if (images.length > 3) throw new Error('Maximum 3 source images'); // Build input with image(s) + text prompt const content = []; for (const img of images) { // If it looks like a file path, read and base64 encode let imageUrl = img; if (!img.startsWith('http') && !img.startsWith('data:')) { const data = readFileSync(img); const ext = img.split('.').pop().toLowerCase(); const mime = ext === 'png' ? 'image/png' : ext === 'webp' ? 'image/webp' : 'image/jpeg'; imageUrl = `data:${mime};base64,${data.toString('base64')}`; } content.push({ type: 'image_url', image_url: { url: imageUrl } }); } ``` ### Technical Analysis The `edit_image` function interprets every string that does not begin with `http` or `data:` as a local filesystem path. It then passes that attacker-controlled path directly to `readFileSync`. No security boundary is enforced around the path. In particular, the implementation does not: - Restrict access to an approved image directory. - Resolve and validate canonical paths. - prevent directory traversal or absolute paths. - Reject symbolic links or non-regular files. - Verify that the content is actually a supported image. - Limit the maximum file size before loading the entire file into memory. The function is reachable through the MCP tool handler in `mcp-server.mjs:132-134`, where caller-provided parameters are forwarded directly to `edit_image`: ```javascript case 'grok_edit_image': result = await edit_image(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; ``` The MCP schema describes the ...[truncated 2492 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Separate remote and local image interfaces** - Make the MCP-facing function accept only validated HTTPS URLs or image data URIs. - If local-file editing is needed by the CLI, implement it as a separate local-only function requiring an explicit file option. 2. **Reject unsupported URI schemes and ambiguous strings** - Parse URLs with the standard `URL` class. - Allow only `https:` for remote images. - Validate data URIs against an allowlist such as `image/jpeg`, `image/png`, and `image/webp`. - Reject plain paths in the MCP handler before calling the core function. 3. **Constrain permitted local files** - Resolve paths with `realpath` and require them to remain under a configured upload directory. - Reject traversal outside that directory. - Use `lstat` and reject symbolic links, devices, FIFOs, sockets, and other non-regular files. - Run the MCP process under a dedicated account with minimal filesystem permissions. 4. **Validate file content and size** - Check file size before reading it and enforce a conservative maximum. - Verify image magic bytes instead of relying on the filename extension. - Avoid synchronous whole-file reads in a long-running MCP process. 5. **Correct the request construction** - The constructed `content` array is currently unused. Remove the local read and unused encoding logic if the xAI endpoint expects the original image value. - If encoded image content is intentionally required, send only content that has passed all path, type, and size checks, and clearly disclose that local media will be transmitted to xAI. 6. **Harden the MCP schema and handler** - Add enforceable format constraints where supported. - Perform runtime validation regardless of schema declarations. - Return a generic validation error that does not distinguish nonexistent, inaccessible, or disallowed local paths. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (25)

Missing User Warnings

High
Confidence
97% confidence
Finding
This code may read a local file path supplied as input, convert the file contents to a data URI, and send that content to a third-party API. That creates a real exfiltration risk because callers may not realize a local path will cause host file contents to be uploaded, and the skill context makes such host-file access more dangerous than ordinary remote image editing.

Known Vulnerable Dependency: fast-uri==3.1.0 — 7 advisory(ies): CVE-2026-13676 (fast-uri vulnerable to host confusion via failed IDN canonicalization); CVE-2026-18446 (fast-uri vulnerable to host confusion via backslash authority introducer); CVE-2026-75975 (fast-uri vulnerable to server-side request forgery via malformed IPv6 normalizat) +4 more

High
Category
Supply Chain
Confidence
88% confidence
Finding
fast-uri 3.1.0 is flagged with multiple URI parsing issues, including host confusion and SSRF-relevant normalization bugs. In a skill that advertises web and X search capabilities, incorrect URL parsing can materially increase exposure if any user-controlled URLs, redirects, callback endpoints, or fetch targets are processed through affected code paths.

Known Vulnerable Dependency: hono==4.12.8 — 16 advisory(ies): CVE-2026-56762 (Hono missing validation of cookie name on write path in setCookie()); CVE-2026-47676 (Hono: app.mount() strips mount prefix using undecoded path, causing incorrect ro); CVE-2026-47675 (Hono: Cookie helper does not sanitize sameSite and priority, allowing Set-Cookie) +13 more

High
Category
Supply Chain
Confidence
92% confidence
Finding
hono 4.12.8 is reported with numerous security advisories affecting cookies, routing, and request handling. Because this package underpins HTTP server behavior in the MCP SDK dependency chain, flaws here can affect authentication boundaries, route isolation, or header safety if the skill runs a server component.

Known Vulnerable Dependency: ip-address==10.1.0 — 2 advisory(ies): CVE-2026-69192 (ip-address: Address4 decodes leading-zero octets as decimal while resolvers deco); CVE-2026-42338 (ip-address has XSS in Address6 HTML-emitting methods)

High
Category
Supply Chain
Confidence
82% confidence
Finding
ip-address 10.1.0 has reported parsing inconsistencies and HTML-emitting XSS-related behavior. This is a real vulnerable dependency, and while exploitability depends on whether the skill validates IP-based policies or renders library-generated HTML, parsing ambiguity can weaken SSRF or network access controls.

Known Vulnerable Dependency: path-to-regexp==8.3.0 — 2 advisory(ies): CVE-2026-4923 (path-to-regexp vulnerable to Regular Expression Denial of Service via multiple w); CVE-2026-4926 (path-to-regexp vulnerable to Denial of Service via sequential optional groups)

High
Category
Supply Chain
Confidence
87% confidence
Finding
path-to-regexp 8.3.0 is flagged for ReDoS-style denial-of-service issues involving complex route patterns. Since this dependency is used in routing stacks, an exposed HTTP interface could allow an attacker to consume CPU with crafted paths, especially in always-on agent or connector deployments.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill offers web/X search and media generation through xAI endpoints, which necessarily sends user prompts and potentially attached images or other content to a third-party API, yet the README does not provide a clear privacy warning. In an agent workflow, users may assume local-only processing, so the lack of disclosure can lead to unintentional transmission of sensitive prompts, files, or metadata to xAI.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The README includes broad natural-language instructions telling an agent to clone the repo, read files, explain the tool, and then offer integration. This kind of unconstrained invocation language can cause accidental activation in ordinary conversations and nudges the agent toward integration behavior before the user has explicitly consented to using the skill.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The usage examples describe image and video generation/editing that write output files and may modify user-supplied files, but the README does not clearly warn users about these side effects. In an agent setting, missing file-write and file-modification disclosures increase the risk of unintended overwrites, workspace changes, or surprise artifact creation.

Lp3

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding
The skill clearly exposes networked capabilities through an external REST API, but it does not declare an explicit tool scope such as permissions or allowed-tools. This weakens least-privilege guarantees and can mislead reviewers or orchestrators about what external actions the skill may perform.

External Transmission

Medium
Category
Data Exfiltration
Content
homepage: https://github.com/wipcomputer/wip-xai-grok
metadata:
  category: search,media
  api_base: https://api.x.ai/v1
  capabilities:
    - api
    - web-search
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
homepage: https://github.com/wipcomputer/wip-xai-grok
metadata:
  category: search,media
  api_base: https://api.x.ai/v1
  capabilities:
    - api
    - web-search
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
94% confidence
Finding
The skill encourages web and X search but does not warn that user prompts and search terms will be transmitted to xAI and may cause retrieval from external websites or X content. Users may unknowingly submit sensitive data, creating privacy and data-handling risk in a skill whose primary function is external search.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The edit_image documentation explicitly allows a local file path as input but does not warn that the referenced file may be uploaded to an external API for processing. This creates a clear exfiltration risk if a user supplies sensitive local files, especially because the feature is framed as a normal convenience option.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The skill invokes the local 1Password CLI to retrieve a secret from the host environment, which expands its capabilities beyond simple remote Grok API usage into local secret-access behavior. Even if intended for convenience, this creates a sensitive trust boundary: any caller of the skill can trigger credential retrieval from local stores, and such access is broader than the manifest description suggests.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
The image editing path accepts non-URL, non-data inputs as filesystem paths and reads arbitrary local files, then prepares them for transmission to the external xAI API. This can expose sensitive local data if an attacker supplies a path to confidential files, especially because the capability is not obvious from the skill's stated remote API purpose.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The `search_web` function sends the user-provided `query` to `https://api.x.ai/v1/responses`, which is a network operation transmitting user data externally. While the function has technical docstrings, there is no explicit user-facing warning, confirmation, or disclosure about sending search content to a third-party service.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The `search_x` function transmits the user's query and optional X handle/date filters to the external xAI API. The code lacks any user-facing disclosure, confirmation, or warning that these inputs are being sent off-system to a third-party endpoint.

Intent-Code Divergence

Medium
Confidence
96% confidence
Finding
The function constructs converted image content, including base64-encoded local files, but the actual API request ignores that prepared content and sends only `image: images[0]`, i.e., the first original unprocessed value. This mismatch can defeat user expectations and safety controls, causing unintended file-path handling, failed uploads, or sending different data than the code appears to validate and prepare.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The `grok_edit_image` tool accepts a source image URL or base64 data URI and sends it through `edit_image(params)`, which implies transmitting potentially sensitive user image content to xAI Grok. While the code has a functional description, it does not clearly warn users about the privacy implication of sending image data to an external service.

Missing User Warnings

Low
Confidence
85% confidence
Finding
The troubleshooting text tells users where to obtain the API key but gives no handling guidance for sensitive credentials. While not an exploit by itself, this can normalize casual exposure of secrets in prompts, logs, screenshots, or misconfigured environments.

Missing User Warnings

Low
Confidence
83% confidence
Finding
The `grok_search_web` and `grok_search_x` tool definitions clearly invoke external services using user-supplied queries, but the descriptions do not disclose that those queries are transmitted to xAI and possibly third-party indexed platforms. For search features, this can matter when prompts contain sensitive or internal information.

Known Vulnerable Dependency: @hono/node-server==1.19.11 — 2 advisory(ies): CVE-2026-39406 (@hono/node-server: Middleware bypass via repeated slashes in serveStatic); GHSA-frvp-7c67-39w9 (Node.js Adapter for Hono: Path traversal in `serve-static` on Windows via encode)

Low
Category
Supply Chain
Confidence
90% confidence
Finding
The lockfile pins @hono/node-server 1.19.11, and the provided advisories describe real path handling flaws in static file serving, including middleware bypass and Windows path traversal conditions. Even though this file only shows dependency metadata, shipping a version with known flaws is a genuine supply-chain risk if the skill exposes HTTP endpoints or serves files through the affected code paths.

Known Vulnerable Dependency: body-parser==2.2.2 — 1 advisory(ies): CVE-2026-12590 (body-parser vulnerable to denial of service when invalid limit value silently di)

Low
Category
Supply Chain
Confidence
76% confidence
Finding
body-parser 2.2.2 is identified as having a denial-of-service issue related to invalid limit handling. This is a true vulnerable dependency finding, although the practical risk depends on whether the skill accepts attacker-controlled HTTP request bodies through Express-based interfaces.

Known Vulnerable Dependency: qs==6.15.0 — 3 advisory(ies): CVE-2026-82417 (qs: Denial of Service via Attacker Controlled isBuffer); CVE-2026-8723 (qs has a remotely triggerable DoS: qs.stringify crashes with TypeError on null/u); CVE-2026-82562 (qs array-limit bypass via bracket-key comma parsing)

Low
Category
Supply Chain
Confidence
80% confidence
Finding
qs 6.15.0 is reported with multiple denial-of-service and parsing issues. This is a true vulnerable dependency finding, though the actual danger depends on whether attacker-controlled query strings or stringify operations are processed in reachable request paths.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"url": "git+https://github.com/wipcomputer/wip-xai-grok.git"
  },
  "dependencies": {
    "@modelcontextprotocol/sdk": "^1.27.1"
  }
}
Confidence
95% confidence
Finding
The dependency is specified with a caret range (^1.27.1), which allows automatic installation of newer minor and patch releases. This weakens supply-chain reproducibility and can pull in a compromised or breaking upstream version without any code change in this package, which is relevant for an agent skill that may be installed and executed automatically.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.env_credential_access

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
core.mjs:28

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
core.mjs:22