T09 · Insecure Skill Coding Practices
- Location
scripts/markdown2doc.js:88- Finding
Symlink Bypass Allows Upload of Files Outside the Markdown Directory
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill performs remote Markdown conversion, but it needs Review because its file handling could expose local files or overwrite files beyond the intended output location.
Install only if you are comfortable sending the Markdown file and referenced local images to lab.hjcloud.com. Do not use it on confidential documents or untrusted Markdown directories, especially ones that may contain symlinks. Treat the output write behavior as risky until the script ignores server-supplied filenames or strictly validates the final output path.
scripts/markdown2doc.js:88Symlink Bypass Allows Upload of Files Outside the Markdown Directory
scripts/markdown2doc.js:365Untrusted Response Filename Allows Path Traversal and Arbitrary File Overwrite
The code packages and uploads the full Markdown source plus referenced local images to an external endpoint. Because Markdown files often contain proprietary text, credentials, internal URLs, diagrams, or screenshots, this is direct exfiltration of local content to a third party and is especially dangerous given the skill does not clearly present this behavior as data export.
The skill presents itself as a lightweight local conversion utility with 'no external dependencies,' but its workflow and privacy section disclose that it uploads markdown content and locally referenced images to a remote cloud service for processing. This mismatch is dangerous because users may provide sensitive local documents under the assumption that conversion is local-only, causing unintended exfiltration of proprietary or confidential data.
Referenced artifact was not completely inspected
node scripts/markdown2doc.js convert <file_path> pdf # Output: same_name.pdf
Referenced artifact was not completely inspected
node scripts/markdown2doc.js convert <file_path> pdf # Output: same_name.pdf
Referenced artifact was not completely inspected
node scripts/markdown2doc.js convert <file_path> pdf # Output: same_name.pdf
Referenced artifact was not completely inspected
node scripts/markdown2doc.js convert <file_path> pdf # Output: same_name.pdf
The code hardcodes a remote HTTPS conversion service despite the skill being described as a lightweight local utility with no external dependencies. This creates a deceptive data-flow where user Markdown and related content may leave the host unexpectedly, which is a significant security and trust issue even if transport is encrypted.
The conversion path is implemented around remote API endpoints rather than a local renderer, contradicting the skill's stated purpose as a local document utility. In practice this means potentially sensitive documents are sent off-box to a third-party service, expanding the attack surface to data leakage, retention, and service compromise risks.
The inline documentation states a restrictive file-access intent, yet the actual restriction is only applied to embedded image paths relative to the Markdown file directory. The primary Markdown input itself is accepted from any filesystem path, so the comment overstates the scope of the safety control.
The skill transmits Markdown and local images to a remote service without a conspicuous warning or consent mechanism. Even if remote conversion is intended, the lack of transparent disclosure undermines informed user consent and materially increases the risk of accidental exposure of sensitive local data.
No suspicious patterns detected.