Back to skill

Security audit

YouCam Facial Consultant

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its advertised facial analysis, sending your selected selfie to YouCam and charging only for the analyses you choose.

Install if you are comfortable sending your chosen selfie to YouCam/Perfect Corp and paying the displayed credits. Review the provider's privacy and retention terms, keep your API key private, and use current patched dependencies in the local virtual environment. Installed dependency versions and provider-side data handling were not verified.

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
  • 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
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
Findings (28)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The discrepancy is the unrestricted feature interface, not ordinary supporting operations such as dependency setup, authentication, or credit checks. Both run and status accept caller-selected feature names, and run forwards feature-specific parameters and source/reference images to shared execution code. No restriction to the declared analysis is visible. The chunk also does not implement facial-attribute extraction or readable-report formatting itself; it outputs delegated results as JSON. Exact supported features and remote behavior depend on imported modules and contracts that were not supplied.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The supplied code is a general-purpose YouCam execution layer rather than a narrowly scoped facial-attribute analyzer. The feature argument is passed to contract loading and task creation without a facial-analysis allowlist, and the interface supports reference inputs for workflows such as hair transfer or clothing try-on. Uploading files, downloading URL inputs, and polling are supporting implementation details and are not independently treated as mismatches. This chunk also returns raw task data rather than producing the promised readable report, although reporting could exist elsewhere. No particular excluded feature is automatically invoked by this code.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
86% confidence
Finding

Authentication, billing checks, uploads, and task-status requests are reasonable supporting implementation details and are not themselves mismatches. However, this module also exposes broader YouCam functionality, notably template retrieval for excluded try-on use cases and task submission for any feature available in the contract. The supplied chunk does not show those excluded features actually being invoked, and the contract is unavailable, so the finding concerns the broader exposed capabilities rather than confirmed execution. It also does not contain the promised analysis/report workflow, although that could reside elsewhere.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 13)May include surrounding context.

md
requirements:
  credentials:
    - name: YOUCAM_API_KEY
      source: env | credentials.json (in the skill root, next to SKILL.md)
  network:
    - yce-api-01.makeupar.com
  apis:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 52)May include surrounding context.

md
1. A clear, **front-facing**, single-person selfie.
2. Run `python scripts/youcam_core.py validate-key` (0 credits) to confirm the key. If it is not set,
   tell the user to get one at <https://yce.perfectcorp.com/api-console> and set the
   `YOUCAM_API_KEY` env var, or create `credentials.json` in the skill root (see
   `credentials.example.json` for the format).

## Run (only the chosen analyses)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/constants.py (reported line 23)May include surrounding context.

python
SKILL_SCRIPT_ROOT = os.path.dirname(os.path.abspath(__file__))
API_FALLBACK_DOC = os.path.join(SKILL_SCRIPT_ROOT, "api-fallback.yaml")
CREDENTIALS_FILE = os.path.join(os.path.dirname(SKILL_SCRIPT_ROOT), "credentials.json")

# Install dependencies into a local virtual environment in the skill script folder.
VENV_DIR = os.path.join(SKILL_SCRIPT_ROOT, ".venv")

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · SKILL.md (reported line 71)May include surrounding context.

md
Interpret colors and features with `references/guide.md`, and do the golden-ratio bucketing
yourself (buckets and golden targets are in that file).

## Output rules
* For colors, report colors only; do not infer an undertone that was not returned.
* Ratios drift slightly between runs and `faceShape` may not be returned; label ratios as
  approximate and skip missing values instead of filling them in.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/constants.py (reported line 7)May include surrounding context.

python
skills/<skill-name>/
  ├── SKILL.md
  ├── credentials.example.json   # template for credentials.json
  ├── credentials.json           # CREDENTIALS_FILE (user-provided)
  └── scripts/                   # SKILL_SCRIPT_ROOT (this file's folder)
      ├── constants.py, youcam_api.py, ...

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/constants.py (reported line 8)May include surrounding context.

python
skills/<skill-name>/
  ├── SKILL.md
  ├── credentials.example.json   # template for credentials.json
  ├── credentials.json           # CREDENTIALS_FILE (user-provided)
  └── scripts/                   # SKILL_SCRIPT_ROOT (this file's folder)
      ├── constants.py, youcam_api.py, ...
      ├── api-fallback.yaml      # API_FALLBACK_DOC

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/constants.py (reported line 15)May include surrounding context.

python
├── requirements.txt       # REQUIREMENTS_FILE
      └── .venv/                 # VENV_DIR

Every path the scripts use resolves inside `SKILL_SCRIPT_ROOT`, except credentials.json, which lives
one level up in the skill root so users edit it next to SKILL.md rather than inside the vendored code.
"""

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/youcam_api.py (reported line 90)May include surrounding context.

python
def get_key() -> str:
    """Resolve the API key from the YOUCAM_API_KEY env var or credentials.json.

    Exits with code 2 and a structured error if no usable key is configured.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/youcam_api.py (reported line 108)May include surrounding context.

python
"No API key configured.",
            hint=f'Set the YOUCAM_API_KEY env var, or create {CREDENTIALS_FILE} with {{"api_key": "..."}}'
            + format_hint,
            details="Neither YOUCAM_API_KEY nor credentials.json was found.",
            code=2,
        )

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/youcam_core.py (reported line 9)May include surrounding context.

