Back to skill

Security audit

Multi document brief

Security checks for vulnerabilities and agentic risk

Overview

This document-summary skill needs review because reusing its work folder can silently delete existing files.

Use a fresh, dedicated temporary work directory for every run: extraction deletes its existing images and texts folders without asking. Select only documents you intend the agent to read, remove sensitive working copies afterward, and use reviewed, current dependency versions. The review concern is the undisclosed deletion behavior.

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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (23)

Direct flow: os.environ.get (credential/environment) → subprocess.run (code execution)

High
Category
Data Flow
Confidence
80% confidence
Finding

Data flows directly from a source (env vars, files, network) to a sink (network output, exec, file write) without intermediate validation.

Content

Scanner excerpt · scripts/build_docx.py (reported line 703)May include surrounding context.

python
pdf_path = src.with_suffix(".pdf")
    src.write_bytes(docx_bytes)
    try:
        r = subprocess.run([sys.executable, "-c", _WORD_SCRIPT, str(src), str(pdf_path)], capture_output=True,
                           text=True, timeout=int(os.environ.get("DOCBRIEF_WORD_TIMEOUT", "120")))
        m = re.search(r"PAGES (\d+)", r.stdout or "")
        if not m:

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, 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.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

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

python
try:
        # отдельный профиль LibreOffice: конвертация работает, даже если у пользователя открыт LibreOffice
        profile = Path(tempfile.gettempdir()) / "mdb_lo_profile"
        subprocess.run([exe, f"-env:UserInstallation={profile.as_uri()}", "--headless", "--convert-to", "pdf",
                        "--outdir", str(workdir), str(src)], check=True, capture_output=True, timeout=180)
    except Exception:  # noqa: BLE001
        return None

