Back to skill

Security audit

Certificaty

Security checks for vulnerabilities and agentic risk

Overview

This certificate-management skill is purpose-aligned, but it exposes high-impact certificate and private-key operations without clearly documented authentication, authorization, or safe key-handling limits.

Install only if you trust ToolWeb.in with your certificate inventory, domains, email addresses, and any downloadable private keys. Before using it for real domains, confirm that the service enforces authentication, tenant isolation, proof of domain control, audit logging, and tightly controlled private-key export.

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

T05 · Unauthorized Access and Privilege Escalation

Error
Location
openapi.json:47
Finding

Certificate Metadata and Private-Key Downloads Lack Declared Authentication and Authorization

Content
View full analysis

Vulnerability Details

File Location: openapi.json:47-63, openapi.json:126-170, and SKILL.md:162-178
Vulnerability Type: Missing authentication and object-level authorization for sensitive certificate resources
Risk Level: Critical

Vulnerable Code

openapi.json:47-63:

json
"/certificates": {
  "get": {
    "summary": "Certificates",
    "operationId": "certificates_certificates_get",
    "responses": {
      "200": {
        "description": "Successful Response",
        "content": {
          "application/json": {
            "schema": {}
          }
        }
      }
    }
  }
}

openapi.json:126-170:

json
"/download/{domain}/{filename}": {
  "get": {
    "summary": "Dl",
    "operationId": "dl_download__domain___filename__get",
    "parameters": [
      {
        "name": "domain",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "title": "Domain"
        }
      },
      {
        "name": "filename",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "title": "Filename"
        }
      }
    ],
    "responses": {
      "200": {
        "description": "Successful Response",
        "content": {
          "application/json": {
            "schema": {}
          }
        }
      },
      "422": {
        "description": "Validation Error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/HTTPValidationError"
            }
          }
        }
      }
    }
  }
}

SKILL.md:162-178:

markdown
## GET /download/{domain}/{filename}

**Summary:** Download Certificate

**Description:** Downloads a generated certificate file in PEM, CRT, or KEY format.

**Parameters:**

| Name | Type |
...[truncated 2717 chars]
Remediation
View remediation

Remediation Suggestions

  1. Require strong authentication for /certificates and /download/{domain}/{filename} and declare the applicable security scheme in OpenAPI.
  2. Perform server-side, object-level authorization for every request. Bind each certificate to an authenticated tenant or account and deny cross-tenant access.
  3. Do not expose private keys through predictable public paths. Prefer non-exportable keys stored in a KMS, HSM, or managed certificate service.
  4. If private-key export is an unavoidable requirement, require explicit privileged authorization, recent reauthentication, comprehensive audit logging, and a short-lived, single-use download token.
  5. Replace user-controlled domain and filename selectors with opaque artifact identifiers that cannot be enumerated.
  6. Return only tenant-scoped certificate metadata from /certificates.
  7. Add rate limiting and alerts for enumeration, repeated cross-domain requests, and private-key downloads.
  8. Encrypt exported key material, securely delete temporary copies, and provide a certificate revocation and key-rotation process for suspected exposure.

T09 · Insecure Skill Coding Practices

Warning
Location
openapi.json:126
Finding

Certificate Download Route Uses Unconstrained Security-Sensitive Path Inputs

Content
View full analysis

Vulnerability Details

File Location: openapi.json:126-151
Vulnerability Type: Insufficient validation of file-selection path parameters
Risk Level: Medium

Vulnerable Code

json
"/download/{domain}/{filename}": {
  "get": {
    "summary": "Dl",
    "operationId": "dl_download__domain___filename__get",
    "parameters": [
      {
        "name": "domain",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "title": "Domain"
        }
      },
      {
        "name": "filename",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "title": "Filename"
        }
      }
    ],

Technical Analysis

The domain and filename parameters are unrestricted strings. The schema supplies no format, regular-expression pattern, length limit, artifact-type enumeration, or opaque resource identifier. Because these values select a downloadable file, they cross a security-sensitive boundary.

If the server constructs a filesystem path from either value without canonicalization and containment checks, crafted values involving dot segments, path separators, alternate encodings, or platform-specific separators could cause path traversal or unintended file selection. The absence of validation constraints in the contract is confirmed; successful filesystem traversal cannot be confirmed because no server implementation was included in the project.

Even where a web framework rejects literal slash characters within a path segment, encoded or double-encoded forms may reach application or proxy decoding layers differently. Schema validation and server-side containment checks are therefore both required.

Attack Path

  1. Identify the download route and its unrestricted domain and filename parameters.
  2. Submit traversal-oriented or unexpected values, including encoded dot ...[truncated 1211 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace filenames with opaque, server-generated artifact identifiers and resolve them through a database mapping rather than direct path concatenation.
  2. Allowlist downloadable artifact types, such as certificate, chain, and bundle; do not accept arbitrary filenames.
  3. Validate domains using a strict normalized DNS-name parser and impose appropriate length limits.
  4. Decode input once, reject malformed or multiply encoded values, and reject dot segments, path separators, null bytes, drive prefixes, and absolute paths.
  5. Resolve the final filesystem path canonically and verify that it remains under the expected tenant-specific certificate directory before opening it.
  6. Open files using safe directory-relative APIs where supported and avoid string-based path concatenation.
  7. Run the service with minimal filesystem permissions and isolate certificate artifacts from application configuration and unrelated secrets.
  8. Add negative tests for literal, encoded, double-encoded, and platform-specific traversal payloads.
  9. Express input constraints in the OpenAPI schemas so generated clients, gateways, and validators can enforce them consistently.
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)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly documents downloading certificate files including private.key material, but provides no warning, access-control expectations, or handling guidance for highly sensitive private keys. In a certificate-management context, exposing or encouraging casual retrieval of private key files materially increases the risk of key compromise, which can enable TLS impersonation, traffic decryption, and persistent man-in-the-middle attacks for affected domains.

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 · SKILL.md (reported line 219)May include surrounding context.

md
# References

- **Kong Route:** https://api.toolweb.in/tools/certificaty
- **API Docs:** https://api.toolweb.in:8164/docs

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The certificate-generation endpoints are high-risk operations, but their OpenAPI descriptions are extremely vague and omit critical security semantics such as required proof-of-domain-control, authorization requirements, token scope, rate limits, and what artifacts are returned. In an agent setting, underspecified security-sensitive actions can cause unsafe invocation, misuse, or accidental issuance/download attempts against attacker-supplied domains because the consuming agent lacks enough information to apply safe constraints.

Content

No source excerpt is available for this finding.