Back to skill

Security audit

Batch Cad Converter

Security checks for vulnerabilities and agentic risk

Overview

The skill has a clear CAD conversion purpose, but it should be reviewed carefully because it can run locally resolved converter programs across whole folders without tight path validation or explicit run approval.

Install only if you trust the local converter binaries and can point the skill at explicit, trusted converter paths. Before running it, review the input and output folders, avoid running it in directories where untrusted executables may exist, and require a dry-run or confirmation of files and converters before batch processing.

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

Error
Location
SKILL.md:88
Finding

Untrusted Converter Executable Resolution Enables Arbitrary Code Execution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 88-93, 96-98, 126-131, and 168-176
Vulnerability Type: Untrusted executable resolution and PATH hijacking
Risk Level: High

Vulnerable Code

python
# Default converter paths
DEFAULT_CONVERTERS = {
    'revit': 'RvtExporter.exe',
    'ifc': 'IfcExporter.exe',
    'dwg': 'DwgExporter.exe',
    'dgn': 'DgnExporter.exe'
}

def __init__(self, converter_dir: str = ".",
             converters: Dict[str, str] = None):
    self.converter_dir = Path(converter_dir)
    self.converters = converters or self.DEFAULT_CONVERTERS
python
def _get_converter(self, format_name: str) -> Optional[Path]:
    """Get converter path for format."""
    if format_name not in self.converters:
        return None

    converter = self.converter_dir / self.converters[format_name]
    if converter.exists():
        return converter

    # Try in system PATH
    return Path(self.converters[format_name])
python
# Build command
cmd = [str(converter), str(input_path)]
if options:
    cmd.extend(options)

# Execute
try:
    result = subprocess.run(cmd, capture_output=True, text=True, timeout=3600)

Technical Analysis

The converter directory defaults to the current working directory ("."), while the default converter definitions are relative executable names. _get_converter() first trusts any matching file in that directory based only on its existence. It does not verify that the file is a regular executable from a trusted installation directory, nor does it validate its owner, publisher signature, or cryptographic hash.

If no matching file exists there, the method returns another relative path containing only the executable name. Passing that value to subprocess.run() causes operating-system executable search behavior to apply, potentially selecting a malicious binary from an attacker-controlled directory in `PA ...[truncated 1742 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require every converter to be configured using an explicit absolute path. Reject relative paths and bare executable names.
  2. Remove the default current-directory lookup and do not fall back implicitly to PATH.
  3. Canonicalize configured paths with Path.resolve(strict=True) before execution.
  4. Enforce an allowlist of trusted installation directories and verify that the resolved executable remains within one of those directories.
  5. Confirm that the resolved path is a regular file and is not an unexpected symbolic link or reparse-point redirection.
  6. Where supported, validate the executable's publisher signature or compare its cryptographic hash against an administrator-managed allowlist.
  7. Ensure converter installation directories and configuration files are not writable by untrusted users.
  8. Continue invoking the process with an argument list and without shell=True.
  9. Document native process execution as a required capability instead of declaring only filesystem access.
  10. Fail closed when a validated converter cannot be found, and report a configuration error rather than searching untrusted locations.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (4)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill launches external binaries selected from a configurable directory or PATH and appends caller-supplied option strings directly to the command. Even though subprocess.run is invoked without shell=True, this still creates a dangerous execution boundary: an attacker who controls converter paths, PATH resolution, or option values can trigger execution of unintended binaries or unsafe converter functionality, leading to arbitrary code execution or destructive file operations under the agent's privileges.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The implementation appears to report successful 'CAD/BIM conversion' while hard-coding the expected output suffix to '.xlsx', which does not align with the described multi-format CAD/BIM conversion workflow. This mismatch can mislead users about what was produced, cause downstream automation to trust incorrect artifacts, and hide failed or unexpected converter behavior behind a superficially successful status.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file includes examples that convert files into an output directory and generate a report file, but it does not explicitly warn users that running the skill will create files on disk. Because the skill operates over whole folders and may process large archives, users should be clearly told about these write side effects before use.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation scope is broad: a request to 'batch convert files' causes the skill to scan an input directory, auto-select converters, and invoke local CLI tools across multiple file types. In an agent setting, unclear boundaries around when these actions should occur can lead to unintended bulk filesystem access and subprocess execution from loosely phrased user requests, increasing the chance of misuse or accidental overreach.

Content

No source excerpt is available for this finding.