T09 · Insecure Skill Coding Practices
- Location
SKILL.md:113- Finding
Plaintext CalDAV Credential Retrieval Without File-Permission Hardening
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 113
Vulnerability Type: Plaintext sensitive-data storage
Risk Level: MediumVulnerable Code
ini password.fetch = ["command", "cat", "~/.config/vdirsyncer/icloud_password"]Technical Analysis
The example configuration directs
vdirsyncerto executecatand retrieve an iCloud application password from a plaintext file. The documentation does not instruct users to create the file with restrictive permissions, verify its ownership, exclude it from backups, or use protected secret storage.The command uses a fixed executable and path, so the reviewed text does not establish a command-injection vulnerability. Transmission of the retrieved credential by
vdirsyncerto the user-configured HTTPS CalDAV endpoint is also necessary for the declared calendar synchronization functionality and is not evidence of covert exfiltration. The vulnerability is the insufficiently protected at-rest credential.Attack Path
- A user follows the documented setup and saves an iCloud application password in
~/.config/vdirsyncer/icloud_password. - The file is created with permissions that permit access by another local account, or it is copied into an inadequately protected backup.
- A local attacker, compromised process, or backup-system operator reads the plaintext credential.
- The attacker uses the credential and associated account identifier to authenticate to the relevant CalDAV service.
- Subject to the credential's provider-defined scope, the attacker accesses or modifies calendar information.
This path requires the credential file or a copy of it to be accessible to the attacker; the documentation alone does not grant remote access to the file.
Impact Assessment
Successful exploitation may disclose calendar metadata, event descriptions, attendees, locations, and schedules. It may also permit unauthorized event creation, modification, or deletion if the application-specif ...[truncated 426 chars]
- A user follows the documented setup and saves an iCloud application password in
- Remediation
View remediation
Remediation Suggestions
- Prefer retrieving the credential from an operating-system keyring or dedicated secret manager rather than a plaintext file.
- Configure the secret-retrieval helper with a fixed executable and fixed credential identifier; do not interpolate untrusted values into shell commands.
- If file-based storage must remain supported, document secure creation and validation:
bash install -d -m 700 ~/.config/vdirsyncer umask 077 printf '%s' 'APPLICATION_SPECIFIC_PASSWORD' > ~/.config/vdirsyncer/icloud_password chmod 600 ~/.config/vdirsyncer/icloud_password- Require that the file be owned by the account running
vdirsyncer, and advise users to reject symlinks or unexpectedly permissive files. - Exclude the credential file from unencrypted backups, synchronization tools, diagnostic archives, and source-control repositories.
- Use a revocable, provider-issued application-specific password with the narrowest available scope rather than the primary account password.
- Document credential rotation and immediate revocation procedures for suspected disclosure.
- Retain HTTPS certificate verification for all CalDAV endpoints and direct credentials only to trusted, explicitly configured provider domains.
