Back to skill

Security audit

Mercado Libre MCP Server

Security checks for vulnerabilities and agentic risk

Overview

This Mercado Libre server is mostly purpose-aligned, but it needs review because it can make live seller-account changes and partially logs refresh-token material.

Install only if you are comfortable giving the server credentials for a Mercado Libre seller account and allowing tools to change listings, inventory, public answers, and ads. Use restricted/test credentials where possible, require human confirmation in the MCP host before write tools, protect logs, rotate tokens if logs may already contain token fragments, and update dependencies before production deployment.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
src/auth.ts:72
Finding

Partial OAuth Refresh Token Disclosure Through Error Logging

Content
View full analysis

Vulnerability Details

File Location: src/auth.ts, lines 72–77
Vulnerability Type: Sensitive credential exposure through logging
Risk Level: Medium

Vulnerable Code

ts
// Actualizar el refresh_token si ML devuelve uno nuevo
if (data.refresh_token && data.refresh_token !== config.refreshToken) {
  process.env.ML_REFRESH_TOKEN = data.refresh_token
  console.error(
    `[ml-mcp] Refresh token actualizado. Nuevo: ${data.refresh_token.substring(0, 20)}...`
  )
}

Technical Analysis

When Mercado Libre rotates the OAuth refresh token, the implementation writes the first 20 characters of the new token to stderr. Partial secrets remain sensitive and should not be emitted to any logging channel.

In common MCP deployments, stderr may be captured by the MCP host, process manager, container runtime, CI/CD system, or centralized logging platform. This unnecessarily distributes token material beyond the authentication component and violates least-disclosure principles.

The token refresh request itself is legitimate: credentials are sent over HTTPS to the fixed official endpoint, https://api.mercadolibre.com/oauth/token. The vulnerability is the subsequent disclosure of part of the returned credential, not the OAuth exchange.

Attack Path

  1. An operator configures the Skill with Mercado Libre OAuth credentials.
  2. The cached access token expires or approaches expiration.
  3. The Skill sends the refresh request to Mercado Libre.
  4. Mercado Libre returns a rotated refresh token.
  5. The Skill writes the first 20 characters of that token to stderr.
  6. An attacker or unauthorized operator with access to captured application logs obtains the token fragment.
  7. The fragment may be used for credential correlation, disclosure confirmation, or as supporting material in attacks involving another partial disclosure.

No evidence establishes that the logged fragment alone permits authentication, so full account compromise from this issue alone is ...[truncated 517 chars]

Remediation
View remediation

Remediation Suggestions

Remove all refresh-token content from logs. Log only the outcome of the rotation:

ts
if (data.refresh_token && data.refresh_token !== config.refreshToken) {
  process.env.ML_REFRESH_TOKEN = data.refresh_token
  console.error('[ml-mcp] Refresh token updated successfully.')
}

Apply the following additional hardening measures:

  1. Never log complete or partial access tokens, refresh tokens, client secrets, or authorization headers.
  2. Add centralized log-redaction rules for token-like values as defense in depth.
  3. Restrict access to MCP host, container, process-manager, and centralized logs.
  4. Define a short log-retention period and securely remove existing logs containing token fragments.
  5. Persist rotated refresh tokens in a dedicated secret manager rather than treating process.env as durable storage.
  6. Add automated tests that capture stderr during token rotation and assert that no token substring appears.
  7. Review historical logs and rotate affected credentials if token fragments have already been retained or exported.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (38)

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
84% confidence
Finding

fast-uri 3.1.0 is associated with URI parsing flaws including host confusion and possible SSRF-relevant normalization issues. Because this skill interfaces with external seller operations and likely makes outbound API calls, unsafe URI parsing in underlying libraries could become relevant if attacker-influenced URLs are ever processed, though this file alone does not prove a direct exploit path.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: hono==4.12.9 — 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
88% confidence
Finding

hono 4.12.9 has numerous published advisories affecting cookies, route mounting, and request/path handling. Since the MCP SDK depends on Hono and this skill is an MCP server, the framework is plausibly part of a network-facing surface, making these issues more relevant than a dormant library-only dependency.

Content

No source excerpt is available for this finding.

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
80% confidence
Finding

ip-address 10.1.0 has advisories involving address parsing ambiguity and XSS in HTML-emitting methods. The XSS portion is likely irrelevant unless the library's HTML output is rendered, but the parsing discrepancy can matter in rate limiting or IP-based trust logic because express-rate-limit depends on this package.

Content

