Back to skill

Security audit

Tbc Bank Api

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent TBC Bank API documentation skill, but it includes high-impact banking and payment workflows with under-warned sensitive data handling and unsafe callback examples.

Review this skill before installation and treat it as rough integration notes, not production-ready banking code. Do not use the callback samples verbatim; authenticate callbacks, verify payment or installment status through TBC Bank's authenticated APIs, compare amount/currency/order/session data against local records, make fulfillment idempotent, protect tokens and private keys, and require explicit user or operator confirmation for payment, cancel, void, and consent-revocation actions.

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

T09 · Insecure Skill Coding Practices

Error
Location
references/installments.md:107
Finding

Unauthenticated Installment Callback Can Trigger Fraudulent Order Fulfillment

Content
View full analysis
{ const { sessionId, status, invoiceId } = req.body; if (status === 'approved') { // Fulfill the order for invoiceId fulfillOrder(invoiceId); } // Must return 200 to acknowledge res.status(200).send('OK'); }); ``` ### Technical Analysis The documented callback handler treats the HTTP request body as authoritative and fulfills an order whenever the supplied `status` is `approved`. It does not: - Authenticate the callback sender. - Verify a cryptographic signature. - Query TBC Bank's authenticated status endpoint. - Confirm that `sessionId` belongs to `invoiceId`. - Compare the approved amount and currency with the stored order. - Reject expired or invalid sessions. - enforce idempotency or replay protection. Because a public callback URL must ordinarily be reachable over the Internet, request fields such as `status` and `invoiceId` are attacker-controlled unless the request is authenticated. Following this example directly could therefore turn a forged HTTP request into an order-fulfillment action. The `sessionId` is extracted but not used, which removes an available correlation mechanism. The example also acknowledges every request with HTTP 200 regardless of whether verification occurred. ### Attack Path 1. An attacker discovers or infers the merchant's public installment callback endpoint. 2. The attacker identifies or guesses a target invoice identifier. 3. The attacker submits a forged request such as: ```http POST /installment/callback HTTP/1.1 Content-Type: application/json { "sessionId": "attacker-controlled", "status": "approved", "invoiceId": "TARGET-INVOICE" } ``` 4. The handler accepts the u ...[truncated 1090 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/tpay.md:85
Finding

TPay Callback Signature Does Not Cover Order and Currency Fields

Content
View full analysis
bool: # Build canonical string from payload fields canonical = f"{payload['paymentId']}:{payload['status']}:{payload['amount']}" expected = hmac.new( secret.encode(), canonical.encode(), hashlib.sha256 ).hexdigest() return hmac.compare_digest(expected, received_sig) ``` ### Technical Analysis The example computes an HMAC over only three callback fields: - `paymentId` - `status` - `amount` The callback payload documented immediately before the example also contains `orderId` and `currency`, but those fields are not included in the authenticated canonical value. Consequently, changing an unsigned field does not change the expected signature. If downstream code trusts `orderId` or `currency` after this verification succeeds, an attacker who can capture, replay, or otherwise submit a valid callback may alter those values while retaining the original valid signature. The example also does not authenticate a timestamp, nonce, event ID, or expiry and does not describe server-side deduplication. A previously valid callback can therefore remain cryptographically valid when replayed. In addition, a hand-written canonicalization format is dangerous unless it exactly matches TBC Bank's official protocol; discrepancies in number formatting, character encoding, field ordering, or escaping can cause verification failures or inconsistent interpretations. ### Attack Path A viable exploitation path depends on obtaining or replaying a legitimately signed callback: 1. A valid TPay callback is generated for a successful payment. 2. The callback and signature become available to an attacker through a compromised ...[truncated 1436 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (13)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/consent.md (reported line 169)May include surrounding context.

Delete Consent

http
DELETE /0.8/v1/consents/{consentId}
Authorization: Bearer {token}
X-Request-ID: {uuid}

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/tpay.md (reported line 7)May include surrounding context.

Authentication

TPay uses a separate access token from PSD2:

http
POST /v1/tpay/access-token

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file instructs that every request must include PSU-IP-Address: {user_ip}, which is user data sent to an external banking API. The skill description provides no warning about transmitting user-identifying/network information or any privacy considerations, so users are not clearly informed about this behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file describes endpoints that return and transmit highly sensitive banking data including IBANs, owner names, phone numbers, personal identifiers, balances, and transaction history. Under the markdown-specific warning criterion, the document should warn users that these calls expose sensitive financial and personal data and must be used only with appropriate consent and secure handling.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file documents token exchange and refresh flows that include client_secret, auth_code, refresh_token, and access_token, and later shows code examples that send those values over HTTP requests. The document does not include any warning about protecting secrets, avoiding logging tokens, or handling these credentials securely, even though the behavior affects sensitive authentication data and privacy.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The document describes an OAuth2 Authorization Code flow for user-consented PSD2/OpenBanking access, but the code examples switch to the client_credentials grant, which has materially different security properties and authorization semantics. In a banking API skill, this inconsistency can mislead integrators into implementing the wrong grant type, causing broken consent handling, over-privileged access patterns, or insecure workarounds when user-scoped endpoints are called with machine tokens.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/auth.md (reported line 91)May include surrounding context.

md
import requests

# Step 1: Get token
token_resp = requests.post(
    "https://test-api.tbcbank.ge/openbanking/oauth/token",
    data={
        "grant_type": "client_credentials",

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The markdown instructs users to present a client certificate and private key file in requests, which is a security-critical operation involving credential material. There is no accompanying warning about securing the private key, restricting file permissions, or avoiding accidental disclosure of certificate paths and key files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file documents requests that include PSU-IP-Address and sensitive banking identifiers such as IBANs, but it does not include any user-facing warning about handling or transmitting personal and financial data. For markdown files, SQP-2 applies when the skill description omits warnings about behaviors affecting user data or privacy.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

The documentation includes a DELETE consent endpoint, which changes user authorization state by revoking an existing consent, but it provides no warning about the effect on ongoing AIS access. In markdown files, destructive or user-impacting behavior should be accompanied by an explicit warning when it may affect user data access or system behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file documents operations that initiate payments, recurring payments, deferred payments, and bulk authorization, and includes transmission of sensitive financial and personal data such as IBANs, payer names, and PSU IP addresses. The description provides no warning that these actions can move funds, create ongoing payment obligations, or transmit sensitive user data to the bank.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown documents a cancel/void endpoint that can irreversibly affect a payment, but it does not include any warning about the impact, prerequisites, or need for operator caution. Under the markdown-specific warning criterion, destructive or integrity-affecting actions should be clearly disclosed to users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The example payment initiation payload hard-codes "language": "ka", which signals a specific locale without any accompanying note that the user can choose another language or that the integration is intentionally Georgia-specific. The policy requires either user choice or a clearly documented justification for locale constraints.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.