Back to skill

Security audit

MinerU PDF Parser

Security checks for vulnerabilities and agentic risk

Overview

This document-parsing skill is mostly coherent, but its delivery integrations can accidentally read and forward local files referenced by generated Markdown.

Review before installing. Use this only for documents and destinations you trust, avoid confidential or regulated files unless you use an offline path, do not enable remote sinks for untrusted documents, and prefer pinned install commands. Treat parsed Markdown as untrusted until the local image path handling and redirect behavior are fixed.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/sinks/_md.py:40
Finding

Arbitrary Local File Disclosure Through Markdown Image References

Content
View full analysis
list: """Return ``[(alt, ref, Path)]`` for image refs that point at existing local files.""" base = Path(base_dir) if base_dir else None found = [] seen = set() for match in _IMAGE_RE.finditer(markdown): ref = match.group("ref") if is_remote(ref) or ref in seen: continue path = Path(ref) if not path.is_absolute() and base is not None: path = base / ref if path.is_file(): found.append((match.group("alt"), ref, path)) seen.add(ref) return found ``` `scripts/sinks/linear.py:33-60`: ```python def _data_uri(path: Path) -> str: mime = _MIME.get(path.suffix.lower(), "image/png") b64 = base64.b64encode(path.read_bytes()).decode("ascii") return f"data:{mime};base64,{b64}" @register class LinearSink(Sink): name = "linear" requires = ("LINEAR_API_KEY", "LINEAR_TEAM_ID") label = "Linear issue (GraphQL API)" def deliver(self, doc: ParsedDoc) -> SinkResult: key = self.env("LINEAR_API_KEY") team = self.env("LINEAR_TEAM_ID") headers = {"Authorization": key, "Content-Type": "application/json"} base_dir = Path(doc.markdown_path).parent if doc.markdown_path else None images = _md.find_local_images(doc.markdown, base_dir) mapping = {ref: _data_uri(path) for _alt, ref, path in images} body = _md.rewrite_images(doc.markdown, mapping) status, parsed = _http.request_json("POST", API, headers=headers, payload={ "query": _MUTATION, "variables": {"input": { "teamId": team, "title": doc ...[truncated 2250 chars]
Remediation
View remediation
/images/`. 5. Apply an allowlist of supported image extensions and verify file signatures rather than trusting the filename. 6. Reject symbolic links or confirm that their resolved targets remain under the authorized directory. 7. Add file-size limits before reading and Base64-encoding assets. 8. Require explicit confirmation before a sink embeds any local file. 9. Add regression tests for absolute paths, `../` traversal, symlinks, encoded traversal, and paths sharing only a lexical prefix with the allowed directory. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/mineru.py:484
Finding

Authentication Credentials Can Be Forwarded Across Untrusted HTTP Redirects

Content
View full analysis
0: location = resp.getheader("Location") if location: nxt = urllib.parse.urljoin(url, location) nmethod = "GET" if status in (301, 302, 303) and method != "HEAD" else method ndata = None if nmethod != method else data if ndata is not None and hasattr(ndata, "seek"): try: ndata.seek(0) except OSError: pass return _send_once(nmethod, nxt, headers=headers, data=ndata, timeout=timeout, _redirects=_redirects - 1) ``` `scripts/sinks/_http.py:17-23`: ```python def http_request(method, url, *, headers=None, data=None, timeout=60): """Perform one HTTP request. Returns ``(status_code, body_bytes)``.""" req = urllib.request.Request(url, data=data, method=method, headers=headers or {}) req.add_header("User-Agent", USER_AGENT) try: with urllib.request.urlopen(req, timeout=timeout) as resp: return resp.getcode(), resp.read() ``` ### Technical Analysis The MinerU HTTP client follows redirects by recursively calling `_send_once()` with the original `headers` object. No comparison is made between the original and redirected scheme, hostname, or port. Consequently, an `Authorization` header can be forwarded to a different origin. For status codes 307 and 308, the original request method and body are also retained. This can expose both credentials and uploaded document content to the redirected destination. The shared sink transport delegates redirect behavior to `urllib.request.urlopen()` without establishing an explicit same-origin policy for sens ...[truncated 1574 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
README.md:108
Finding

Documentation Executes an Unpinned Third-Party Package During Installation

Content
View full analysis
Remediation
View remediation
add Nebutra/MinerU-Skill ``` 2. Where supported, publish and verify a cryptographic integrity digest or signed provenance for the installer. 3. Avoid suppressing confirmation with `-y` in the primary security-conscious installation instructions. 4. Document the expected package publisher, version, checksum, and registry. 5. Pin repository-based installation to a signed release tag or immutable commit hash rather than an unqualified branch. 6. Recommend downloading and reviewing the installer before execution in high-security environments. 7. Use lockfiles and automated dependency monitoring for any maintained installer or optional dependency workflow. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (86)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill description emphasizes parsing, but environment-driven sink dispatch means parsed data can be forwarded to external destinations when configured. In the context of sensitive PDFs and office files, hidden or under-emphasized forwarding behavior increases the risk of accidental data leakage.

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 · references/integrations.md (reported line 42)May include surrounding context.

md
"""WeCom (企业微信 / WeChat Work) sink — send parsed Markdown as an app message.

WeCom apps deliver content via the message-send API. The native ingestion path
is a ``markdown`` message from a self-built app: first an access token is fetched
with the corp id + secret, then the message is posted. WeCom's markdown is a
limited subset with a 2048-byte content cap and no inline images, so the body is
truncated to fit.

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/sinks/feishu.py (reported line 7)May include surrounding context.

python
"""WeCom (企业微信 / WeChat Work) sink — send parsed Markdown as an app message.

WeCom apps deliver content via the message-send API. The native ingestion path
is a ``markdown`` message from a self-built app: first an access token is fetched
with the corp id + secret, then the message is posted. WeCom's markdown is a
limited subset with a 2048-byte content cap and no inline images, so the body is
truncated to fit.

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/sinks/feishu.py (reported line 39)May include surrounding context.

python
"""WeCom (企业微信 / WeChat Work) sink — send parsed Markdown as an app message.

WeCom apps deliver content via the message-send API. The native ingestion path
is a ``markdown`` message from a self-built app: first an access token is fetched
with the corp id + secret, then the message is posted. WeCom's markdown is a
limited subset with a 2048-byte content cap and no inline images, so the body is
truncated to fit.

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/sinks/onenote.py (reported line 4)May include surrounding context.

python
"""WeCom (企业微信 / WeChat Work) sink — send parsed Markdown as an app message.

WeCom apps deliver content via the message-send API. The native ingestion path
is a ``markdown`` message from a self-built app: first an access token is fetched
with the corp id + secret, then the message is posted. WeCom's markdown is a
limited subset with a 2048-byte content cap and no inline images, so the body is
truncated to fit.

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/sinks/wecom.py (reported line 4)May include surrounding context.

python
"""WeCom (企业微信 / WeChat Work) sink — send parsed Markdown as an app message.

WeCom apps deliver content via the message-send API. The native ingestion path
is a ``markdown`` message from a self-built app: first an access token is fetched
with the corp id + secret, then the message is posted. WeCom's markdown is a
limited subset with a 2048-byte content cap and no inline images, so the body is
truncated to fit.

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/sinks/wecom.py (reported line 35)May include surrounding context.

python
"""WeCom (企业微信 / WeChat Work) sink — send parsed Markdown as an app message.

WeCom apps deliver content via the message-send API. The native ingestion path
is a ``markdown`` message from a self-built app: first an access token is fetched
with the corp id + secret, then the message is posted. WeCom's markdown is a
limited subset with a 2048-byte content cap and no inline images, so the body is
truncated to fit.

Static analysis

No suspicious patterns detected.