No source excerpt is available for this finding.

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 reported vulnerable to ReDoS/DoS through crafted route patterns or matching behavior. Because routing is central to express/router stacks used by the SDK, this can affect availability if exposed HTTP endpoints process attacker-controlled paths against vulnerable patterns.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README advertises multiple write-capable operations such as price, stock, answers, and ads management, but it does not clearly warn that these actions affect a live seller account. In an MCP context, users may invoke tools through natural-language prompts, increasing the chance of unintended destructive or business-impacting actions if operators assume the server is read-only or low-risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README includes direct examples for configuring access tokens, client secrets, and refresh tokens, but it does not warn users to treat these as sensitive credentials or avoid committing them to source control, logs, or shared config files. Because these secrets grant seller-account API access, exposure could allow unauthorized reads and writes against listings, orders, ads, and account data.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises capabilities that require environment-variable access and network communication, but it does not declare an explicit tool scope such as permissions or allowed-tools. This creates an authorization ambiguity where a host or user may not clearly understand that the skill can access secrets and perform live API actions against a seller account.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The setup instructions ask for highly sensitive OAuth material, including client secret, refresh token, and optionally access token, without any warning about secure storage, least exposure, or rotation. If these values are mishandled, an attacker could obtain persistent API access to the seller account and read or modify business data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documentation lists write operations that can change prices, stock, public customer responses, and ad state, but it does not warn that these are live production changes. In an agent setting, missing cautionary language increases the chance of unintended business-impacting actions such as repricing listings, overselling inventory, or activating ad spend without deliberate confirmation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest advertises tools that can directly change seller data and marketplace state, including price, stock, question responses, and ad activation/pausing, but it provides no warning that these operations are destructive or business-impacting. In an MCP context, an agent may invoke tools based on user prompts or ambiguous instructions, so missing guardrails increases the risk of unintended listing changes, ad spend changes, or public customer-facing actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Comments and runtime error messages are written in Spanish only, such as 'Configurá' and 'Verificá', with no indication that the skill is intentionally limited to Spanish-speaking users. This can violate language/locale policy when a skill imposes a specific language without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

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 · src/auth.ts (reported line 7)May include surrounding context.

ts
import type { MLConfig, TokenData } from './types.js'

const ML_AUTH_URL = 'https://api.mercadolibre.com/oauth/token'

let cachedToken: TokenData | null = null

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code performs an HTTP POST to the Mercado Libre OAuth endpoint carrying sensitive authentication material, including client_secret and refresh_token. While the comments describe the auth modes, there is no user-facing warning, prompt, or explicit disclosure in the file that sensitive credentials will be sent over the network.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The tool name description is written entirely in Spanish, and the returned user-facing messages throughout the file are also Spanish-only. This can violate language/locale policy when the skill forces a specific language without explicit user opt-in or a documented locale-specific justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The natural-language strings that define the tool and its arguments are entirely in Spanish, which can force a specific language experience on users without opt-in. The file does not document that the skill is region-specific or offer any language/locale choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The tool description and parameter descriptions are written only in Spanish, which imposes a specific language on users without any visible opt-in or explanation that the skill is intentionally limited to a Spanish-speaking context. The same language constraint continues in the returned user-facing text, indicating a natural-language locale policy issue rather than an incidental comment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The response text presented to the user is entirely in Spanish and does not provide any mechanism to select another language. For skills intended for general use, hard-coded output language without opt-in or documented justification violates the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

This code performs an HTTP request to fetch order data and includes seller identifiers and potentially sensitive commercial/customer information, but there is no confirmation prompt, visible logging/print, or inline comment/docstring warning about the data access/transmission. For code files, network calls that transmit user or system data should have some form of user disclosure unless clearly covered by the skill description or expected purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language descriptions for the tool and its parameters are written only in Spanish, and the returned user-facing text is also Spanish. This imposes a specific language/locale on users without offering a language choice or documenting a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The answer_question tool description and parameter descriptions are only in Spanish, indicating a language-specific interaction model. The file does not provide user opt-in for this locale or explain why the restriction is necessary.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code includes user-facing natural-language text entirely in Spanish in both the tool description and returned content. Under the policy, forcing a specific language without user opt-in is a locale/language policy violation unless the restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The usage examples and feature description consistently assume Spanish interaction, including 'Errores en español', without indicating whether other languages are supported or whether Spanish is a deliberate regional constraint. A fixed language preference without opt-in can violate language/locale policy expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The phrase 'Human-readable errors in Spanish' indicates a fixed language behavior. Because the file does not present this as optional or region-justified, it conflicts with the requirement to avoid forcing a specific language without user opt-in.

Content

No source excerpt is available for this finding.

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
86% confidence
Finding

@hono/node-server 1.19.11 is flagged for path handling issues in static file serving, including repeated-slash middleware bypass and Windows path traversal in serveStatic. In this lockfile it is only an indirect dependency via the MCP SDK, and there is no evidence in this file that the skill itself exposes static file serving, so the issue is real but likely low-risk in this specific context.

Content

No source excerpt is available for this finding.

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
78% confidence
Finding

body-parser 2.2.2 has a reported denial-of-service issue when invalid limit handling degrades unexpectedly. This is a genuine vulnerable dependency, but as a transitive package from express in the SDK, exploitability depends on the MCP server exposing HTTP endpoints that parse attacker-controlled request bodies.

Content

No source excerpt is available for this finding.