medium severityCurated advisory

Stale dependency exploitation in AI environments

AI agents often work with projects that have outdated dependencies. When an agent suggests or installs packages based on a stale package.json, it can introduce known-vulnerable versions — and in AI environments, the vulnerability is amplified because the agent can execute commands.

Key facts

Stale dependency exploitation in AI environments is a medium-severity AI agent security threat targeting package.json, lockfiles, transitive dependencies, agent install commands. Keep dependencies updated and pinned with lockfiles. Guard can review supported package actions and lifecycle scripts, but use ecosystem vulnerability tooling for package CVE and advisory matching.

4 affected surfacesLast updated Jun 26, 2026
Affected surfacespackage.jsonlockfilestransitive dependenciesagent install commands
The attack

What happens

An agent working on a project with outdated dependencies may install or suggest packages with known vulnerabilities. In an AI environment, the vulnerability is amplified because the agent can execute commands, read files, and call tools — turning a library vulnerability into a full system compromise.

Step by step

How the attack unfolds

1Agent works on a project with a package.json that hasn't been updated in months.
2Agent installs a package version that has a known vulnerability (e.g., lodash 4.17.4 with prototype pollution).
3The vulnerability allows code execution when processing untrusted input.
4Agent processes a file or tool output that triggers the vulnerability.
5Attacker gains code execution within the agent's process.
Example

What it looks like in practice

Scenario

A developer asks Cursor to "add a date formatting library." Cursor installs [email protected] (which has a known ReDoS vulnerability) instead of the patched version. A file the agent processes contains a crafted date string that triggers the ReDoS, causing the agent to hang and potentially crash.

Detection

Detection and Guard coverage

Guard evaluates supported package actions and package lifecycle scripts according to local policy.
Current Guard product evidence does not establish direct npm-audit database matching for every installed package as a shipped local control.
Current Guard product evidence does not establish a Guard Cloud vulnerability database that automatically alerts on every AI-relevant package vulnerability.
Mitigation

How to stop it

Recommended action

Keep dependencies updated and pinned with lockfiles. Guard can review supported package actions and lifecycle scripts, but use ecosystem vulnerability tooling for package CVE and advisory matching.

Guard configuration
Use Protection Center to review which Guard controls are active on this device.
Use `hol-guard command controls status` and `hol-guard command controls list` to inspect the active local control catalog.
Guard coverage is action- and harness-specific. Do not treat an advisory label as a configurable Guard setting unless it appears in the current control catalog.

Related threat guides

Use the protections Guard supports here

Guard can review or block supported actions for this threat. The advisory above calls out what Guard covers and where other controls are still needed.