T03 · Remote Payload Retrieval and Execution
- Location
README.md:27- Finding
Mutable Remote Installer Is Downloaded and Executed Without Verification
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Instagram downloader is mostly coherent, but it handles live account session cookies and installs agent files in ways that need careful review before use.
Install only if you are comfortable giving this tool access to an Instagram session cookie. Prefer reviewing and running from a pinned source checkout, avoid curl|bash or iex installers, use a dedicated/least-privileged Instagram account, do not pass session cookies or API tokens on the command line, and remove ~/.ig-downloader credentials when done. Avoid processing untrusted Apify/toon datasets until URL and path validation are fixed.
README.md:27Mutable Remote Installer Is Downloaded and Executed Without Verification
pyproject.toml:15Unpinned Dependencies and Mutable Git Installation Create Supply-Chain Exposure
instagram_downloader.py:213Instagram Authentication Session Is Persisted in Plaintext Without Restrictive Permissions
instagram_downloader.py:710Untrusted Dataset URLs Permit Server-Side Request Forgery and Arbitrary Network Access
instagram_downloader.py:806Dataset-Controlled Shortcodes Enable Output Directory Traversal and Arbitrary File Writes
instagram_downloader.py:616Apify API Token Is Placed in the Request URL Query String
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
- **agents:** replace ASCII decision tree with Mermaid flowchart ([7cd2253](https://github.com/CripterHack/ig-downloader-skill/commit/7cd2253))
- **skill:** replace ASCII architecture with Mermaid diagrams (modes, sessionid flow, setup chain) ([7f4d72e](https://github.com/CripterHack/ig-downloader-skill/commit/7f4d72e))
- **readme:** update README.md to v2.2 — remove login references, add broken login warning, promote Playwright ([9afa78c](https://github.com/CripterHack/ig-downloader-skill/commit/9afa78c))
- **skill:** update SKILL.md to v2.2 — remove login mode, promote sessionid + Playwright setup ([97cf4c9](https://github.com/CripterHack/ig-downloader-skill/commit/97cf4c9))
- bump pyproject.toml to v2.2.0, add playwright dependency ([cb85b59](https://github.com/CripterHack/ig-downloader-skill/commit/cb85b59))
- **agents:** add AGENTS.md with mode selection logic, decision tree, and agent instructions ([88f3793](https://github.com/CripterHack/ig-downloader-skill/commit/88f3793))
- **changelog:** add v2.2.0 entry for Playwright interactive setup ([857fd1c](https://github.com/CripterHack/ig-downloader-skill/commit/857fd1c))
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
- **agents:** replace ASCII decision tree with Mermaid flowchart ([7cd2253](https://github.com/CripterHack/ig-downloader-skill/commit/7cd2253))
- **skill:** replace ASCII architecture with Mermaid diagrams (modes, sessionid flow, setup chain) ([7f4d72e](https://github.com/CripterHack/ig-downloader-skill/commit/7f4d72e))
- **readme:** update README.md to v2.2 — remove login references, add broken login warning, promote Playwright ([9afa78c](https://github.com/CripterHack/ig-downloader-skill/commit/9afa78c))
- **skill:** update SKILL.md to v2.2 — remove login mode, promote sessionid + Playwright setup ([97cf4c9](https://github.com/CripterHack/ig-downloader-skill/commit/97cf4c9))
- bump pyproject.toml to v2.2.0, add playwright dependency ([cb85b59](https://github.com/CripterHack/ig-downloader-skill/commit/cb85b59))
- **agents:** add AGENTS.md with mode selection logic, decision tree, and agent instructions ([88f3793](https://github.com/CripterHack/ig-downloader-skill/commit/88f3793))
- **changelog:** add v2.2.0 entry for Playwright interactive setup ([857fd1c](https://github.com/CripterHack/ig-downloader-skill/commit/857fd1c))
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
- **skill:** update SKILL.md to v2.1 — login mode with 2FA, challenge handling, saved sessions, 4-mode architecture ([af6e105](https://github.com/CripterHack/ig-downloader-skill/commit/af6e105))
- **changelog:** add v2.0.0 entry — sessionid mode, setup wizard, config management, Chrome cookie extraction ([e352843](https://github.com/CripterHack/ig-downloader-skill/commit/e352843))
- **readme:** rewrite README.md for v2.0 — sessionid quick-start, three-mode comparison, setup wizard, cookie extraction guide ([b0ada50](https://github.com/CripterHack/ig-downloader-skill/commit/b0ada50))
- **skill:** rewrite SKILL.md for v2.0 — sessionid mode, setup wizard, three-mode architecture, config management ([4e91ce8](https://github.com/CripterHack/ig-downloader-skill/commit/4e91ce8))
- **script:** update docstring for v2.0 three-mode architecture (sessionid, Apify, setup) ([19129ee](https://github.com/CripterHack/ig-downloader-skill/commit/19129ee))
- remove backup files, add to .gitignore ([5e26048](https://github.com/CripterHack/ig-downloader-skill/commit/5e26048))
- add unit tests for parser, normalizer, and filter logic ([5c1991f](https://github.com/CripterHack/ig-downloader-skill/commit/5c1991f))
The | bash chaining pattern is a classic unsafe bootstrap mechanism because it combines download and execution in one step with no opportunity for inspection. If the fetched content is altered, the user immediately runs attacker-controlled shell commands locally.
# Option A — Universal installer (recommended)
curl -fsSL https://raw.githubusercontent.com/cripterhack/ig-downloader-skill/main/install.sh | bash
# Option B — From source
git clone https://github.com/cripterhack/ig-downloader-skill.git
This is the same download-and-execute chaining abuse pattern in another installation section. Given the skill's agent-integration behavior, compromise here could also implant malicious SKILL.md/AGENTS.md content into agent directories in addition to executing arbitrary code.
# Linux / macOS / Git Bash
curl -fsSL https://raw.githubusercontent.com/cripterhack/ig-downloader-skill/main/install.sh | bash
# Windows PowerShell
iex (iwr -Uri https://raw.githubusercontent.com/cripterhack/ig-downloader-skill/main/install.ps1).Content
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
ithubusercontent.com/cripterhack/ig-downloader-skill/main/install.sh | bash
iex (iwr -Uri https://raw.githubusercontent.com/cripterhack/ig-downloader-skill/main/install.ps1).Content
This installs both the Python CLI **and** the AI agent skill files (SKILL.md).
After this, your AI agent can discover and use the skill automatically.
### Manual install (pip only)
```bash
pip install git+https://github.com/cripterhack/ig-downloader-skill.git
ig-downloader --help
git clone https://github.com/cripterhack/ig-downloader-skill.git
cd ig-downloader-skill
pip install -e .
python instagram_downloader.py --help
# Install only for Codex CLI (not auto-detect)
./install.sh --agent codex
# Install only in current project directory
./install.sh --project
# Install for ALL supported agents
./install.sh --agent all
This project is a dual-layer tool: a Python CLI
The documented purpose frames the skill as a media downloader that does not require password sharing, yet the content describes reading and decrypting Chrome cookies, accessing browser SQLite stores, and handling login/2FA flows. This mismatch is dangerous because users and platforms may approve the skill under a narrower trust model than its actual credential-access behavior warrants.
The documented purpose frames the skill as a media downloader that does not require password sharing, yet the content describes reading and decrypting Chrome cookies, accessing browser SQLite stores, and handling login/2FA flows. This mismatch is dangerous because users and platforms may approve the skill under a narrower trust model than its actual credential-access behavior warrants.
The documented purpose frames the skill as a media downloader that does not require password sharing, yet the content describes reading and decrypting Chrome cookies, accessing browser SQLite stores, and handling login/2FA flows. This mismatch is dangerous because users and platforms may approve the skill under a narrower trust model than its actual credential-access behavior warrants.
The code reads Chrome local state, copies the browser cookie database, decrypts cookies via DPAPI, and extracts Instagram's sessionid automatically. This is credential harvesting behavior: it accesses sensitive authentication material beyond what a downloader strictly needs and could silently take over a logged-in account if misused.
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
# ./install.sh --agent all
#
# # One-liner (auto-downloads repo)
# curl -fsSL https://raw.githubusercontent.com/cripterhack/ig-downloader-skill/main/install.sh | bash
#
# # Via npx (if skills.sh registry is enabled)
# npx skills add cripterhack/ig-downloader-skill
The instructions explicitly tell the agent to use highly sensitive credentials such as Instagram sessionid cookies and Apify API tokens, and they describe persisting the sessionid to ~/.ig-downloader/config.json, but they do not include any warning that these secrets grant account access and must be protected. In this skill context, that omission is security-relevant because the whole workflow centers on acquiring, storing, and reusing authentication material, increasing the chance of credential leakage through logs, screenshots, shell history, or insecure file permissions.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
- **readme:** update README.md to v2.1 — login mode, authentication docs, updated FAQ ([a160c42](https://github.com/CripterHack/ig-downloader-skill/commit/a160c42))
- **skill:** update SKILL.md to v2.1 — login mode with 2FA, challenge handling, saved sessions, 4-mode architecture ([af6e105](https://github.com/CripterHack/ig-downloader-skill/commit/af6e105))
- **changelog:** add v2.0.0 entry — sessionid mode, setup wizard, config management, Chrome cookie extraction ([e352843](https://github.com/CripterHack/ig-downloader-skill/commit/e352843))
- **readme:** rewrite README.md for v2.0 — sessionid quick-start, three-mode comparison, setup wizard, cookie extraction guide ([b0ada50](https://github.com/CripterHack/ig-downloader-skill/commit/b0ada50))
- **skill:** rewrite SKILL.md for v2.0 — sessionid mode, setup wizard, three-mode architecture, config management ([4e91ce8](https://github.com/CripterHack/ig-downloader-skill/commit/4e91ce8))
- **script:** update docstring for v2.0 three-mode architecture (sessionid, Apify, setup) ([19129ee](https://github.com/CripterHack/ig-downloader-skill/commit/19129ee))
- remove backup files, add to .gitignore ([5e26048](https://github.com/CripterHack/ig-downloader-skill/commit/5e26048))
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
# Check if skill files exist
ls ~/.config/opencode/skills/instagram-downloader/SKILL.md
# Check if the CLI works
ig-downloader --version
The skill advertises behavior that clearly requires sensitive capabilities like filesystem access, environment-variable access, network access, and likely shell/package installation flows, but it does not declare any tool scope or permission boundaries. In an agent environment, this weakens reviewability and can cause the skill to run with broader privileges than users expect, increasing the chance of unauthorized local access or data exfiltration.
The document strongly states that login flags are broken and should not be used, but later troubleshooting and known-issues sections still direct users toward username/password/TOTP login flows. Conflicting security-relevant instructions can cause users or agents to invoke deprecated authentication paths, potentially exposing credentials to nonfunctional or unstable code paths.
The skill normalizes capturing and storing a live Instagram session cookie in config.json without strong warnings that a sessionid is effectively an account bearer token. If the file, logs, shell history, or environment are exposed, an attacker could hijack the Instagram account session without needing the user's password.
The setup flow describes polling Chrome's cookie database and decrypting browser-stored cookies, which is highly sensitive local credential access. Without an explicit privacy/system-access warning and consent gate, users may not realize the skill is accessing unrelated browser credential stores and local encryption material, creating serious privacy and account-compromise risk.
The skill description claims no password sharing is required, yet the code still supports direct username/password login and persists authenticated session state to disk. This mismatch can mislead users into supplying sensitive credentials they did not expect to entrust to the tool, increasing the risk of credential theft or account compromise if the host is unsafe.
The documentation states that --login is broken and should not be used, but the executable code still attempts full credential-based login. That inconsistency can lower user vigilance and obscure the fact that the script still collects passwords and 2FA codes, which is dangerous in a tool that already handles session persistence.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
CONFIG_DIR = Path.home() / ".ig-downloader"
CONFIG_FILE = CONFIG_DIR / "config.json"
SETTINGS_FILE = CONFIG_DIR / "settings.json"
APIFY_API_BASE = "https://api.apify.com/v2"
DEFAULT_USER_AGENT = (
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
"AppleWebKit/537.36 (KHTML, like Gecko) "
The browser cookie extraction path accesses and decrypts a sensitive session credential without an explicit warning or consent prompt at the point where it is used. Even if intended as convenience, silently pulling authentication secrets from the user's browser materially increases the chance of unauthorized account access and violates the principle of least surprise.
Persisting session material across runs increases exposure because a stolen or leaked config/settings file can grant ongoing authenticated access without a password. In this skill, session persistence is especially risky because the session may be sourced from browser cookies or full login, making the downloader a long-lived credential holder.
# ═══════════════════════════════════════════════════════════════
def load_config():
"""Load saved sessionid from config file."""
if CONFIG_FILE.exists():
try:
return json.loads(CONFIG_FILE.read_text(encoding='utf-8'))
The code writes the Instagram sessionid to a config file in the user's home directory without any strong warning, encryption, or permission hardening. A session cookie is effectively a bearer token, so local compromise, backup leakage, or multi-user access could allow reuse of the account session.
During interactive setup, the tool falls back from Playwright to automatic Chrome cookie extraction without separately obtaining informed consent for that more invasive step. This broadens the trust boundary unexpectedly and can capture sensitive credentials from the local browser when the user may only have intended to log in through the visible setup flow.
No suspicious patterns detected.