CVE-2026-44220
JSON

3.2low

ciguard: discover_pipeline_files follows symlinks out of scan root

Severity
3.2low CVSS:3.1 by GitHub_M
Exploit likelihood
0.21% (higher than 12% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-8cxw-cc62-q28vPYSEC-2026-2408

Description

ciguard is a static security auditor for CI/CD pipelines. From 0.8.0 to 0.8.1 , the discover_pipeline_files() function in src/ciguard/discovery.py walks a directory tree following symlinks, with cycle protection via tracking visited resolved paths. An attacker who can plant a symlink in a directory the user (or AI agent) scans can cause discovery to walk into the symlink target and return paths to pipeline-shaped files outside the requested root. This vulnerability is fixed in 0.8.2.

Affected

Product or packageVersionsReported by
Jo-Jo98 ciguard>= 0.8.0, < 0.8.2CVE List
ciguard (PyPI)from 0.8.0 before 0.8.2GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M3.2low CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N
GitHub0.0low CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
GitHublow CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:P/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N
PyPA Advisory Database0.0none CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:P/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N

Classification

CWE-59

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

ciguard is a static security auditor for CI/CD pipelines. From 0.8.0 to 0.8.1 , the discover_pipeline_files() function in src/ciguard/discovery.py walks a directory tree following symlinks, with cycle protection via tracking visited resolved paths. An attacker who can plant a symlink in a directory the user (or AI agent) scans can cause discovery to walk into the symlink target and return paths to pipeline-shaped files outside the requested root. This vulnerability is fixed in 0.8.2.

GitHub Advisory Database

Summary

The discover_pipeline_files() function in src/ciguard/discovery.py (introduced in v0.8.0 and used by the MCP scan_repo tool shipped in v0.8.1) walks a directory tree following symlinks, with cycle protection via tracking visited resolved paths. An attacker who can plant a symlink in a directory the user (or AI agent) scans can cause discovery to walk into the symlink target and return paths to pipeline-shaped files outside the requested root.

Threat scenario

MCP confused-deputy. A user runs Claude Desktop / Claude Code / Cursor with the ciguard MCP server registered. The agent is fed an adversarial prompt to scan a directory containing planted symlinks (e.g. via a malicious clone or extracted tarball). ciguard.scan_repo walks the symlinks, returning paths and (via subsequent scan calls) file content from ~/.aws/, ~/.config/, /etc/some-pipeline-config/, etc. Pipeline files often contain hardcoded secrets, internal hostnames, deploy keys.

Patch

  • New follow_symlinks: bool = False parameter on discover_pipeline_files. Default refuses to descend into symlinked directories OR symlinked files.
  • Belt-and-braces: results are filtered to those whose .resolve() lies under root.resolve(), applied even when callers opt in to follow_symlinks=True.
  • 3 regression tests in tests/test_discovery.py::TestSymlinkSafety.

Discovery

Found during ciguard's first self-conducted penetration test cycle (PTES + OWASP TG v4.2 + CREST framing), 2026-04-26.

CVSS Scoring

  • CVSS v3.1: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N — 4.4 (Medium)
  • CVSS v4.0: CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:P/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N — first.org calc 5.7 (Medium); GitHub's calc returns 2.4 (Low). Vector is correct — calculator profiles differ.

Reproduction

from pathlib import Path
from ciguard.discovery import discover_pipeline_files
# In a victim dir, plant: trojan -> /etc
# (or any other accessible dir containing pipeline-shaped files)
for f in discover_pipeline_files(Path('/tmp/victim')):
    print(f)  # pre-fix: includes paths under /etc; post-fix: only /tmp/victim/

References

See also: GHSA-w828-4qhx-vxx3 — same conceptual pattern (path-validation flaw in an AI-agent tool) in Claude SDK for Python, CWE-59 + CWE-367

NVD (es)

ciguard es un auditor de seguridad estático para pipelines de CI/CD. De 0.8.0 a 0.8.1, la función discover_pipeline_files() en src/ciguard/discovery.py recorre un árbol de directorios siguiendo enlaces simbólicos, con protección contra ciclos mediante el seguimiento de rutas resueltas visitadas. Un atacante que puede plantar un enlace simbólico en un directorio que el usuario (o agente de IA) escanea puede hacer que el descubrimiento entre en el destino del enlace simbólico y devuelva rutas a archivos con formato de pipeline fuera de la raíz solicitada. Esta vulnerabilidad está corregida en 0.8.2.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-44220 changed 2026-05-13CVE Terms of Use
GitHub Advisory DatabaseGHSA-8cxw-cc62-q28v changed 2026-07-13CC-BY-4.0
NVDCVE-2026-44220 changed 2026-10-26Public domain
PyPA Advisory DatabasePYSEC-2026-2408 changed 2026-07-13CC-BY-4.0