Back to skill

Security audit

Image Background Remove

Security checks for vulnerabilities and agentic risk

Overview

This background-removal skill is coherent, but it fetches arbitrary remote URLs and uploads image contents to a third-party service without enough scoping or privacy warning.

Review this skill before installing if you work with private networks or sensitive images. Use local, non-sensitive images where possible; avoid internal, access-controlled, localhost, cloud metadata, or intranet URLs; and prefer a pinned install source. The artifact does not show malicious intent, persistence, or hidden code, but its remote URL handling and privacy disclosure need tightening.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T08 · Insecure Dependencies

Warning
Location
README.md:8
Finding

Unpinned Third-Party Skill Installation Creates a Supply-Chain Risk

Content
View full analysis

Vulnerability Details

File Location: README.md:8
Vulnerability Type: Unpinned third-party installer and mutable Skill source
Risk Level: Medium

bash
npx skills add verging-ai/agent-skills --skill background-removal

Technical Analysis

The documented installation command resolves the skills package through npx and installs content from the external verging-ai/agent-skills source without specifying a reviewed package version, immutable commit hash, checksum, or other integrity constraint.

Consequently, the content installed when a user executes this command can differ from the content covered by this audit. Compromise of the package registry entry, maintainer account, dependency chain, or upstream repository could cause a future installation to retrieve malicious code or Skill instructions.

Attack Path

  1. An attacker compromises the skills package, one of its dependencies, the referenced repository, or an associated publisher account.
  2. The attacker publishes malicious content under the same mutable package or repository identifier.
  3. A user follows the documented npx skills add command.
  4. npx resolves the package and the installer retrieves the current upstream Skill content without verifying a reviewed version or integrity hash.
  5. Malicious installation logic, scripts, or Skill instructions execute with the permissions available to the installer or Agent.

Impact Assessment

Successful exploitation could permit arbitrary behavior within the privileges of the user running the installation command. Depending on the compromised component, this could include local file access, credential theft, installation of malicious Skill instructions, or execution of commands under the user's account. The issue does not independently provide elevated operating-system privileges, but it exposes the full authority already available to the installation process.

Remediation
View remediation

Remediation Suggestions

  • Pin the skills installer to a specific reviewed version rather than allowing npx to resolve the latest release.
  • Pin verging-ai/agent-skills to an immutable commit hash or signed release tag.
  • Publish cryptographic checksums or signed release artifacts and verify them before installation.
  • Use a lockfile or equivalent dependency integrity mechanism for the installer and all transitive dependencies.
  • Document the exact package and Skill versions reviewed for each release.
  • Prefer a package-manager mode that refuses undeclared or unexpectedly changed dependency versions.

T09 · Insecure Skill Coding Practices

Warning
Location
skill.md:83
Finding

Unrestricted Remote Image Retrieval Can Access Internal Network Resources

Content
View full analysis

Vulnerability Details

File Location: skill.md:83-85
Vulnerability Type: Unrestricted URL retrieval and redirect following
Risk Level: Medium

text
1. **Parse args** → extract image path/URL
2. **Download remote image** (if URL): `curl -L -o /tmp/verging-bg-removal/photo.jpg "URL"`
3. **Validate** → check file exists, format is JPG/PNG/WebP, size < 10MB

Technical Analysis

The execution flow accepts a user-provided URL and passes it to curl -L. No controls are specified for URL schemes, resolved IP addresses, ports, redirect destinations, loopback addresses, private networks, link-local services, or cloud metadata endpoints.

Quoting the URL helps prevent shell metacharacter injection, but it does not prevent server-side request forgery behavior. The -L option also follows redirects without requiring each destination to be revalidated. An initially public URL can therefore redirect the request to an internal address.

Validation occurs only after the network request has completed. File type and size checks therefore cannot prevent the Agent from reaching an internal service. If an internal resource returns content accepted as an image, the subsequent documented upload step can also transmit that content to the external verging.ai service.

Attack Path

  1. An attacker supplies an image URL targeting a loopback, private, link-local, or otherwise internal address. Alternatively, the attacker supplies a public URL that redirects to such an address.
  2. The Agent executes curl -L with the attacker-controlled URL.
  3. curl connects from the Agent's network context, which may have access to services unavailable to the attacker.
  4. The response is written to the local temporary file before validation.
  5. If the response passes the documented image validation, the workflow uploads it to verging.ai, potentially exposing the internal image or resource externally.

