Back to skill

Security audit

Lottie

Security checks for vulnerabilities and agentic risk

Overview

This skill is a small Lottie integration guide with expected third-party script and validation-command examples, but no hidden persistence, credential use, or destructive behavior.

Before using the snippets in a production project, pin exact package versions, prefer local or locked dependencies, add integrity checks for CDN scripts where possible, and run npx validation commands in a normal least-privileged project environment.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:45
Finding
Unpinned Remote dotLottie Script Permits Mutable Code Execution## Vulnerability Details **File Location**: `SKILL.md`, line 45 **Vulnerability Type**: Unpinned remote JavaScript dependency **Risk Level**: High ```html <script src="https://unpkg.com/@lottiefiles/dotlottie-web"></script> ``` ### Technical Analysis The documented pattern loads executable JavaScript directly from unpkg without specifying an exact package version or a Subresource Integrity hash. The URL can consequently resolve to different package releases over time, allowing the effective code executed by generated pages to change after the Skill has been audited. This creates a remote payload execution channel. Compromise of the package publisher, npm package, CDN infrastructure, or a future package release could cause attacker-controlled JavaScript to execute in every page that adopts this example. The project provides no local verification mechanism that would detect such a change. ### Attack Path 1. A developer or agent copies the documented dotLottie integration pattern into a generated page. 2. A package publisher account, package release, or upstream distribution channel is compromised, or a malicious version becomes the version selected by the unpinned URL. 3. A browser requests the mutable unpkg URL when loading the page. 4. The browser receives and executes the modified JavaScript without validating its expected content. 5. The injected script operates with the JavaScript privileges of the affected page and can access data and APIs available to that page. ### Impact Assessment Successful exploitation permits arbitrary client-side JavaScript execution in pages using the pattern. The payload could read or modify page content, access non-`HttpOnly` browser storage and tokens available to the origin, intercept application interactions, issue authenticated same-origin requests, or alter animation and rendering behavior. The exact scope is limited by the page's origin, Content Security Policy, browser isolation ...[truncated 193 chars]
Remediation
## Remediation Suggestions - Pin the dependency to an exact, reviewed version rather than relying on the package's default version. - Prefer vendoring the audited JavaScript file in the local project so rendering does not depend on remote executable content. - If remote hosting is unavoidable, use a version-specific immutable URL and add a verified Subresource Integrity hash with `crossorigin="anonymous"`. - Apply a restrictive Content Security Policy that permits scripts only from explicitly trusted sources and avoids `unsafe-inline` where feasible. - Add dependency update review and integrity verification to the maintenance process.

T03 · Remote Payload Retrieval and Execution

Warning
Location
SKILL.md:24
Finding
Remote lottie-web Script Is Loaded Without Integrity Verification## Vulnerability Details **File Location**: `SKILL.md`, line 24 **Vulnerability Type**: Unverified remote JavaScript execution **Risk Level**: Medium ```html <script src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js"></script> ``` ### Technical Analysis The lottie-web example uses a version-specific cdnjs URL, which limits unintended version changes, but it does not include a Subresource Integrity value. The browser therefore trusts and executes any content returned for the URL without comparing it to a cryptographically expected artifact. If the CDN account, hosting infrastructure, or delivery path is compromised, substituted JavaScript could execute in pages adopting this pattern. HTTPS protects normal transport against passive modification but does not independently verify the artifact if the trusted hosting endpoint itself serves altered content. ### Attack Path 1. A developer or agent copies the documented lottie-web pattern. 2. The referenced CDN or its artifact-delivery process is compromised and serves modified content at the versioned URL. 3. A user loads the affected page, causing the browser to retrieve the external script. 4. Because no `integrity` attribute is present, the browser does not reject content that differs from the reviewed library artifact. 5. The substituted script executes with the page's client-side privileges. ### Impact Assessment Exploitation could provide arbitrary JavaScript execution within the affected page. Depending on the application, the payload could manipulate the DOM, monitor user input, access origin-readable browser storage, invoke same-origin application endpoints using the user's session, or disrupt rendering. Exploitation requires compromise or malicious modification of the external delivery source. The finding does not indicate that the referenced cdnjs artifact is currently malicious.
Remediation
## Remediation Suggestions - Prefer storing and serving a reviewed copy of `lottie.min.js` from the local project. - If cdnjs must be used, calculate or obtain the correct SHA-384 or SHA-512 digest for the exact artifact and add `integrity` and `crossorigin="anonymous"` attributes. - Retain the exact dependency version and review any version update before changing the URL or integrity value. - Use a restrictive Content Security Policy as defense in depth. - Verify the downloaded artifact against an independently recorded checksum during builds.

T08 · Insecure Dependencies

Error
Location
SKILL.md:99
Finding
Unpinned npx Commands May Download and Execute an Unexpected Package## Vulnerability Details **File Location**: `SKILL.md`, lines 99-100 **Vulnerability Type**: Unsafe third-party CLI dependency execution **Risk Level**: High ```bash npx hyperframes lint npx hyperframes validate ``` ### Technical Analysis The validation instructions invoke `hyperframes` through `npx` without specifying an audited version or requiring an already installed local binary. Depending on the npm and `npx` version and the local project state, `npx` may resolve and download the package from the npm registry before executing it. This introduces a supply-chain execution risk because the selected package version can change after review. Package installation lifecycle scripts and the CLI itself execute with the operating-system permissions of the user running the commands. The instructions do not require a lockfile, checksum, trusted registry configuration, or `--no-install` behavior. ### Attack Path 1. A user follows the validation instructions in an environment where `hyperframes` is not installed and locked locally. 2. `npx` resolves the package through the configured npm registry. 3. A compromised publisher account, registry, package release, or dependency supplies malicious package content. 4. `npx` downloads the resolved package and may execute applicable package lifecycle behavior and the requested CLI. 5. The malicious code runs with the invoking user's permissions and can access resources available to that account. ### Impact Assessment Successful exploitation could execute arbitrary local code with the permissions of the developer, CI worker, or build account running the command. Accessible scope may include project source files, environment variables, credentials available to the process, writable user files, build artifacts, and network resources reachable from the host. The commands do not request elevated privileges, so they do not inherently grant administrator or root access. Greater impact would ...[truncated 200 chars]
Remediation
## Remediation Suggestions - Declare `hyperframes` as an exact-version development dependency and commit the package-manager lockfile. - Review the resolved package and transitive dependency versions before approving them. - Invoke only the locked local executable, such as with `npx --no-install hyperframes lint` and `npx --no-install hyperframes validate`. - Use package-manager options that enforce lockfile consistency in CI, such as `npm ci`. - Restrict npm to an approved registry and use provenance, checksum, and package-signature controls where supported. - Run validation in a sandboxed, least-privileged environment without unnecessary secrets or writable host resources. - Disable or tightly control dependency lifecycle scripts where compatible with the build process.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Static analysis

No suspicious patterns detected.