T06 · System Persistence
- Location
SKILL.md:235- Finding
Persistent Authenticated Polling with Unsafe Plaintext Response Logging
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 235-237
Vulnerability Type: Persistent scheduled execution and insecure storage of authenticated API responses
Risk Level: Mediumbash */10 * * * * curl -s https://doc-print.example.com/v3/exchange/inbox \ -H "Authorization: Bearer $DOC_PRINT_API_KEY" >> /var/log/doc-print-inbox.logTechnical Analysis
The Skill recommends creating a cron entry that performs an authenticated request every ten minutes. Once installed, this scheduled operation continues across Agent sessions and system restarts until it is explicitly removed.
Authenticated inbox responses are appended indefinitely to a fixed plaintext log. The example does not establish restrictive file permissions, redact sensitive response fields, rotate the log, define a retention period, or verify that the destination is protected from other local users and log-collection services. Consequently, task or inbox data may remain on disk longer than intended.
The bearer credential is expanded into the
curlcommand line. Depending on the operating system and process-isolation configuration, another local process or user may be able to observe command arguments while the request is running. The use ofcurl -salso suppresses diagnostic output without enabling explicit failure handling, making unnoticed authentication or network failures more likely.Attack Path
- A user follows the Skill documentation and installs the provided cron entry.
- Cron runs the authenticated inbox request every ten minutes using
DOC_PRINT_API_KEY. - Each response is appended to
/var/log/doc-print-inbox.logwithout redaction, rotation, or an explicitly restrictive access mode. - The log accumulates potentially sensitive task and inbox information over time.
- A local user, backup process, monitoring agent, or log collector with access to the file obtains the retained response data.
- Where local proce ...[truncated 894 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not recommend installing recurring scheduled tasks by default. Require explicit user consent and clearly document how to inspect, disable, and remove the cron entry.
- Prefer a restricted user-level service or scheduler configuration rather than a system-wide cron entry.
- Avoid placing bearer credentials in command arguments. Load the authorization header from a protected configuration mechanism or credential file that is readable only by the service account.
- Create any output directory and file with restrictive permissions before polling, such as a directory accessible only to the owning account and a file mode of
0600. - Do not log complete authenticated responses. Extract only the minimum fields needed for notification and redact task content, personal data, credentials, and other sensitive values.
- Configure bounded retention and log rotation. Define maximum file size, retention duration, and secure deletion behavior.
- Use explicit request failure handling, including
curl --fail-with-body, appropriate connection and total timeouts, and controlled error reporting that does not expose credentials or response bodies. - Document credential revocation and rotation procedures in case the API key or logged response data is exposed.