Impact Assessment

Ex ...[truncated 495 chars]

Remediation
View remediation

Remediation Suggestions

  • Permit only explicitly supported schemes, preferably https.
  • Parse URLs with a dedicated URL parser instead of relying only on shell quoting.
  • Resolve the destination before connecting and reject loopback, private, link-local, multicast, reserved, and cloud metadata address ranges for both IPv4 and IPv6.
  • Revalidate the host and resolved address after every redirect, or disable redirects unless they are required.
  • Protect against DNS rebinding by binding validation to the address actually used for the connection.
  • Restrict destination ports and consider an allowlist of trusted image hosts where operationally feasible.
  • Set connection, transfer, and overall timeouts.
  • Enforce a response-size limit while downloading rather than only checking size afterward.
  • Validate actual file signatures and decoded image content before uploading the result.
  • Avoid uploading any downloaded response unless all URL and content validation checks succeed.

T09 · Insecure Skill Coding Practices

Note
Location
skill.md:84
Finding

Predictable Shared Temporary Path Permits Symlink-Based File Overwrite

Content
View full analysis

Vulnerability Details

File Location: skill.md:84
Vulnerability Type: Unsafe predictable temporary file
Risk Level: Low

text
2. **Download remote image** (if URL): `curl -L -o /tmp/verging-bg-removal/photo.jpg "URL"`

The fixed temporary location is also explicitly documented at skill.md:98:

text
- **Temp directory:** `/tmp/verging-bg-removal/`

Technical Analysis

The prescribed download command always writes to the predictable path /tmp/verging-bg-removal/photo.jpg. The instructions do not require the directory to be created with restrictive permissions, verify its ownership, reject symbolic links, or create the destination file exclusively.

On a multi-user system, another local user may be able to pre-create the directory or destination as a symbolic link. Because curl -o opens the named destination normally, it may follow that link and overwrite a file writable by the account running the Skill. The documented cleanup statement does not mitigate unsafe file creation and does not specify a secure cleanup implementation.

Attack Path

  1. A local attacker predicts the documented temporary path.
  2. Before the Skill runs, the attacker creates /tmp/verging-bg-removal under attacker-controlled ownership or places a photo.jpg symbolic link in an insufficiently protected existing directory.
  3. The symbolic link points to another file writable by the victim account.
  4. The victim invokes the Skill with a remote image.
  5. curl -o /tmp/verging-bg-removal/photo.jpg follows the link and overwrites or corrupts the target with attacker-selected remote content.

Exploitation depends on the attacker being able to create or modify entries at the predictable path and on the target being writable by the account executing the Skill.

Impact Assessment

A successful attack can overwrite or corrupt files writable by the Skill's execution account. The precise scope is limited to that ...[truncated 251 chars]

Remediation
View remediation

Remediation Suggestions

  • Create a unique private working directory with mktemp -d.
  • Set a restrictive umask, such as 077, before creating temporary files.
  • Verify that the temporary directory is owned by the current user and is not a symbolic link.
  • Use randomized filenames and exclusive file-creation semantics.
  • Do not reuse a fixed path across concurrent or separate invocations.
  • Register a shell trap to remove the unique directory on normal exit, error, or interruption.
  • Refuse to operate if any expected temporary destination already exists unexpectedly.
  • Where supported, use file descriptors or APIs that prevent symbolic-link traversal rather than opening a pathname with ordinary overwrite behavior.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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 (3)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The README tells users to remove backgrounds from local files or remote URLs using an external service but does not clearly disclose that image contents and referenced URLs are transmitted to verging.ai for processing. This can lead users to upload sensitive images or internal-only URLs without informed consent, creating privacy, confidentiality, and potential SSRF-style exposure concerns depending on how the backend fetches remote URLs.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly instructs the agent to download a user-supplied remote image URL and then upload that image to verging.ai, but it does not clearly warn the user that externally hosted content will be transferred to a third-party service. This creates a privacy and data-handling risk because users may provide sensitive or access-controlled image URLs without realizing the content will leave the local environment and be processed by an external provider.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.