Back to skill

Security audit

SSL

Security checks for vulnerabilities and agentic risk

Overview

This SSL documentation skill is purpose-aligned, but users should be careful with private keys and production certificate changes.

Install only if you are comfortable reviewing SSL administration commands before use. Do not run certificate renewal, permission, or private-key extraction commands blindly on production systems; verify domains and paths, protect privkey.pem with restrictive permissions, and replace the Node.js redirect snippet with a fixed or allowlisted hostname.

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
servers.md:72
Finding

Host Header Injection Enables Open Redirects

Content
View full analysis

Vulnerability Details

File Location: servers.md:72-75
Vulnerability Type: Host header injection / open redirect
Risk Level: Medium

Vulnerable Code

javascript
http.createServer((req, res) => {
  res.writeHead(301, { Location: `https://${req.headers.host}${req.url}` });
  res.end();
}).listen(80);

Technical Analysis

The documented Node.js HTTP-to-HTTPS redirect constructs the Location response header directly from req.headers.host. The HTTP Host header is supplied by the client and is not validated against a trusted hostname or allowlist.

An attacker can therefore submit a request containing an attacker-controlled Host value. The server will incorporate that value into the redirect destination and return a legitimate HTTP redirect to the attacker-selected domain.

Attack Path

  1. A victim-facing deployment copies the documented redirect implementation.
  2. The attacker sends a request to the HTTP endpoint with a manipulated header, such as:
    http
    GET /login HTTP/1.1
    Host: attacker.example
    
  3. The server constructs the following response header:
    http
    Location: https://attacker.example/login
    
  4. A browser or another redirect-following client navigates to the attacker-controlled destination.
  5. The attacker can imitate the legitimate service at that destination to facilitate phishing or credential theft. The flaw may also affect intermediaries that cache redirects without safely separating responses by hostname.

Impact Assessment

Exploitation does not directly grant operating-system, application, or administrative privileges. It grants control over the redirect destination generated by the affected HTTP listener.

The practical scope includes phishing, redirection of users to attacker-controlled infrastructure, abuse of trust associated with the legitimate service URL, and possible cache poisoning where an improperly configur ...[truncated 175 chars]

Remediation
View remediation

Remediation Suggestions

Do not construct security-sensitive redirect destinations from an untrusted Host header.

  1. Use a fixed canonical hostname:

    javascript
    const CANONICAL_ORIGIN = 'https://example.com';
    
    http.createServer((req, res) => {
      const path = req.url?.startsWith('/') ? req.url : '/';
      res.writeHead(308, { Location: `${CANONICAL_ORIGIN}${path}` });
      res.end();
    }).listen(80);
    
  2. If multiple hostnames must be supported, parse and validate the hostname against an explicit allowlist before generating the redirect. Reject unrecognized or malformed values rather than reflecting them.

  3. When operating behind a reverse proxy, define trusted proxy boundaries explicitly. Do not trust Host, X-Forwarded-Host, or similar forwarded headers unless they are overwritten by a trusted proxy.

  4. Add automated tests that send arbitrary and malformed Host values and verify that the response either redirects to an approved canonical origin or rejects the request.

  5. Configure the edge proxy or web server to reject unknown hostnames as an additional defense-in-depth measure.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs users to extract a private key from a PKCS#12 bundle into a standalone PEM file (privkey.pem) without warning that this output is typically unencrypted key material or that it must be protected and deleted promptly if only needed temporarily. In an SSL/TLS administration skill, users are likely to run these commands directly, so omission of key-handling precautions can lead to accidental exposure through permissive file permissions, backups, shell history, or long-term storage on disk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The markdown includes certbot renew --force-renewal and certbot certonly --nginx ... --force-renewal, which can alter active certificate state and trigger configuration changes, but the guide provides no caution about impact on production services or the need to verify the target domain/environment first. For markdown files, safety-affecting behaviors should include a warning when they may affect user data or system integrity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The guide instructs users to run chmod and chown on privkey.pem, which is sensitive key material, but does not warn that incorrect ownership or permissions could expose credentials or break TLS service access. In markdown, operations affecting privacy or system integrity should be accompanied by a user-facing caution.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · troubleshooting.md (reported line 112)May include surrounding context.

bash
# Let's Encrypt default perms are usually fine
# But if needed:
chmod 644 /etc/letsencrypt/live/example.com/fullchain.pem
chmod 600 /etc/letsencrypt/live/example.com/privkey.pem
chown root:ssl-cert /etc/letsencrypt/live/example.com/privkey.pem

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · troubleshooting.md (reported line 113)May include surrounding context.

Let's Encrypt default perms are usually fine

But if needed:

chmod 644 /etc/letsencrypt/live/example.com/fullchain.pem chmod 600 /etc/letsencrypt/live/example.com/privkey.pem chown root:ssl-cert /etc/letsencrypt/live/example.com/privkey.pem

text

Static analysis

No suspicious patterns detected.