T09 · Insecure Skill Coding Practices
- Location
scripts/batch_parse.py:38- Finding
Unnecessary Disclosure of Local File Paths to an External Service
- Content
View full analysis
Vulnerability Details
File Location:
scripts/batch_parse.py, lines 38–42
Vulnerability Type: Sensitive local metadata disclosure
Risk Level: Lowpython file_obj = await client.files.create( file=str(file_path), purpose="parse", external_file_id=str(file_path), )Technical Analysis
The batch parser transmits the complete local file path as the remote
external_file_id. Although uploading the document is intrinsic to the Skill's declared functionality, disclosing the local path is not necessary for parsing.Local paths can contain sensitive contextual information such as operating-system usernames, customer names, internal project identifiers, case names, or confidential directory structures. This metadata is disclosed in addition to the document content and may be retained or logged by the external API as an identifier.
Attack Path
- A user stores a document at a path containing sensitive information, such as
/home/alice/clients/acme-merger/forecast.pdf. - The user invokes
batch_parse.pyon the containing directory. - The script uploads the document and assigns the full local path to
external_file_id. - The LlamaParse service receives the workstation path as remote request metadata.
- Anyone with appropriate access to the service's request records or file metadata may learn details about the user's local environment and confidential project context.
This issue does not grant local code execution, elevated privileges, or additional filesystem access. Exploitation is limited to metadata disclosed during an otherwise authorized upload.
Impact Assessment
The primary impact is loss of privacy and unnecessary disclosure of local environment information to a third-party service. The exposed scope is limited to paths of files intentionally selected for batch processing. No operating-system privileges are obtained, and the code does not disclose unrelated file ...[truncated 24 chars]
- A user stores a document at a path containing sensitive information, such as
- Remediation
View remediation
Remediation Suggestions
- Remove
external_file_idwhen it is not required by the parsing workflow. - If a tracking identifier is needed, use a randomly generated opaque identifier such as a UUID.
- If deterministic correlation is required, derive an identifier from a sanitized filename or an application-local mapping rather than the absolute path.
- Do not include parent directory names, usernames, drive names, or network-share locations in remote metadata.
- Clearly disclose any optional path-metadata transmission and require explicit user consent before enabling it.
- Add a regression test that mocks
client.files.create()and verifies that neither absolute nor relative local paths are supplied asexternal_file_id.
- Remove
