Back to skill

Security audit

MERCATOR Entity Evidence

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed paid company-verification API helper, with the main caution that payment headers must only be used with the trusted service endpoint.

Before installing, understand that paid calls spend your own wallet funds through an x402 payment header. Use the free validation route first, keep MERCATOR_BASE_URL at the documented Mercator endpoint unless you intentionally trust another endpoint, and do not expose or log X_PAYMENT values.

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
SKILL.md:25
Finding
Payment Authorization Can Be Forwarded to an Arbitrary Configurable Endpoint## Vulnerability Details **File Location**: `SKILL.md`, lines 25-30 and 56-67 **Vulnerability Type**: Unvalidated credential destination and command-line secret exposure **Risk Level**: Medium ### Vulnerable Code ```yaml credentials: - name: MERCATOR_BASE_URL description: API origin. Defaults to https://mercator-entity-evidence.fly.dev. required: false storage: env - name: X_PAYMENT description: Pre-signed x402 payment header (base64-encoded JSON), for the paid route. Produced by whatever signs x402 for your agent. ``` ```bash BASE="${MERCATOR_BASE_URL:-https://mercator-entity-evidence.fly.dev}" # Free preflight — which fields will be attempted, and the price if you buy. curl -sS -X POST "$BASE/v1/entity-evidence/validate" \ -H 'content-type: application/json' \ -d '{"domain":"lido.fi","fields":["legal_name","primary_domain"]}' | jq . # Paid answer — $0.10 USDC on Base, x402. curl -sS -X POST "$BASE/v1/entity-evidence" \ -H 'content-type: application/json' \ -H "X-PAYMENT: $X_PAYMENT" \ ``` ### Technical Analysis The paid request attaches the `X_PAYMENT` authorization header to an endpoint derived entirely from the configurable `MERCATOR_BASE_URL` environment variable. The documented command does not validate that the URL uses HTTPS or that its hostname is the intended Mercator service before transmitting the payment authorization. If an attacker can influence the agent's environment or configuration, the attacker can set `MERCATOR_BASE_URL` to an attacker-controlled HTTP or HTTPS server. When the paid route is invoked, the pre-signed x402 payment data is then disclosed to that server. The practical ability to reuse the authorization depends on the signature's domain separation, request binding, amount restrictions, nonce handling, and expiration. The header value is also expanded directly into a `curl` command-line argument. On systems where process arguments are visibl ...[truncated 1456 chars]
Remediation
## Remediation Suggestions 1. Pin paid requests to the exact trusted HTTPS origin, `https://mercator-entity-evidence.fly.dev`, rather than allowing an unrestricted environment override. 2. If endpoint configurability is required, parse the URL and enforce: - An `https` scheme. - An explicit allowlist of trusted hostnames. - The expected port. - No embedded user information. 3. Validate the final destination immediately before attaching `X-PAYMENT`; never send the header to untrusted origins. 4. Continue avoiding automatic redirects for authenticated requests. If redirects are later enabled, strip the payment header and revalidate the destination before following them. 5. Ensure x402 authorizations are narrowly bound to the intended chain, recipient, amount, endpoint, request parameters, nonce, and short expiration period. 6. Avoid exposing the authorization in process arguments. Supply sensitive headers through a protected temporary configuration or descriptor, with restrictive permissions and immediate cleanup. 7. Clear the payment authorization from the environment after use and ensure that command tracing, debug logs, and error output do not record it. 8. Document that `MERCATOR_BASE_URL` is security-sensitive and must not be populated from untrusted user input.
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 (3)

Vague Triggers

Medium
Confidence
92% confidence
Finding
The trigger list includes "verify this company," which is generic everyday phrasing and could overlap with many unrelated company-checking requests. The description does not provide exclusion conditions or tighter invocation boundaries to clarify when this skill should activate versus other skills.

External Transmission

Medium
Category
Data Exfiltration
Content
homepage: https://mercator-entity-evidence.fly.dev
    requires:
      bins:
        - curl
        - jq
credentials:
  - name: MERCATOR_BASE_URL
Confidence
60% 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
-d '{"domain":"lido.fi","fields":["legal_name","primary_domain"]}' | jq .

# Paid answer — $0.10 USDC on Base, x402.
curl -sS -X POST "$BASE/v1/entity-evidence" \
  -H 'content-type: application/json' \
  -H "X-PAYMENT: $X_PAYMENT" \
  -d '{"domain":"stripe.com","fields":["legal_name","headquarters","founded_year"]}' | jq .
Confidence
82% confidence
Finding
The paid example sends an `X-PAYMENT` header to a remote service, which can expose a pre-signed payment artifact if agents mishandle logging, redirection, or endpoint override via `MERCATOR_BASE_URL`. While payment is the stated function of the skill, transmitting bearer-like payment material to a configurable external origin creates real risk of unauthorized charges or payment replay if the header is intercepted or misdirected.

Static analysis

No suspicious patterns detected.