T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:81- Finding
Execution of Untrusted Container Images Discovered Through Web Search
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:81-105; additional guidance inreferences/image-sources.md:211-231andreferences/image-sources.md:295-320
Vulnerability Type: Remote payload retrieval and supply-chain compromise
Risk Level: CriticalVulnerable Code
markdown #### Step 4.3: Web Search (fallback) Only if Steps 4.1 and 4.2 fail. Search for `"<vendor> pytorch docker official"`. #### Step 4.4: Local Images (fallback) Only if Steps 4.1-4.3 fail. Check `docker images | grep pytorch`. #### Test Before Use ```bash docker pull "${IMAGE}" && docker run --rm "${IMAGE}" python -c "import torch; print(torch.__version__)"If test fails, try next source. If all fail, ask user for image.
Step 4.5: Update Skill (self-improvement)
IMPORTANT: If image found via Web Search (Step 4.3) passes all tests, update
references/image-sources.mdto add the newly discovered vendor hub as a primary source.text The corresponding image-discovery instructions state: ```markdown ### Extract and Verify From search results: 1. Find registry URL pattern 2. Test API endpoint 3. Query available tags 4. Select and pull imageTechnical Analysis
The Skill permits a container image found through unrestricted web search to be pulled and executed without enforcing:
- A registry or repository allowlist
- Publisher identity verification
- Cryptographic image-signature verification
- An immutable image digest
- A trusted transparency record or software bill of materials
- A controlled entrypoint
- Network isolation during initial validation
Running a command such as
python -c "import torch; ..."does not prevent execution of an image-definedENTRYPOINT. A malicious image can configure an entrypoint that executes attacker-controlled code before forwarding to, or impersonating, the requested Python process. Passing a basic PyTorch import or GPU test demonstrat ...[truncated 2319 chars]- Remediation
View remediation
Remediation Suggestions
- Remove automatic execution of images discovered through general web search.
- Restrict image selection to a centrally maintained allowlist of exact registries, namespaces, and repositories.
- Require explicit, informed user approval before pulling any image outside the allowlist.
- Resolve approved tags to immutable OCI digests and launch images as
repository@sha256:digest. - Verify image signatures using a defined trust policy, such as Sigstore Cosign with pinned issuer and identity constraints or Notary v2.
- Validate publisher ownership independently of search-result content.
- Perform initial inspection without GPU devices, host data mounts, credentials, or other host directories.
- Override the image entrypoint during inspection and verify the image configuration before execution.
- Disable networking during validation where possible, for example with
--network=none. - Apply container hardening controls such as a non-root user,
--read-only,--cap-drop=ALL,--security-opt=no-new-privileges, resource limits, and a restrictive seccomp profile. - Scan the exact digest for known vulnerabilities and malware, and retain an audit record of the verified digest and signature.
- Never treat a successful framework import or GPU test as proof that an image is trustworthy.
