Back to skill

Security audit

Credex Protocol

Security checks for vulnerabilities and agentic risk

Overview

This skill appears purpose-built for Credex lending, liquidity, and bridging, but it handles wallet signing authority in ways that need review before installation.

Install only if you are comfortable reviewing and constraining DeFi transaction tooling. Use an isolated low-value test wallet, avoid exposing production private keys, prefer the locked npm scripts over documented npx ts-node commands, verify the exact pool contract and chain before any approval/deposit/repay/bridge action, and require explicit user confirmation for every fund-moving command.

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

T08 · Insecure Dependencies

Error
Location
SKILL.md:14
Finding

Documented commands execute an undeclared package through npx

Content
View full analysis
[args] # Borrower commands npx ts-node scripts/lp.ts [args] # LP commands ``` The README repeats this pattern for all financial operations: ```bash npx ts-node scripts/client.ts status npx ts-node scripts/client.ts borrow 5 npx ts-node scripts/client.ts repay all npx ts-node scripts/client.ts bridge 10 arc base npx ts-node scripts/lp.ts pool-status npx ts-node scripts/lp.ts deposit 100 npx ts-node scripts/lp.ts withdraw all ``` However, `ts-node` is not declared in the package manifest: ```json "dependencies": { "@circle-fin/adapter-viem-v2": "^1.4.0", "@circle-fin/bridge-kit": "^1.5.0", "dotenv": "^17.2.4", "ethers": "^6.16.0" }, "devDependencies": { "tsx": "^4.21.0", "typescript": "^5.9.3" } ``` ### Technical Analysis The Skill instructs users and agents to execute `npx ts-node`, but `ts-node` is neither a direct dependency nor represented as the intended local executable in the reviewed manifest. When no local binary is available, `npx` may resolve, download, and execute a package from the configured npm registry at invocation time. This bypasses the reviewed lockfile as the authoritative source for the command runner. It creates a mutable supply-chain execution path inside a process that is explicitly expected to have access to `WALLET_PRIVATE_KEY`. The project already defines local scripts using the locked `tsx` dependency: ```json "scripts": { "client": "npx tsx scripts/client.ts", "lp": "npx tsx scripts/lp.ts" } ``` Therefore, retrieving a separate runner at invocation time is not necessary for the declared functionality. ### Attack Path 1. A user exports `WALLET_PRIVATE_KEY` as required by the Skill. 2. The user or AI ag ...[truncated 1381 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/client.ts:69
Finding

Read-only commands unnecessarily load a signing private key

