fal-generate
Fail
Audited by Gen Agent Trust Hub on Mar 6, 2026
Risk Level: HIGHCOMMAND_EXECUTIONPROMPT_INJECTIONEXTERNAL_DOWNLOADSCREDENTIALS_UNSAFE
Full Analysis
- [COMMAND_EXECUTION]: The
generate.shscript uses unquoted heredocs (cat <<EOF) to build JSON payloads. This results in the shell expanding any command substitutions found within the$PROMPTand$IMAGE_URLvariables. An attacker can exploit this to execute arbitrary commands on the host machine by providing a malicious prompt or URL string. - [COMMAND_EXECUTION]: The scripts
generate.sh,get-schema.sh,search-models.sh, andupload.shinclude logic to save aFAL_KEYto a.envfile, which is subsequently loaded using thesourcecommand. Since the input is not validated, this provides a mechanism for persistent command injection if a malicious string is stored in the environment file. - [PROMPT_INJECTION]: The skill is vulnerable to indirect prompt injection via JSON structure manipulation (Category 8). The prompt is interpolated into a JSON string without escaping, allowing for the injection of additional JSON fields.
- Ingestion points: The
--promptand--image-urlarguments inscripts/generate.sh. - Boundary markers: None; the variables are directly placed inside a JSON template.
- Capability inventory: The script performs network requests via
curland file operations. - Sanitization: Absent; there is no escaping of double quotes or shell-special characters.
- [EXTERNAL_DOWNLOADS]: The skill makes network requests to
fal.ai,fal.run, andfal.mediafor its core functionality. These are recognized as legitimate service endpoints for the AI model generation tasks. - [CREDENTIALS_UNSAFE]: The skill implements a persistent credential storage mechanism by saving the user's API key in plaintext within a
.envfile.
Recommendations
- AI detected serious security threats
Audit Metadata