T09 · Insecure Skill Coding Practices
- Location
index.js:58- Finding
Caller-Controlled Output Path Allows Arbitrary File Overwrite
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a coherent route-generation purpose, but it writes caller-directed files, sends precise route data over plain HTTP, and keeps undisclosed local logs of location details.
Review before installing. This skill sends route coordinates to brouter.de using plain HTTP and saves GPX files locally. It also logs detailed route and path information, and its output path controls should be tightened so it can only write inside a dedicated routes directory.
index.js:58Caller-Controlled Output Path Allows Arbitrary File Overwrite
index.js:76Route Coordinates and GPX Responses Are Transmitted over Plaintext HTTP
index.js:55Persistent Logging Exposes Complete Invocation Options and Location Data
package.json:4Unpinned Dependencies and Missing Lockfile Make Installations Non-Reproducible
The declared purpose understates important behaviors: the skill writes persistent route/log files, depends on pre-geocoded coordinates, and stores output locally. This mismatch can mislead users and reviewers about data handling, especially when route endpoints may reveal sensitive location information.
Referenced artifact was not completely inspected
Parse all location data to coordinates before using `index.js`. Never use free-text descriptions of locations directly as input for `index.js`. Use coordinates
Referenced artifact was not completely inspected
Parse all location data to coordinates before using `index.js`. Never use free-text descriptions of locations directly as input for `index.js`. Use coordinates
Referenced artifact was not completely inspected
Parse all location data to coordinates before using `index.js`. Never use free-text descriptions of locations directly as input for `index.js`. Use coordinates
Referenced artifact was not completely inspected
Parse all location data to coordinates before using `index.js`. Never use free-text descriptions of locations directly as input for `index.js`. Use coordinates
The caller can fully control outputDir and fileName, and the code resolves and writes the resulting path without constraining it to a safe base directory. This turns the skill into a general arbitrary file writer, allowing overwrite or creation of files outside the intended routes directory if an attacker can influence inputs.
The skill invokes a networked routing service but does not declare any tool scope or permissions in the manifest. That creates a transparency and policy-enforcement gap: agents or users may not realize the skill sends data externally, and platforms cannot easily constrain or review that capability.
The skill directs the agent to send origin and destination data to brouter.de without informing the user that their route endpoints will be shared with a third party. Location data is often sensitive, so undisclosed transmission creates a meaningful privacy risk even if the service itself is legitimate.
The skill persistently writes operational data to local disk, including a dedicated log file and generated GPX content. While file output for a GPX-producing skill is partly expected, the persistent logging extends data retention beyond the narrowly described purpose and can expose sensitive route/location information to other local users or later processes.
The skill logs the full options object at invocation and later records request/response context, which can include route coordinates, labels, filenames, and paths. Persisting this information without user awareness creates unnecessary local privacy exposure and long-term retention of sensitive movement/location data.
The skill sends precise route coordinates to an external service over plain HTTP, not HTTPS, with no user disclosure. This creates both a privacy issue and a transport-security issue: location data can be observed or modified in transit by network attackers.
The instructions tell the agent to run the implementation and return a file from the routes folder without warning that route artifacts are written to local disk. Silent persistence of user route data can expose travel patterns to later processes, users, or logs on the same system.
The inline documentation says callers must provide coordinates and use a separate geocoding step, while the manifest describes use for routes between two places. That is an intent-level discrepancy because the documentation narrows supported input semantics compared with the advertised behavior.
The skill creates directories and writes the fetched GPX route to a local file, which affects user data on disk. The code documents this behavior for developers, but it does not provide a user-facing disclosure or confirmation about file creation and storage location.
The dependency version for node-fetch is specified with a caret range (^2), which allows different 2.x releases to be installed over time. This weakens build reproducibility and can unexpectedly pull in vulnerable or behavior-changing versions, especially relevant here because node-fetch has known advisories in some 2.x releases.
"name": "brouter",
"main": "index.js",
"dependencies": {
"node-fetch": "^2",
"gpx-parse": "^0.10.1"
}
}
The manifest uses an unpinned node-fetch dependency while that package has known published advisories affecting some versions. Because the exact installed release is not fixed, consumers of the skill may unknowingly install an affected version, which is particularly relevant in a skill that performs network requests to generate routes.
The dependency gpx-parse is also specified with a caret range (^0.10.1), allowing non-deterministic installs within the permitted range. This creates supply-chain and reproducibility risk because future installs may resolve to different code than what was originally tested.
"main": "index.js",
"dependencies": {
"node-fetch": "^2",
"gpx-parse": "^0.10.1"
}
}
No suspicious patterns detected.