T09 · Insecure Skill Coding Practices
- Location
references/detail.md:54- Finding
Tool Authorization and Path-Traversal Checks Fail Open
- Content
View full analysis
Vulnerability Details
File Location:
references/detail.md, lines 54-93
Vulnerability Type: Fail-open access-control enforcement
Risk Level: HighVulnerable Code
python allowed = False for category, tools in self.ALLOWED_TOOLS.items(): if tool_name in tools: allowed = True break if not allowed: violations.append({ "type": "unauthorized_tool", "tool": tool_name, "severity": "HIGH", "message": f"Tool {tool_name} is not on the allowlist" }) for param_name, param_value in parameters.items(): value_str = str(param_value) for category, patterns in self.DANGEROUS_PATTERNS.items(): for pattern in patterns: if re.search(pattern, value_str, re.IGNORECASE): violations.append({ "type": "dangerous_parameter", "tool": tool_name, "parameter": param_name, "category": category, "severity": "CRITICAL", "message": f"Parameter contains a dangerous operation: {category}" }) for param_name, param_value in parameters.items(): if isinstance(param_value, str) and ('../' in param_value or '..\\' in param_value): violations.append({ "type": "path_traversal", "tool": tool_name, "parameter": param_name, "severity": "HIGH", "message": "Parameter contains path traversal" }) should_block = any(v["severity"] == "CRITICAL" for v in violations)Technical Analysis
The filter records unknown tools and path-traversal parameters as
HIGH-severity violations, but its final enforcement decision blocks onlyCRITICALfindings. Consequently, the documented tool allowlist is not an effective authorization boundary.An unlisted tool produces an
unauthorized_tool...[truncated 1575 chars]- Remediation
View remediation
Remediation Suggestions
-
Block every unauthorized tool and every path-traversal finding, regardless of severity metadata.
-
Use a default-deny decision such as:
python should_block = bool(violations)Alternatively, explicitly classify
unauthorized_toolandpath_traversalas blocking findings. -
Resolve filesystem paths with a canonicalization function before validation.
-
Enforce explicit allowed root directories using canonical path containment checks.
-
Resolve and validate symbolic links before file access.
-
Reject unknown parameter schemas rather than converting arbitrary values to strings.
-
Add regression tests confirming that unlisted tools and traversal paths always return
should_block=True. -
Ensure the execution layer independently enforces the allowlist instead of relying solely on this advisory filter.
-