Content
View full analysis
{ const wallet = getWallet(); const pool = new Contract(CONFIG.POOL_ADDRESS, POOL_ABI, wallet); try { const [ debtRaw, principalRaw, creditLimitRaw, , lastRepayment, frozen, active, ] = await pool.getAgentState(address); const availableRaw = await pool.availableCredit(address); ``` Balance checks also unnecessarily instantiate the wallet signer: ```ts async function checkBalance(): Promise { const wallet = getWallet(); try { const arcUsdc = new Contract(CONFIG.USDC_ARC, ERC20_ABI, wallet); const arcBalanceRaw = await arcUsdc.balanceOf(wallet.address); ``` The LP script follows the same pattern for read-only pool queries: ```ts async function poolStatus(): Promise { const wallet = getWallet(); const pool = new Contract(CONFIG.POOL_ADDRESS, POOL_ABI, wallet); try { const [liquidityRaw, assetsRaw, sharesRaw] = await Promise.all([ pool.totalLiquidity(), pool.totalAssets(), pool.totalShares(), ]); ``` ### Technical Analysis Blockchain view calls only require an RPC provider and a public accou ...[truncated 2009 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
README.md:18
Finding

Conflicting pool addresses can redirect approvals and financial transactions

Content
View full analysis
Remediation
View remediation
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 (82)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code substantially matches several core declared functions: check credit status, borrow, repay, and bridge USDC cross-chain on Arc/Base. However, the description explicitly claims liquidity-provider and pool-deposit capabilities ('providing liquidity as an LP', 'deposit to pool', 'provide liquidity'), and no such command or contract interaction exists in the supplied code. The code is strictly a borrower/client CLI plus balance checking. That makes the declared description materially broader than the actual implemented behavior. The extra balance-check feature is minor but undeclared; the main mismatch is the missing liquidity/deposit capability.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The code is narrowly scoped to LP operations and balance/bridge utilities. It interacts with a pool contract for deposits, withdrawals, pool metrics, and LP share balances, and uses Circle BridgeKit to move USDC between Arc testnet and Base Sepolia. There is no code for opening unsecured credit lines, borrowing USDC, repaying debt, or querying credit/reputation status. Because the declared description presents borrowing/repayment/credit-management as core supported behaviors, while the implementation only supports liquidity provision plus limited bridging/balance checks, the description does not accurately represent the actual behavior.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 20)May include surrounding context.

md
npx ts-node scripts/client.ts <command> [args] # Borrower commands

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 60)May include surrounding context.

md
npx ts-node scripts/client.ts <command> [args] # Borrower commands

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 61)May include surrounding context.

md
npx ts-node scripts/client.ts <command> [args] # Borrower commands

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 72)May include surrounding context.

md
npx ts-node scripts/client.ts <command> [args] # Borrower commands

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 104)May include surrounding context.

md
npx ts-node scripts/client.ts <command> [args] # Borrower commands

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 134)May include surrounding context.

md
npx ts-node scripts/client.ts <command> [args] # Borrower commands

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 165)May include surrounding context.

md
npx ts-node scripts/client.ts <command> [args] # Borrower commands

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 197)May include surrounding context.

md
npx ts-node scripts/client.ts <command> [args] # Borrower commands

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 365)May include surrounding context.

md
npx ts-node scripts/client.ts <command> [args] # Borrower commands

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 366)May include surrounding context.

md
npx ts-node scripts/client.ts <command> [args] # Borrower commands

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 368)May include surrounding context.

md
npx ts-node scripts/client.ts <command> [args] # Borrower commands

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 369)May include surrounding context.

md
npx ts-node scripts/client.ts <command> [args] # Borrower commands

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 370)May include surrounding context.

md
npx ts-node scripts/client.ts <command> [args] # Borrower commands

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 401)May include surrounding context.

md
npx ts-node scripts/client.ts <command> [args] # Borrower commands

Known Vulnerable Dependency: bigint-buffer==1.1.5 — 1 advisory(ies): CVE-2025-3194 (bigint-buffer Vulnerable to Buffer Overflow via toBigIntLE() Function)

High
Category
Supply Chain
Confidence
92% confidence
Finding

The lockfile pins bigint-buffer 1.1.5, which is reported as vulnerable to a buffer overflow in toBigIntLE(). Even though this package is transitive, memory-safety flaws in native or buffer-handling code are real supply-chain risk, and this skill operates in a financial/crypto context where malformed external data may be processed from chains or RPC responses. The issue appears reachable through Solana-related dependencies, so it should be treated as a true dependency vulnerability.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: ws==7.5.10 — 1 advisory(ies): CVE-2026-48779 (ws: Memory exhaustion DoS from tiny fragments and data chunks)

High
Category
Supply Chain
Confidence
84% confidence
Finding

ws 7.5.10 is flagged for memory exhaustion DoS from fragmented frames. This instance is pulled in transitively via jayson, and while not every deployment will expose a WebSocket server, blockchain/RPC tooling commonly maintains persistent socket connections, making availability issues more relevant. In an agent skill handling financial operations, a DoS can disrupt repayment, borrowing, or bridge monitoring workflows.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: toml==3.0.0 — 2 advisory(ies): CVE-2026-77465 (toml-node: Uncontrolled Recursion); CVE-2026-63376 (toml-node: Prototype Pollution Leads to `Object.prototype` Corruption via `__pro)

High
Category
Supply Chain
Confidence
87% confidence
Finding

toml 3.0.0 is flagged for uncontrolled recursion and prototype pollution. Although transitive via Anchor tooling, parser bugs of this type are meaningful when configuration or metadata files may come from external or semi-trusted sources; prototype pollution can have broad and unpredictable effects in JavaScript runtimes. In a crypto agent context, corrupted object state or parser-triggered DoS could interfere with transaction preparation or environment handling.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: ws==8.18.3 — 2 advisory(ies): CVE-2026-45736 (ws: Uninitialized memory disclosure); CVE-2026-48779 (ws: Memory exhaustion DoS from tiny fragments and data chunks)

High
Category
Supply Chain
Confidence
89% confidence
Finding

ws 8.18.3 is flagged for uninitialized memory disclosure and memory exhaustion DoS. This version appears under viem, a core blockchain interaction library likely relevant to the skill's runtime behavior, so the affected WebSocket paths may be materially reachable if the skill uses websocket transports for chain or bridge monitoring. Exposure is especially concerning in a lending/bridging skill because leaked process memory or degraded availability can affect keys, session data, or critical transaction timing.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: ws==8.17.1 — 2 advisory(ies): CVE-2026-45736 (ws: Uninitialized memory disclosure); CVE-2026-48779 (ws: Memory exhaustion DoS from tiny fragments and data chunks)

High
Category
Supply Chain
Confidence
90% confidence
Finding

ws 8.17.1 is also flagged for uninitialized memory disclosure and memory exhaustion DoS, here through ethers. Since ethers is a direct dependency of the skill and may use WebSocket providers in production blockchain workflows, this instance is more plausibly reachable than a dormant transitive package. In a finance-oriented agent, memory disclosure and service interruption raise the stakes because secrets, provider state, or transaction operations may be affected.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The bridge example demonstrates constructing an adapter directly from a private key and initiating cross-chain USDC transfers, but it does not warn about secret exposure, signer compromise, or the fact that bridging moves real assets across networks and may be irreversible or operationally complex. In this skill's context, which encourages autonomous borrowing, repayment, liquidity provision, and cross-chain fund management, such omission materially increases the risk of unsafe key handling and unintended asset transfer by users or agents.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README tells users to export a wallet private key and then immediately run borrowing, repayment, and bridge commands, but it provides no warning that the key is highly sensitive or that these actions can move real funds and incur irreversible on-chain transactions. In a financial skill centered on unsecured credit and cross-chain transfers, this omission materially increases the chance of credential exposure, accidental fund movement, and unsafe operation by users or downstream agents.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill instructs use of environment variables and networked transaction scripts, but it does not declare any explicit tool scope such as allowed tools or permissions. In an agent setting, that increases the chance the skill is granted broader-than-necessary access to secrets and network operations, which is especially sensitive because it handles a wallet private key and can submit blockchain transactions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger condition includes broad phrasing such as activation for 'any credit/lending task on Arc', which can cause the skill to run in contexts the user did not specifically intend. Because the skill can invoke networked scripts and potentially submit transactions using a configured private key, overbroad activation materially raises the risk of accidental fund movement or unnecessary exposure of sensitive wallet context.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/client.ts:35