Back to skill

Security audit

Higgsfield Generate

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for Higgsfield media generation, but it tells the agent to install software by running an unverified remote script automatically.

Review this skill before installing. Use it only if you are comfortable sending prompts, media files, product URLs, and related assets to Higgsfield. Do not let the agent run the `curl | sh` installer automatically; install the CLI through a pinned, trusted, inspectable process first, then authenticate intentionally with `higgsfield auth login`.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:33
Finding

Unverified Remote Installation Script Executed Through the Shell

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 33–39
Vulnerability Type: Remote payload retrieval and execution
Risk Level: Critical

Vulnerable Code

markdown
## Step 0 — Bootstrap

Before any other command, make sure the CLI is installed and authenticated:

1. If `higgsfield` is not on `$PATH`, install it:
   ```bash
   curl -fsSL https://raw.githubusercontent.com/higgsfield-ai/cli/main/install.sh | sh
text

### Technical Analysis

The Skill directs the Agent to retrieve an installation script from an external URL and pass the response directly to `sh`. The URL references the mutable `main` branch rather than an immutable release or commit. The downloaded content is not protected by a pinned cryptographic checksum or signature and is not saved for inspection before execution.

Consequently, the effective code executed by this Skill can change after the audited artifact has been reviewed. Compromise of the upstream repository, its maintainers, the referenced branch, or the delivery path could turn an ordinary media-generation request into arbitrary local code execution.

The repository namespace appears consistent with the advertised Higgsfield vendor, but that does not establish the integrity or future contents of the remote script. The script itself is not part of the audited project, so its exact behavior cannot be verified from this artifact.

Installing a CLI may support the declared media-generation functionality. However, automatically executing an unverified remote script before performing that function exceeds the minimum safe privilege and trust boundary necessary. A pinned and cryptographically verified installation mechanism would provide the same capability with lower risk.

### Attack Path

1. A user invokes the Skill for an ordinary image or video generation request.
2. The Agent checks whether `higgsfield` exists on `$PATH`.
3. If it is absent, the Agent retrieves `install.sh` from the mutable upstream `mai
...[truncated 1391 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the direct curl | sh bootstrap instruction.
  2. Prefer a trusted package manager and pin the CLI to an explicit version.
  3. If a standalone installer is necessary, reference an immutable release artifact or commit rather than main.
  4. Publish and verify a cryptographic signature or trusted SHA-256 checksum before execution.
  5. Download the installer to a temporary file first, reject redirects to unexpected hosts, verify integrity, and inspect the file before running it.
  6. Require explicit user approval before installing software or executing an installer.
  7. Document the installer's expected filesystem changes, network destinations, credential handling, and rollback procedure.
  8. Run installation with the least-privileged account available and prohibit privilege elevation.
  9. Where supported, constrain the Skill to an allowlist of required higgsfield commands instead of granting unrestricted Bash execution.
  10. Fail safely when the CLI is absent by providing manual, version-pinned installation instructions rather than automatically executing remote code.

A safer conceptual workflow is:

bash
VERSION="<approved-version>"
INSTALLER="higgsfield-install-${VERSION}.sh"
EXPECTED_SHA256="<checksum-published-through-a-trusted-channel>"

curl --fail --silent --show-error --location \
  --output "$INSTALLER" \
  "https://github.com/higgsfield-ai/cli/releases/download/${VERSION}/install.sh"

printf '%s  %s\n' "$EXPECTED_SHA256" "$INSTALLER" | sha256sum --check --
less "$INSTALLER"
sh "$INSTALLER"

The concrete release URL and checksum must come from an authenticated, trusted release process; placeholders must not be used operationally.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Chaining Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

Using curl ... | sh is a classic dangerous command-chaining pattern because it combines retrieval and execution into one step with no validation checkpoint. In an agent skill context, this is more dangerous because the agent may execute it automatically, turning a documentation convenience into an operational remote code execution path.

Content

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

  1. If higgsfield is not on $PATH, install it:
    bash
    curl -fsSL https://raw.githubusercontent.com/higgsfield-ai/cli/main/install.sh | sh
    
  2. If higgsfield account status fails with Session expired / Not authenticated, ask the user to run higgsfield auth login (interactive, opens a browser) and wait for them to confirm before continuing.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation encourages fetching external product URLs and uploading images to a remote Higgsfield service without clearly warning that the referenced URL contents, metadata, and provided media will be transmitted to third-party infrastructure for scraping/import. This can lead users to unintentionally disclose private product assets, internal staging URLs, or sensitive media to an external service, especially in a marketing workflow where users may paste unpublished or proprietary links.

Content

No source excerpt is available for this finding.

External Script Fetching

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The skill instructs the agent to install a CLI by fetching a remote shell script from GitHub and piping it directly to sh, which executes unverified code in the current environment. If the remote script, hosting path, network path, or upstream repository is compromised, this becomes immediate arbitrary code execution with the agent's privileges.

Content

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

  1. If higgsfield is not on $PATH, install it:
    bash
    curl -fsSL https://raw.githubusercontent.com/higgsfield-ai/cli/main/install.sh | sh
    
  2. If higgsfield account status fails with Session expired / Not authenticated, ask the user to run higgsfield auth login (interactive, opens a browser) and wait for them to confirm before continuing.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The UX rule mandates automatic language selection based on the first user message: 'Detect the user's language from the first message and reply in it.' This imposes a locale/language behavior without offering the user a choice or opt-in, which matches the policy-violation category for language or locale constraints.

Content

No source excerpt is available for this finding.