Back to skill

Security audit

Wan Image and Video Generation and Editting

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Alibaba DashScope media-generation helper; it sends user prompts and selected media to the Wan API but shows no hidden persistence, destructive behavior, or unrelated data access.

Install only if you are comfortable sending prompts, referenced URLs, and any explicitly provided local image files to Alibaba DashScope using your DASHSCOPE_API_KEY. Do not use private or confidential media unless your policy permits that upload.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (30)

Tainted flow: 'headers' from os.environ.get (line 389, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/wan-magic.py (reported line 80)May include surrounding context.

python
print(f"  Size    : {args.size}")
    print(f"  Quantity: {args.quantity}")

    resp = requests.post(url, headers=headers, json=payload, timeout=300)
    result = resp.json()

    if "code" in result:

Tainted flow: 'headers' from os.environ.get (line 389, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/wan-magic.py (reported line 140)May include surrounding context.

python
print(f"  Size    : {args.size}")
    print(f"  Quantity: {args.quantity}")

    resp = requests.post(url, headers=headers, json=payload, timeout=300)
    result = resp.json()

    if "code" in result:

Tainted flow: 'headers' from os.environ.get (line 389, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/wan-magic.py (reported line 188)May include surrounding context.

python
print(f"  Size    : {args.size}")
    print(f"  Duration: {args.duration}s")

    resp = requests.post(url, headers=headers, json=payload, timeout=60)
    result = resp.json()

    if "code" in result:

Tainted flow: 'headers' from os.environ.get (line 389, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/wan-magic.py (reported line 275)May include surrounding context.

python
print(f"  Size    : {args.size}")
    print(f"  Duration: {args.duration}s")

    resp = requests.post(url, headers=headers, json=payload, timeout=60)
    result = resp.json()

    if "code" in result:

Tainted flow: 'headers' from os.environ.get (line 389, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/wan-magic.py (reported line 362)May include surrounding context.

python
print(f"  Size    : {args.size}")
    print(f"  Duration: {args.duration}s")

    resp = requests.post(url, headers=headers, json=payload, timeout=60)
    result = resp.json()

    if "code" in result:

Tainted flow: 'headers' from os.environ.get (line 389, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/wan-magic.py (reported line 219)May include surrounding context.

python
print(f"[text2video-get] Checking task: {args.task_id}")

    resp = requests.get(url, headers=headers, timeout=60)
    result = resp.json()

    if "code" in result:

Tainted flow: 'headers' from os.environ.get (line 389, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/wan-magic.py (reported line 306)May include surrounding context.

python
print(f"[text2video-get] Checking task: {args.task_id}")

    resp = requests.get(url, headers=headers, timeout=60)
    result = resp.json()

    if "code" in result:

Tainted flow: 'headers' from os.environ.get (line 389, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/wan-magic.py (reported line 393)May include surrounding context.

python
print(f"[text2video-get] Checking task: {args.task_id}")

    resp = requests.get(url, headers=headers, timeout=60)
    result = resp.json()

    if "code" in result:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill invokes Python, requires an API key, and interacts with external model APIs, but it does not declare an explicit tool scope such as allowed tools or permissions. That weakens review and containment, because users and orchestrators cannot clearly see that the skill needs code execution, environment access, and network egress before running it.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation states that local image files are converted to base64 and sent to the model API, but it does not clearly warn users that supplying a local file causes data to leave the machine and be uploaded to a third-party service. This can lead to accidental exfiltration of sensitive local content, especially because the feature accepts arbitrary local image paths.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The image2video feature allows a local image path and notes that the script will encode and pass it to the external API, but the skill text does not prominently disclose this as a privacy and data-transfer risk. Users may reasonably assume a local image is processed locally, resulting in unintended disclosure of private images to a remote provider.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/wan2.6-image-api-doc.md (reported line 29)May include surrounding context.

  • 新加坡地域:POST https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
  • 弗吉尼亚地域:POST https://dashscope-us.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation

curl 示例 — 图像编辑

bash
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation' \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

This markdown file includes a curl example that uploads user-supplied text and one or more image references to an external HTTP endpoint, but it does not warn users that their content is being sent to Alibaba Cloud for processing. For a skill description or API reference, omitting a clear disclosure about external transmission of potentially sensitive user data can leave users unaware of privacy implications.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file documents POST requests to external DashScope endpoints and instructs users to send prompts plus reference_urls, which may contain user media or personal data. While it explains how to call the API, it does not warn that prompts, media references, and authentication data are being transmitted to a third-party service.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/wan2.6-r2v-api-doc.md (reported line 36)May include surrounding context.

md
> 创建成功后使用返回的 `task_id` 查询结果,task_id 有效期24小时。请勿重复创建任务。

### curl 示例

#### 多角色互动(参考图像和视频)

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/wan2.6-t2i-api-doc.md (reported line 31)May include surrounding context.

  • 新加坡地域:POST https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
  • 弗吉尼亚地域:POST https://dashscope-us.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation

curl 示例

bash
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation' \

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/wan2.6-i2v-api-doc.md (reported line 35)May include surrounding context.

创建成功后使用返回的 task_id 查询结果,task_id 有效期24小时。请勿重复创建任务。

curl 示例

bash
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/wan2.6-t2v-api-doc.md (reported line 35)May include surrounding context.

创建成功后使用返回的 task_id 查询结果,task_id 有效期24小时。请勿重复创建任务。

curl 示例

bash
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/wan-magic.py (reported line 80)May include surrounding context.

python
print(f"  Size    : {args.size}")
    print(f"  Quantity: {args.quantity}")

    resp = requests.post(url, headers=headers, json=payload, timeout=300)
    result = resp.json()

    if "code" in result:

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/wan-magic.py (reported line 140)May include surrounding context.

python
print(f"  Size    : {args.size}")
    print(f"  Quantity: {args.quantity}")

    resp = requests.post(url, headers=headers, json=payload, timeout=300)
    result = resp.json()

    if "code" in result:

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/wan-magic.py (reported line 188)May include surrounding context.

python
print(f"  Size    : {args.size}")
    print(f"  Quantity: {args.quantity}")

    resp = requests.post(url, headers=headers, json=payload, timeout=300)
    result = resp.json()

    if "code" in result:

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/wan-magic.py (reported line 275)May include surrounding context.

python
print(f"  Size    : {args.size}")
    print(f"  Quantity: {args.quantity}")

    resp = requests.post(url, headers=headers, json=payload, timeout=300)
    result = resp.json()

    if "code" in result:

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/wan-magic.py (reported line 362)May include surrounding context.

python
print(f"  Size    : {args.size}")
    print(f"  Quantity: {args.quantity}")

    resp = requests.post(url, headers=headers, json=payload, timeout=300)
    result = resp.json()

    if "code" in result:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The image-edit flow sends user prompts and referenced image content to a third-party API, but the script does not provide an explicit privacy or data-transmission warning before upload. In a skill context that may be run over local user files, this can lead to unintentional disclosure of sensitive image content or prompts to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The image2video path base64-encodes a local image and sends the full file contents off-host to the external API without an explicit warning or confirmation. This increases the chance that users unknowingly upload private local media, which is especially relevant for a media-processing skill that directly accepts filesystem paths.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.