MEDIUM 5.5

CVE-2026-61431: PraisonAI Path Traversal in ContextGatherer (v4.6.78 Fix)

PraisonAI versions before 4.6.78 contain a path traversal vulnerability in its context-gathering feature. When processing configuration files (.praisoncontext and .praisoninclude), the application does not properly validate file paths, allowing attackers to read sensitive files outside the intended workspace directory. An attacker who can influence these configuration files can trick the system into including arbitrary file contents in the generated context bundle, potentially exposing credentials, source code, or other sensitive data stored on the same system.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.5 MEDIUM · CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Weaknesses (CWE)
CWE-22
Affected products
0 configuration(s)
Published / Modified
2026-07-10 / 2026-07-10

NVD description (verbatim)

PraisonAI before 4.6.78 contains a path traversal vulnerability in ContextGatherer that fails to validate include paths in .praisoncontext and .praisoninclude files. Attackers can supply absolute paths or parent directory traversal sequences to read arbitrary files outside the workspace and include their contents in the generated context bundle.

4 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability resides in PraisonAI's ContextGatherer component, which processes include path directives from .praisoncontext and .praisoninclude files without adequate path normalization or validation. The component fails to restrict path traversal sequences (../) and absolute paths, enabling CWE-22 (Improper Limitation of a Pathname to a Restricted Directory). When a user processes a workspace containing a malicious configuration file, the ContextGatherer will resolve and include file contents from anywhere on the filesystem that the PraisonAI process has read permission to access. The included content is then bundled into the context output, which may be logged, cached, or transmitted depending on workflow configuration.

Business impact

Exposure of sensitive files can lead to credential theft, intellectual property leakage, and reconnaissance for further attacks. If configuration files are version-controlled or shared across teams, a single malicious .praisoncontext file can compromise multiple users and systems. For organizations using PraisonAI in CI/CD pipelines or shared development environments, this becomes a supply chain risk vector. Affected data may include API keys, private keys, database credentials, source code, and internal documentation—anything readable by the process owner.

Affected systems

PraisonAI versions prior to 4.6.78 are affected. Users running 4.6.78 or later are not vulnerable to this specific path traversal. Exposure is highest in shared or multi-tenant environments where workspace configuration files may be contributed by multiple developers or imported from external sources. Standalone single-user installations face lower risk if local file access is already restricted at the OS level.

Exploitability

Exploitability requires local access and the ability to craft or modify .praisoncontext or .praisoninclude files within or supplied to a target workspace. An attacker cannot exploit this remotely unless they can upload or inject malicious configuration files through another mechanism. The attack requires user interaction in the form of processing/running the PraisonAI context gathering (requires UI:R per CVSS vector). This is not a remote code execution vector; it is a local information disclosure vulnerability with moderate ease of exploitation once the prerequisite file placement is achieved.

Remediation

Upgrade PraisonAI to version 4.6.78 or later, which implements proper path validation in ContextGatherer. The patch should restrict include paths to the workspace directory tree, reject absolute paths, and safely resolve relative paths without allowing traversal sequences. Organizations unable to upgrade immediately should restrict file system permissions on PraisonAI process execution, limit write access to configuration files, and avoid processing untrusted .praisoncontext or .praisoninclude files from external sources.

Patch guidance

Verify against the vendor advisory for exact patch availability and deployment instructions. Update to PraisonAI 4.6.78 or later through the appropriate package manager or release channel used in your deployment. After patching, restart any running PraisonAI instances and re-test workspace context gathering to confirm normal operation. If using PraisonAI in automated pipelines, include the upgrade in your next scheduled maintenance window and validate against your workspace regression tests.

Detection guidance

Monitor PraisonAI process execution for attempts to read files outside the workspace directory. Check .praisoncontext and .praisoninclude files in version control or filesystem backups for absolute paths or traversal sequences (../ patterns). Review PraisonAI logs for unusual file access patterns or errors when processing include paths. On systems with file integrity monitoring or auditd, look for the PraisonAI process opening files in unexpected directories. Organizations using antivirus or EDR tools may tune detection for suspicious path patterns in configuration files before they are processed.

Why prioritize this

Although rated MEDIUM severity with a CVSS score of 5.5, this vulnerability warrants timely attention because: (1) it requires no network access or special privileges, only local file system access and user interaction; (2) information disclosure through file reads can enable downstream attacks such as credential theft or lateral movement; (3) shared development environments and CI/CD pipelines amplify impact; (4) the fix is straightforward (version upgrade) with low deployment friction. It is not critical enough to declare an emergency but should be patched within your next regular maintenance cycle.

Risk score, explained

CVSS 5.5 (MEDIUM) reflects: Attack Vector Local (AV:L)—attacker must have local filesystem access; Access Complexity Low (AC:L)—no special conditions required once files are placed; Privileges None (PR:N)—no elevation needed; User Interaction Required (UI:R)—victim must run or process the workspace; Scope Unchanged (S:U)—impact isolated to confidentiality of the local system; Confidentiality High (C:H)—arbitrary file read is possible; Integrity None (I:N)—files are not modified; Availability None (A:N)—service is not disrupted. The score reflects a meaningful information disclosure risk in local/collaborative environments without remote exploitability or system-level impact.

Frequently asked questions

Can this vulnerability be exploited remotely over the network?

No. The vulnerability requires local filesystem access to place or modify configuration files in a target workspace. It cannot be triggered remotely unless an attacker has another way to inject or upload malicious configuration files (e.g., through a supply chain compromise or shared repository). Treat this as a local or insider threat vector in networked deployments.

What is the risk if we use PraisonAI only for processing trusted, internal workspaces?

Risk is significantly reduced but not eliminated. If all .praisoncontext and .praisoninclude files are authored and controlled by trusted team members with proper code review, the likelihood of exploitation drops. However, if developers can inadvertently introduce traversal patterns or if external dependencies are pulled into workspaces without validation, exposure remains possible. Upgrade to 4.6.78+ as a precaution.

Does this vulnerability allow an attacker to execute code?

No. This is a path traversal leading to information disclosure (file read only). An attacker can read arbitrary files but cannot write, execute, or directly manipulate the system. However, information obtained through this vulnerability (such as credentials or API keys) could be used to enable further attacks.

How do we know if we've been exploited?

Direct exploitation may be silent if the attacker simply reads files through context generation. Look for unusual file access patterns in audit logs, unexpected files being read by the PraisonAI process, or anomalies in context bundle contents (e.g., files that should not be there). If you maintain detailed logs of workspace processing and file accesses, anomalies there may indicate attempted exploitation.

This analysis is provided for informational purposes to help security teams assess and prioritize remediation. It is not a substitute for vendor advisories or professional security consultation. Organizations should verify patch availability, compatibility, and deployment procedures through official PraisonAI channels before applying updates. The vulnerability details, CVSS score, and affected versions are based on CVE-2026-61431 as published. Exploit details and proof-of-concept code are not provided; this document is intended to support defensive measures only. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).