T09 · Insecure Skill Coding Practices
- Location
SKILL.md:49- Finding
World-Writable Status Directory Allows Monitoring Data Tampering
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 49-50
Vulnerability Type: Insecure filesystem permissions
Risk Level: MediumVulnerable Code:
bash mkdir -p /path/to/agent-status chmod 777 /path/to/agent-statusTechnical Analysis
The setup instructions assign mode
0777to the shared status directory. This gives every local user read, write, and traversal permissions. Any local account or process can consequently create, replace, rename, or delete agent status reports.The monitoring workflow later instructs the monitor agent to read all JSON files from this directory and use their contents to generate alerts and dashboard updates. No ownership checks, integrity verification, authentication, or schema validation are specified. The world-writable directory therefore crosses a trust boundary and allows untrusted local users to control monitoring input.
Attack Path
- An attacker obtains access to any unprivileged local account on the shared host.
- The attacker accesses
/path/to/agent-status, which is writable by all users. - The attacker overwrites a legitimate agent report, creates a forged report, or deletes an existing report.
- The monitor agent reads the attacker-controlled report during its next status check.
- The forged values are incorporated into alerts or the health dashboard, suppressing a real incident or generating false operational information.
Impact Assessment
Exploitation does not directly grant elevated operating-system privileges, but it compromises the integrity and availability of the entire monitoring data set on the shared host. An unprivileged local user can:
- Falsely report failed agents as healthy.
- Trigger false failure or cron-error alerts.
- Delete reports to make configured agents appear missing.
- Impersonate other agents by creating reports under their names.
- Undermine operational decisions based on the resulting dashboa ...[truncated 96 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace mode
0777with a dedicated service account and group using mode0770,0750, or stricter permissions. - Give each reporting agent only the minimum permission required to submit its own report.
- Prevent reporters from modifying or deleting reports belonging to other agents, such as through separate upload directories or a privileged ingestion service.
- Validate report filenames, JSON schemas, expected agent identities, timestamps, and field types before processing.
- Verify file ownership and reject symbolic links or files owned by unexpected accounts.
- Write reports atomically by creating a securely permissioned temporary file and renaming it into place.
- Where reports cross hosts, authenticate each submitting agent and consider signing reports or validating message authentication codes.
- Replace mode