python
everything the skill needs.

Auth:
    Set the YOUCAM_API_KEY environment variable, or create a credentials.json file (in the
    skill's root, next to SKILL.md) containing {"api_key": "..."}. The env var is used first
    if both are present. If neither is set, the command & API call fails.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/youcam_tasks.py (reported line 123)May include surrounding context.

python
try-on. Follows the same rules as src_file. Not every feature needs this.
        params: Extra options to send along with the request.
        key: The API key to use. Required; the caller (e.g. youcam_core.py's CLI) is
            expected to resolve it from YOUCAM_API_KEY or credentials.json beforehand.
        version: Which version of the feature to call. Defaults to the standard version.
        interval: How many seconds to wait between checks while the job is processing.
        max_polls: How many times to check on the job before giving up and returning

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/youcam_tasks.py (reported line 141)May include surrounding context.

python
contract = contract or load_contract(feature)
    if not key:
        raise ValueError(
            "missing API key. set the YOUCAM_API_KEY env var, or create credentials.json "
            "(see credentials.example.json for the format)"
        )
    body = dict(params or {})

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

The workflow sends a selfie to a third-party API without an explicit privacy warning.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

The workflow uploads an identifiable facial image to an external provider, but the mandatory user-facing confirmation covers analysis choice and cost rather than disclosure of the image transfer. Naming YouCam in the skill documentation provides some context, but does not ensure the user understands or authorizes third-party processing of their sensitive image before upload.

Content

No source excerpt is available for this finding.

The skill implements template browsing for cosmetic try-on features outside its facial-analysis scope.

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

The manifest limits the skill to facial attributes and explicitly excludes makeup and hair try-on. The list_templates function implements authenticated retrieval of feature-specific templates, explicitly including look-vto looks and hair-transfer styles (L216–L220), which is not needed to analyze a selfie's colors, facial shapes, or proportions.

Content

No source excerpt is available for this finding.

Tainted flow: 'put_req' from requests.post (line 295, network input) → requests.put (network output)

Medium
Category
Data Flow
Confidence
80% confidence
Finding

Uploading to an API-issued presigned URL is expected, but this implementation imposes no HTTPS, destination, or redirect restrictions before sending the selfie bytes. If an attacker can influence the upload metadata response or its configuration, the client can disclose sensitive photos to an unintended destination or issue requests to internal services; that prerequisite is not demonstrated here.

Content

Scanner excerpt · scripts/youcam_api.py (reported line 297)May include surrounding context.

python
info = meta.json()["data"]["files"][0]
    put_req = info["requests"][0]
    with open(file_path, "rb") as fh:
        requests.put(
            put_req["url"],
            headers=put_req.get("headers", {"Content-Type": ct}),
            data=fh,

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

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.

Content

Scanner excerpt · scripts/youcam_api.py (reported line 313)May include surrounding context.

python
Args:
        contract: The feature's loaded API contract, e.g. from load_contract().
        feature: Which YouCam feature to create a task for, e.g. "skin-analysis".
        body: The request payload, e.g. file_id(s)/url(s) and any feature-specific params.
        key: The API key to authenticate the request with.
        version: Which version of the feature to call. Defaults to the standard version.

The CLI dispatches caller-selected YouCam features instead of restricting execution to facial-attribute analysis.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

The manifest explicitly excludes skin-condition scoring, makeup, and hair try-on, but the run command loads a contract for the caller's chosen feature and forwards that feature and parameters without a facial-consultant-specific restriction. This is an executable broader interface, not just an unused argument: L019-L020 even document invoking skin-analysis with pore and skin-type scoring actions.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/youcam_init.py (reported line 49)May include surrounding context.

python
def _run_setup_step(cmd: list[str]) -> None:
    """Run one setup command, exiting with a structured error if it fails."""
    try:
        subprocess.run(cmd, check=True)
    except subprocess.CalledProcessError as exc:
        exit_with_error(
            "setup_failed",

The task runner supports caller-selected YouCam features rather than limiting execution to facial-attribute analysis.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

The manifest limits this skill to single-selfie facial attributes and explicitly excludes skin-condition scoring, makeup, and hair try-on. However, run() loads a contract for the caller-provided feature and passes that feature to create_task() without a facial-analysis allowlist; it also resolves reference inputs explicitly documented for hair transfer and clothing try-on (L118–L120, L153–L154). This exposes a general feature-execution capability beyond the stated scope.

Content

No source excerpt is available for this finding.

A mandatory English disclaimer imposes a language requirement without user opt-in.

Low
Category
Output Handling
Confidence
88% confidence
Finding

The skill requires every response to end with a fixed English note, without allowing translation or offering a language choice. This mandates English output even when the user communicates in another language.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The open-ended requests dependency allows installations to resolve to different, unreviewed releases, weakening reproducibility and supply-chain assurance. This is a dependency-management weakness, not evidence that the installed package is compromised.

Content

Scanner excerpt · scripts/requirements.txt (reported line 1)May include surrounding context.

text
requests>=2.28
PyYAML>=6.0