Malicious agent skills can reach user files and credentials when the agent runtime passes the skill broad tool, file or browser access, or reuses the signed-in user’s session. Separate skill execution, least privilege scopes, and explicit approval for sensitive actions reduce that reach. Shared workspace mounts, local credential stores, and over-permissive connectors are common failure modes.
Why agent skills can touch files and credentials
Malicious agent skills reach user files and credentials when the runtime lets the skill operate inside the same trusted session as the user. If the agent can browse local folders, read workspace mounts, call connectors, or inherit the user’s login state, the skill can request or exfiltrate data that looks ordinary to the host application. The issue is usually delegated reach, not magic escalation.
That risk is easiest to see in agent ecosystems that treat skills as plug-ins with broad default access. When a skill can invoke file, browser, mail, chat, or cloud connectors without a strong boundary, it can search for secrets, read synced documents, or harvest tokens from places the user already opened. The right question is not whether the skill is “malicious” in the abstract, but which permissions the runtime already exposed to it. Agent Skills Security Guide
Session reuse matters just as much as tool access. If the agent can act through the user’s signed-in browser profile, desktop session, or shared workspace, it may inherit access to documents, passwords saved in the browser, cached tokens, or files mounted into the environment. In practice, the dangerous part is often the connector or session bridge, because it collapses the separation between “the user is authenticated” and “the skill is allowed to see this data.”
Where the blast radius comes from
The most common failure modes are over-broad scopes, shared mounts, and long-lived local secrets. A skill that only needed to summarise a document can still enumerate a workspace, follow links into adjacent folders, or query a connected drive if the host did not constrain it. If the environment also stores API keys, refresh tokens, SSH material, or browser credentials in reachable locations, the skill can recover them with simple read actions rather than obvious exploit code. Secrets Management Guide
Another amplification point is reuse. When one agent instance, connector, or skill shares the same credential set across users or environments, any compromise becomes much harder to contain. That is why the same design choices that improve convenience, such as shared service credentials or permissive approval prompts, also enlarge the blast radius when a skill turns hostile. Shared credentials between AI agents
Malicious skills also benefit from human trust. Users often approve a prompt that sounds like a harmless helper action, then the skill chains that approval into broader file access, credential lookup, or an outbound exfiltration step. The threat is not only theft of what is already visible, but abuse of delegated authority to move from one legitimate action to a much wider data set.
What reduces exposure without breaking useful automation
The strongest control is to separate skill execution from the user’s general workspace and from the user’s ambient authentication state. Give each skill only the narrow tools it needs, keep sensitive connectors behind explicit approval, and prefer short-lived, scoped credentials over inherited session reach. Where a skill needs access to a file or repository, make that access narrow, time bound, and auditable rather than assuming the user’s login makes the access acceptable.
Reviewing agent skills should focus on what they can reach at runtime, not only on what they claim to do. A skill definition, registry entry, or marketplace description is not enough if the execution environment still hands it a browser profile, shared mount, or a permissive connector set. OWASP Agentic Top 10 ASI04 Guide
When the concern is credential exposure specifically, treat files, config directories, browser stores, and synced cloud folders as sensitive attack surfaces. Even if a skill cannot directly “break in,” it may be able to enumerate exactly the places where people paste secrets, export tokens, or cache session material. MITRE ATLAS AML.T0083 Credentials from AI Agent Configuration
Risk and Threat Considerations
Malicious agent skills are dangerous because they exploit normal delegation, not unusual exploits. Once the runtime grants file access, browser context, or connector access, the skill can read material the user could see and then copy it out through an approved channel, which makes detection harder than a classic malware event.
Failure mechanism: The runtime over-trusts the skill and lets it operate inside a session that already contains files, cached secrets, or live credentials, so the skill can search and exfiltrate without needing to bypass the host.
Impact: The immediate result can be credential theft, document exposure, or lateral abuse of the same session, followed by broader compromise if those secrets unlock other systems or allow the attacker to persist.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | ASI02 — Tool Misuse | Agent skills gain reach through tool, file and browser misuse. |
| ASI03 — Identity & Privilege Abuse | The issue is delegated session power and over-broad access, not just code behavior. | |
| Recommendation — Constrain skill tools to the minimum needed and require approval for sensitive actions. Separate skill identity from the user session and scope delegated privileges tightly. | ||
| OWASP Non-Human Identity Top 10 | NHI-05 — Overprivileged NHI | Skills, connectors and agent sessions often become overprivileged access paths. |
| Recommendation — Reduce standing access and revoke permissions that exceed each skill’s task scope. | ||
| NIST SP 800-53 Rev 5 | IA-5 — Authenticator Management | Sensitive credentials can be exposed when secrets and tokens are reachable at runtime. |
| AC-6 — Least Privilege | Least privilege directly limits what a skill can reach through files, sessions and connectors. | |
| Recommendation — Protect, rotate and revoke exposed credentials and tokens promptly. Limit each skill, connector and session to the minimum access needed. | ||
Practitioner Guidance
What to verify: Check whether a skill runs with the user’s full browser profile, desktop session, synced drive, or shared mount. If it does, treat that as a design exception until the access path is narrowed or isolated.
Decision rule: If a skill needs to read files or call a connector that can expose secrets, require explicit approval and a scoped runtime identity rather than relying on the user’s authenticated session. If the action can reveal credentials, it should be treated as sensitive by default.
Practitioner takeaway: The key control is not simply blocking “bad skills,” it is preventing any skill from inheriting more trust, data reach, or session power than the task genuinely requires.
Related resources from NHI Mgmt Group
- When do AI agent credentials create more risk than they reduce?
- What are Agent Skills and how do they enhance AI performance?
- How should security teams reduce the risk of agent hijacking when autonomous AI systems can reach files, credentials, and inboxes?
- Why do agent skills create more risk when they can reach SSH keys or cloud credentials?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org