Vulnerabilities in pkg:pypi/ciguard

PACKAGE
Advisory Identifier: GHSA-8cxw-cc62-q28v
Advisory Summary

CVE-2026-44220 is a LOW (CVSS 0.0) discover_pipeline_files follows symlinks out of vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting ciguard libraries in the PyPI ecosystem. The issue involves discover_pipeline_files follows symlinks out of scan root. Remediation is available by upgrading affected packages to version 0.8.2.

4 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/ciguard

4 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/ciguard. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-8cxw-cc62-q28v CVE-2026-44220 LOW ciguard: discover_pipeline_files follows symlinks out of scan root
GHSA-xw8c-rrvx-f7xq CVE-2026-44219 MODERATE ciguard: SCA HTTP client reads response body without size cap
GHSA-jrm4-4pcf-4763 CVE-2026-44218 LOW ciguard: Container image runs as root (no USER directive)
GHSA-7ww3-xvf5-cxwm - LOW ciguard: Web UI is missing HTTP defence-in-depth headers

CVE-2026-44220 at a Glance

CVE Identifier CVE-2026-44220
GHSA Identifier GHSA-8cxw-cc62-q28v
Severity LOW
CVSS v3.1 Base Score 0.0
CWE Classification CWE-59: Improper Link Resolution Before File Access ('Link Following')
Affected Product ciguard
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 0.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-44220

To remediate this vulnerability, upgrade all affected ciguard dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ciguard fixed: 0.8.2
pip install ciguard>=0.8.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show ciguard

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-44220, inspect your installed packages using pip:

pip show ciguard

Analyze the terminal output to locate any version of ciguard in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.2), your application is affected.

Note: The pip show ciguard command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following'), where the product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. In ciguard, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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 ```python 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 - Fix released in [v0.8.2](https://github.com/Jo-Jo98/ciguard/releases/tag/v0.8.2) - CI regression gate added in [v0.8.3](https://github.com/Jo-Jo98/ciguard/releases/tag/v0.8.3) - https://www.cve.org/CVERecord?id=CVE-2026-44220 See also: [GHSA-w828-4qhx-vxx3](https://github.com/advisories/GHSA-w828-4qhx-vxx3) — same conceptual pattern (path-validation flaw in an AI-agent tool) in Claude SDK for Python, CWE-59 + CWE-367

CVE-2026-44220 Affected ciguard Versions

1 component(s)
Fixed Versions:
0.8.2
Product / Package Ecosystem Affected Versions Fixed Version
ciguard
PyPI
≥ 0.8.0
< 0.8.2
0.8.2

References

Frequently Asked Questions

What is CVE-2026-44220?
CVE-2026-44220 is a security vulnerability in ciguard involving discover_pipeline_files follows symlinks out of scan root under CWE-59: Improper Link Resolution Before File Access ('Link Following').
Which ciguard versions are affected?
Affected versions include releases prior to 0.8.2 across affected packages: ciguard.
What version fixes CVE-2026-44220?
Upgrading to 0.8.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ciguard affected?
Yes, ciguard is affected in releases prior to 0.8.2. Upgrade your dependency to 0.8.2 or later.
What is the CVSS score of CVE-2026-44220?
CVE-2026-44220 has a CVSS v3.1 base score of 0.0 (LOW) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N.
What CWE is associated with CVE-2026-44220?
CVE-2026-44220 is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following') (The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.).
How can I check PyPI dependencies for CVE-2026-44220?
Run the dependency tree command: 'pip show ciguard'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8cxw-cc62-q28v",
  "modified" : "2026-05-15T23:51:39Z",
  "published" : "2026-05-05T22:19:23Z",
  "aliases" : [ "CVE-2026-44220" ],
  "summary" : "ciguard: discover_pipeline_files follows symlinks out of scan root",
  "details" : "## Summary\n\nThe `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.\n\n## Threat scenario\n\n**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.\n\n## Patch\n\n- New `follow_symlinks: bool = False` parameter on `discover_pipeline_files`. Default refuses to descend into symlinked directories OR symlinked files.\n- Belt-and-braces: results are filtered to those whose `.resolve()` lies under `root.resolve()`, applied even when callers opt in to `follow_symlinks=True`.\n- 3 regression tests in `tests/test_discovery.py::TestSymlinkSafety`.\n\n## Discovery\n\nFound during ciguard's first self-conducted penetration test cycle (PTES + OWASP TG v4.2 + CREST framing), 2026-04-26.\n\n## CVSS Scoring\n\n- 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)\n- 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.\n\n## Reproduction\n\n```python\nfrom pathlib import Path\nfrom ciguard.discovery import discover_pipeline_files\n# In a victim dir, plant: trojan -> /etc\n# (or any other accessible dir containing pipeline-shaped files)\nfor f in discover_pipeline_files(Path('/tmp/victim')):\n    print(f)  # pre-fix: includes paths under /etc; post-fix: only /tmp/victim/\n```\n\n## References\n\n- Fix released in [v0.8.2](https://github.com/Jo-Jo98/ciguard/releases/tag/v0.8.2)\n- CI regression gate added in [v0.8.3](https://github.com/Jo-Jo98/ciguard/releases/tag/v0.8.3)\n- https://www.cve.org/CVERecord?id=CVE-2026-44220\n\nSee also: [GHSA-w828-4qhx-vxx3](https://github.com/advisories/GHSA-w828-4qhx-vxx3) — same conceptual pattern (path-validation flaw in an AI-agent tool) in Claude SDK for Python, CWE-59 + CWE-367",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "ciguard"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.8.0"
      }, {
        "fixed" : "0.8.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.8.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Jo-Jo98/ciguard/security/advisories/GHSA-8cxw-cc62-q28v"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44220"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Jo-Jo98/ciguard"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Jo-Jo98/ciguard/releases/tag/v0.8.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Jo-Jo98/ciguard/releases/tag/v0.8.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-59" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-05T22:19:23Z",
    "nvd_published_at" : "2026-05-12T20:16:42Z"
  }
}