Back to skill

Security audit

Social Media Cover Generator

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to generate cover images as advertised, but it renders active HTML using unpinned remote JavaScript in a browser launched without sandbox protection.

Review before installing. Use this only in an isolated workspace or container, avoid rendering untrusted HTML, and prefer a version that vendors or pins snapdom locally, blocks unexpected network requests during rendering, removes Chromium sandbox-disabling flags, and pins dependencies with a lockfile.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:87
Finding

Mutable Remote JavaScript Is Retrieved and Executed During Rendering

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:87 and SKILL.md:124
Vulnerability Type: Remote payload retrieval and execution
Risk Level: High

The documented and required HTML template loads snapdom directly from an unversioned third-party CDN URL:

html
<script src="https://unpkg.com/@zumer/snapdom/dist/snapdom.js"></script>

Technical Analysis

The URL does not pin an exact package version and does not provide a Subresource Integrity hash. Consequently, the JavaScript executed during image conversion can change after the Skill has been reviewed.

scripts/html2png.js navigates Puppeteer to the generated HTML, waits for the global snapdom object, and invokes it inside the page. Therefore, JavaScript returned by the CDN executes in the Chromium page as an essential part of the conversion process.

This creates a supply-chain execution channel controlled by infrastructure outside the project. Compromise of the package release, package owner, registry, CDN, or mutable distribution path could replace the expected library with attacker-controlled browser-side code.

Attack Path

  1. An attacker compromises the snapdom package distribution, package publisher, or CDN response associated with the mutable URL.
  2. The attacker modifies the remotely served JavaScript while retaining the expected snapdom interface.
  3. A user follows the Skill workflow and generates HTML containing the required external script tag.
  4. scripts/html2png.js opens that HTML in Puppeteer.
  5. Chromium retrieves and executes the attacker-controlled JavaScript.
  6. The payload can inspect or alter the rendered document, falsify generated image content, and initiate network requests from the browser context.
  7. If combined with a Chromium vulnerability, the payload may attempt browser-process compromise; the disabled sandbox described separately substantially increases the consequences of such an exploit.

...[truncated 610 chars]

Remediation
View remediation

Remediation Suggestions

  1. Install snapdom as a local dependency at an exact reviewed version rather than downloading executable code at render time.
  2. Commit and enforce a package lockfile with integrity metadata.
  3. Bundle the reviewed snapdom browser asset with the project and reference it through a local path.
  4. If a CDN is unavoidable, pin an immutable exact version and add a verified Subresource Integrity hash with an appropriate crossorigin attribute.
  5. Configure Puppeteer request interception to deny all network access except resources explicitly required for rendering.
  6. Apply a restrictive Content Security Policy to generated HTML.
  7. Update both occurrences in SKILL.md so the documented template and key requirements no longer mandate a mutable remote script.
  8. Review and deliberately update the bundled dependency instead of accepting silent upstream changes.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/html2png.js:30
Finding

Chromium Sandbox Is Explicitly Disabled While Rendering Active HTML

Content
View full analysis

Vulnerability Details

File Location: scripts/html2png.js:30-34
Vulnerability Type: Insecure browser isolation configuration
Risk Level: High

The converter launches Chromium with both sandbox-disabling flags:

js
const browser = await puppeteer.launch({
  headless: 'new',
  args: [
    '--no-sandbox',
    '--disable-setuid-sandbox'
  ]
});

Technical Analysis

Chromium's sandbox is a defense-in-depth boundary intended to limit the operating-system access available following compromise of a renderer or related browser process. The --no-sandbox and --disable-setuid-sandbox flags explicitly remove this protection.

This is particularly risky because the converter processes active HTML rather than inert image data. Loaded pages can execute JavaScript, and the prescribed template retrieves a third-party script from the network. Input files accepted by the command-line interface can also contain arbitrary scripts and external resources.

Disabling the sandbox does not independently grant ordinary page JavaScript direct operating-system access. Exploitation requires an additional browser vulnerability or compromised native browser component. Nevertheless, removing this security boundary materially increases the impact of such a compromise.

Attack Path

  1. An attacker supplies or influences an HTML file processed by the converter, or compromises the remote JavaScript required by the documented template.
  2. Puppeteer opens the HTML and executes its active content.
  3. Malicious page content triggers a Chromium renderer, browser, graphics, or related memory-safety vulnerability.
  4. Because Chromium was launched with --no-sandbox, the attacker does not need to defeat the normal Chromium sandbox as a separate exploitation stage.
  5. Successful native-code execution operates with the permissions of the account running node scripts/html2png.js.
  6. The attacker can access or modify resources ...[truncated 724 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove --no-sandbox and --disable-setuid-sandbox.
  2. Configure the deployment environment so Chromium's supported sandbox can operate correctly.
  3. Run the converter as a dedicated, unprivileged operating-system user.
  4. Place rendering in an ephemeral container or equivalent isolation boundary with a read-only root filesystem, minimal mounted files, dropped Linux capabilities, process limits, and no host namespaces.
  5. Deny network access by default or use Puppeteer request interception with an explicit resource allowlist.
  6. Restrict input files to an approved working directory and validate the generated HTML before rendering.
  7. Avoid rendering untrusted scripts and remote active content.
  8. Keep Chromium and Puppeteer patched, and never run the converter as root merely to accommodate disabled sandboxing.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (11)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 62)May include surrounding context.

md
Use the `scripts/html2png.js` script to automatically convert HTML to PNG:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 65)May include surrounding context.

md
Use the `scripts/html2png.js` script to automatically convert HTML to PNG:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 76)May include surrounding context.

md
Use the `scripts/html2png.js` script to automatically convert HTML to PNG:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 143)May include surrounding context.

md
Use the `scripts/html2png.js` script to automatically convert HTML to PNG:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 154)May include surrounding context.

md
Use the `scripts/html2png.js` script to automatically convert HTML to PNG:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The template requires loading JavaScript from a public CDN at render time, which introduces a supply-chain and network-fetch risk into the image generation flow. If the remote resource is modified, unavailable, or intercepted in a compromised environment, the generated HTML may execute untrusted code inside the browser context used for rendering.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script opens a local HTML file in a full browser context and waits for network idle, which allows any external resources referenced by the HTML (images, fonts, scripts, CSS, tracking pixels) to trigger outbound requests. If the HTML is attacker-controlled or derived from untrusted title/content input, rendering can leak metadata or perform unintended network access from the host running the converter.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The HTML template hard-codes lang="zh-CN", which imposes a specific locale on all generated pages regardless of user preference or target audience. The skill serves many platforms including global ones, but does not present this locale choice as optional or context-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file explicitly directs the skill to create an HTML file and a PNG file in the working directory, which is a file-system side effect. The description does not warn users that running the skill will create local files or indicate where outputs will be saved beyond the workflow step itself.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency uses a caret range (^24.42.0), which permits automatic installation of newer minor and patch releases instead of a fully fixed version. This weakens build reproducibility and can unexpectedly introduce vulnerable or incompatible releases through the supply chain, even though it is not direct malicious behavior by itself.

Content

Scanner excerpt · package.json (reported line 13)May include surrounding context.

json
"author": "",
  "license": "ISC",
  "dependencies": {
    "puppeteer": "^24.42.0"
  }
}

Unverifiable Dependency: puppeteer has 1 known advisory(ies) (CVE-2019-5786 (Use-After-Free in puppeteer)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.