Tainted flow: 'exe' from os.environ.get (line 648, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/build_docx.py (reported line 656)May include surrounding context.

python
try:
        # отдельный профиль LibreOffice: конвертация работает, даже если у пользователя открыт LibreOffice
        profile = Path(tempfile.gettempdir()) / "mdb_lo_profile"
        subprocess.run([exe, f"-env:UserInstallation={profile.as_uri()}", "--headless", "--convert-to", "pdf",
                        "--outdir", str(workdir), str(src)], check=True, capture_output=True, timeout=180)
    except Exception:  # noqa: BLE001
        return None

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

python
pdf_path = src.with_suffix(".pdf")
    src.write_bytes(docx_bytes)
    try:
        r = subprocess.run([sys.executable, "-c", _WORD_SCRIPT, str(src), str(pdf_path)], capture_output=True,
                           text=True, timeout=int(os.environ.get("DOCBRIEF_WORD_TIMEOUT", "120")))
        m = re.search(r"PAGES (\d+)", r.stdout or "")
        if not m:

Tainted flow: 'res' from os.environ.get (line 818, credential/environment) → pathlib.Path.write_bytes (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/build_docx.py (reported line 819)May include surrounding context.

python
out = Path(a.out)
    out.parent.mkdir(parents=True, exist_ok=True)
    res = build(data, a.max_pages, a.page_check)
    out.write_bytes(res["docx"])
    if a.pdf and res["pdf"]:
        out.with_suffix(".pdf").write_bytes(res["pdf"])
    est = res["estimate"]

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

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

python
try:
        # отдельный профиль LibreOffice: конвертация работает, даже если у пользователя открыт LibreOffice
        profile = Path(tempfile.gettempdir()) / "mdb_lo_profile"
        subprocess.run([exe, f"-env:UserInstallation={profile.as_uri()}", "--headless", "--convert-to", fmt,
                        "--outdir", str(outdir), str(src)],
                       check=True, capture_output=True, timeout=300)
    except Exception:

Tainted flow: 'exe' from os.environ.get (line 127, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/extract.py (reported line 134)May include surrounding context.

python
try:
        # отдельный профиль LibreOffice: конвертация работает, даже если у пользователя открыт LibreOffice
        profile = Path(tempfile.gettempdir()) / "mdb_lo_profile"
        subprocess.run([exe, f"-env:UserInstallation={profile.as_uri()}", "--headless", "--convert-to", fmt,
                        "--outdir", str(outdir), str(src)],
                       check=True, capture_output=True, timeout=300)
    except Exception:

Existing output subdirectories are recursively deleted without disclosing the destructive cleanup.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

Every run recursively deletes the existing images and texts subdirectories beneath the selected output directory, without checking that their contents belong to this tool or obtaining overwrite consent. An existing default work directory or an incorrectly selected --out directory can therefore lose unrelated files, even before input validation establishes that there are documents to process.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · scripts/pdf.py (reported line 1750)May include surrounding context.

python
how = renderer()
    path = str(path)
    if how in ("pymupdf", "fitz"):
        mod = __import__(how)
        doc = mod.open(path)
        pix = doc[page_no - 1].get_pixmap(dpi=dpi)
        return Image.frombytes("RGB", (pix.width, pix.height), pix.samples)

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

python
cmd = [how, "-q", "-dNOPAUSE", "-dBATCH", "-dSAFER", "-sDEVICE=jpeg", f"-r{dpi}",
                   f"-dFirstPage={page_no}", f"-dLastPage={page_no}", f"-sOutputFile={out}", path]
        try:
            subprocess.run(cmd, check=True, capture_output=True, timeout=120)
            im = Image.open(out)
            im.load()
            return im.convert("RGB")

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

autofix() invents a confidence assessment despite documenting that it only trims and cleans existing content.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

autofix() replaces missing or unrecognized confidence values with “средняя” (medium), assigning a substantive assessment without evidence. In an analytical-briefing skill, malformed or manipulated model output can therefore become an apparently assessed conclusion rather than an explicitly unassessed one, potentially misleading readers; this is an output-integrity issue, not code execution.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The open-ended Pillow requirement permits installations to resolve to different, unreviewed releases, creating a dependency-integrity and reproducibility weakness rather than evidence of an existing compromise. Processing user-supplied images makes dependency security particularly relevant, although an unpinned requirement alone does not establish an exploitable image-processing flaw.

Content

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

text
pillow>=10
openpyxl>=3.1
# необязательно: cryptography (зашифрованные PDF), fonttools (PDF без ToUnicode),
#   PyMuPDF / pdftoppm / Ghostscript (картинки страниц PDF), LibreOffice (точная проверка страниц, рендер слайдов)

Unverifiable Dependency: pillow has 16 known advisory(ies) (CVE-2016-2533 (Pillow buffer overflow in ImagingPcdDecode); CVE-2023-50447 (Arbitrary Code Execution in Pillow); CVE-2021-27922 (Pillow Uncontrolled Resource Consumption) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
88% confidence
Finding

The requirement permits Pillow releases with known vulnerabilities: for example, Pillow 10.0 and 10.1 satisfy this constraint but precede the 10.2.0 fix for CVE-2023-50447. This confirms an unsafe allowed version range, not an affected installation or reachable exploit; that particular advisory concerns ImageMath evaluation, whose use is not shown here. The skill's handling of untrusted images increases the importance of checking applicable parser advisories, but the aggregate advisory count is not evidence that all listed issues apply.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The open-ended openpyxl requirement allows dependency versions to change between installations without review, weakening reproducibility and supply-chain controls. Because the skill processes potentially untrusted spreadsheets, a compromised or vulnerable dependency could affect document confidentiality or processing integrity, but this manifest does not demonstrate such a compromise.

Content

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

text
pillow>=10
openpyxl>=3.1
# необязательно: cryptography (зашифрованные PDF), fonttools (PDF без ToUnicode),
#   PyMuPDF / pdftoppm / Ghostscript (картинки страниц PDF), LibreOffice (точная проверка страниц, рендер слайдов)

Unverifiable Dependency: openpyxl has 2 known advisory(ies) (CVE-2017-5992 (Improper Restriction of XML External Entity Reference in Openpyxl); CVE-2017-5992 (Openpyxl 2.4.1 resolves external entities by default, which allows remote attack)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

OSV returned advisories for this package, but its resolved version is unknown. A package-name lookup does not establish whether the installed release is affected by those advisories.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.