Back to skill

Security audit

openreview-review-analyzer

Security checks for vulnerabilities and agentic risk

Overview

The skill is purpose-aligned for summarizing public OpenReview reviews, but it writes fetched data to a predictable shared /tmp file in a way that can expose data or overwrite writable files through symlinks.

Install only if you are comfortable with the skill fetching public OpenReview discussion data and leaving a raw JSON copy in /tmp. Avoid running it in privileged or shared-user environments until the output file handling is hardened with a private temporary directory, restrictive permissions, validated forum IDs, and cleanup or opt-in persistence.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/fetch_reviews.py:325
Finding

Predictable Temporary File Permits Symlink-Based File Overwrite

Content
View full analysis

Vulnerability Details

File Location: scripts/fetch_reviews.py, lines 325–327
Vulnerability Type: Predictable temporary file with unsafe symlink handling
Risk Level: Medium

Vulnerable Code

python
output_path = f"/tmp/openreview_{forum_id}.json"
with open(output_path, "w", encoding="utf-8") as f:
    json.dump(output, f, ensure_ascii=False, indent=2, default=str)

Technical Analysis

The script writes its results to a predictable path in the shared /tmp directory. The filename incorporates the user-supplied forum_id, and the file is opened in write mode without exclusive creation or protection against symbolic-link traversal.

Python's standard open(..., "w") follows an existing symbolic link and truncates its target. A local attacker who can write to /tmp can therefore create the expected output path as a symbolic link before the script runs. If the process has permission to write to the symlink target, the target is overwritten with JSON output.

Exploitation requires local access to the shared temporary directory, knowledge or prediction of the forum ID, and the audited script running with write privileges over the selected target.

Attack Path

  1. Determine or predict the OpenReview forum ID that will be processed.
  2. Select a target file writable by the account under which the script will run.
  3. Create a symbolic link such as /tmp/openreview_<forum_id>.json pointing to that target.
  4. Wait for or induce the agent to execute fetch_reviews.py with the matching forum ID.
  5. The script opens the predictable path in write mode, follows the symbolic link, truncates the target, and writes fetched JSON into it.

Impact Assessment

An attacker can overwrite or corrupt files writable by the script's effective user. Under an unprivileged account, impact is limited to files accessible to that account. If the skill runs under a privileged service account, the issue may cross privilege boundaries and damage ap ...[truncated 353 chars]

Remediation
View remediation

Remediation Suggestions

  • Use Python's tempfile module to create an unpredictable file inside a private temporary directory with restrictive permissions.
  • If a deterministic destination is required, create it atomically with exclusive semantics and reject existing files.
  • On supported platforms, use os.open with O_CREAT | O_EXCL | O_WRONLY | O_NOFOLLOW, then wrap the descriptor with os.fdopen.
  • Validate forum_id against the expected OpenReview identifier format before using it in a filename.
  • Set restrictive permissions, such as mode 0o600, for generated files.
  • If results must be discoverable at a stable path, securely create a private per-user directory first and place the output there rather than directly in shared /tmp.
  • Handle creation failures safely instead of deleting or replacing an unexpected existing path.

Example hardened approach:

python
import os
import re
import tempfile

if not re.fullmatch(r"[A-Za-z0-9_-]+", forum_id):
    raise ValueError("Invalid OpenReview forum ID")

output_dir = tempfile.mkdtemp(prefix="openreview_")
os.chmod(output_dir, 0o700)
output_path = os.path.join(output_dir, f"{forum_id}.json")

fd = os.open(
    output_path,
    os.O_WRONLY | os.O_CREAT | os.O_EXCL | getattr(os, "O_NOFOLLOW", 0),
    0o600,
)
with os.fdopen(fd, "w", encoding="utf-8") as f:
    json.dump(output, f, ensure_ascii=False, indent=2, default=str)
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Tp4

High
Category
MCP Tool Poisoning
Confidence
86% confidence
Finding

The documented purpose focuses on fetching and analyzing reviews, but the behavior also stores raw data locally and retrieves broader discussion content such as comments, rebuttals, and meta-reviews. This mismatch can lead operators or users to authorize the skill without realizing the full extent of data collection and retention, which is risky even when the source content is public.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill performs network access and writes fetched data to /tmp, but it does not declare any explicit tool scope or permissions. This weakens least-privilege controls and makes it harder for a host system or reviewer to understand and constrain the skill's operational capabilities, increasing the chance of unintended data retrieval or local data exposure.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The activation text includes broad phrases such as 'summarize the reviews' and 'analyze reviewer feedback' alongside 'for any academic paper,' which can overlap with ordinary requests about reviews that are not specifically about OpenReview. Although OpenReview-specific examples are present, the trigger scope is not strictly constrained and does not include exclusion guidance for non-OpenReview review tasks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The report template consistently enforces bilingual Chinese/English headings and field labels throughout the output format. Because the file does not indicate this is a China-specific or bilingual-only workflow, this can violate language/locale policy by forcing a specific language format without user opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script persists fetched OpenReview data to a predictable file in /tmp even though the skill’s stated purpose is to fetch and analyze reviews. This creates unnecessary local data retention and can expose paper metadata, reviewer comments, decisions, and rebuttals to other local users or later processes on shared systems, especially because /tmp is commonly world-accessible and the filename is guessable from the forum ID.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The top-level documentation says the script fetches 'all public reviews and comments' for a forum ID. In practice, the code collects the submission itself plus multiple additional note categories such as meta_reviews, decisions, and rebuttals, so the stated intent is narrower than actual behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.