CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-61431

CVE-2026-61431: Arbitrary Local File Read and Path Traversal in PraisonAI ContextGatherer

Amit Schendel
Amit Schendel
Senior Security Researcher

Oct 8, 2026·6 min read·16 visits

Executive Summary (TL;DR)

A check-after-use path traversal vulnerability in PraisonAI's ContextGatherer allows unauthorized reading of sensitive local host files.

PraisonAI is vulnerable to an arbitrary local file read vulnerability prior to version 4.6.78. The flaw is in the ContextGatherer component, where validation checks are executed only after files are parsed and appended to the context bundle, bypassing security constraints.

Vulnerability Overview

PraisonAI is an open-source framework designed to orchestrate multi-agent artificial intelligence systems and streamline the assembly of codebases for LLM context windows. In versions prior to 4.6.78, the platform exposes an arbitrary local file read vulnerability via its context gathering subsystem. This component is designed to scan directories and bundle codebase files to populate large language model context windows.

The vulnerability is categorized as CWE-22 (Improper Limitation of a Pathname to a Restricted Directory / 'Path Traversal') and CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor). It resides in the ContextGatherer component within src/praisonai/praisonai/ui/context.py. When parsing configuration files such as .praisoncontext or .praisoninclude, the application fails to restrict paths to the designated workspace root.

An attacker can exploit this flaw by submitting malicious configuration files with absolute paths or directory traversal sequences. When the context compilation routine is triggered, these external files are parsed and appended to the context output bundle. This occurs because the safety boundaries are verified only after the files have been successfully read into memory.

Root Cause Analysis

The root cause of CVE-2026-61431 lies in a check-after-use logic flaw within the file collection routine of the ContextGatherer class. When compiling context, the class processes user-specified inclusion lists from configuration files like .praisoncontext. The application relies on Python's os.path.join() function to combine the workspace root directory with user-supplied paths.

In Python, if one of the arguments to os.path.join() is an absolute path, all previous components are discarded, and the absolute path is returned. For example, joining /app with /etc/passwd returns /etc/passwd directly. This behavior allows attackers to completely bypass the intended workspace directory structure.

The helper function add_file_content() executes an immediate read operation using open(file_path, 'r') on the resolved path. Once read, the content is immediately appended to the local context accumulation list. The boundary safety check is only executed after this append operation, via the Path(file_path).relative_to(self.directory) call.

If the path lies outside the root directory, relative_to() throws a ValueError exception. However, because this validation check is wrapped in a broad try-except block designed to catch general reading errors, the resulting exception is caught and logged as a simple warning. The execution flow continues without removing the unauthorized file content that was already appended to the context list, culminating in information disclosure.

Code Analysis

The vulnerability resides in src/praisonai/praisonai/ui/context.py before version 4.6.78. The vulnerable path resolution and inclusion logic allowed unrestricted file reads.

# Vulnerable Code Structure (Prior to v4.6.78)
def add_file_content(file_path):
    """Helper function to add file content to context."""
    try:
        # Step 1: The file is opened and read immediately
        with open(file_path, 'r', encoding='utf-8') as f:
            content = f.read()
            # Step 2: Content is appended to the context list
            context.append(
                f"File: {file_path}\n\n{content}\n\n{'=' * 50}\n"
            )
            # Step 3: Validation occurs AFTER the read and append
            # If file_path is not relative to self.directory, ValueError is raised
            self.included_files.append(
                Path(file_path).relative_to(self.directory)
            )
    except Exception as e:
        # Step 4: The ValueError is caught here, but the appended content is not removed
        logger.error(f"Error reading {file_path}: {e}")

To correct this flaw, the maintainers implemented a safe path resolution helper _resolve_include_path() in commit 393de394087e3badc79acfec490323bcc99638bd. This helper ensures that all target paths are properly sanitized and verified to reside within the designated workspace directory prior to any reading operations.

# Patched Code Structure (v4.6.78)
def _resolve_include_path(self, include_path: str) -> Optional[str]:
    """Resolve an include path and keep it within the project directory."""
    if os.path.isabs(include_path):
        candidate = os.path.expanduser(include_path)
    else:
        candidate = os.path.join(self.directory, include_path)
    
    base = os.path.realpath(self.directory)
    resolved = os.path.realpath(os.path.normpath(candidate))
    
    try:
        # Validate that the resolved path starts with the base path
        if os.path.commonpath([resolved, base]) != base:
            logger.warning("Skipping include outside project root: %s", include_path)
            return None
    except ValueError:
        logger.warning("Skipping include outside project root: %s", include_path)
        return None
    return resolved

Exploitation Methodology

Exploitation of CVE-2026-61431 relies on local or repository-level vectors where an attacker can introduce a malicious configuration file. The primary prerequisite is that the victim must execute the PraisonAI context gathering mechanism on a workspace containing these configuration files.

The attack sequence begins with the placement of a .praisoncontext or .praisoninclude file within the root of a target project directory. Within this configuration file, the attacker defines absolute paths such as /etc/passwd or relative directory traversal sequences such as ../../../../etc/shadow.

When a user runs the context generation tool using commands like praisonai context or triggers UI-based context consolidation, the application processes the configuration. It reads the files specified, appends their content, and generates a final context.txt file or feeds the context directly to an LLM provider. Although error messages will appear in the output console, the resulting file contains the fully exfiltrated contents of the requested local files.

Impact Assessment

The security impact of CVE-2026-61431 is classified as High for Confidentiality. Because the context gathering component executes with the privileges of the running PraisonAI process, any file readable by that system user can be accessed and compiled into the LLM context.

This vulnerability can lead to the disclosure of sensitive host files, including environment variables, API tokens, database credentials, ssh keys, and system files. If PraisonAI is deployed in cloud or containerized environments, exposure of container service tokens or configurations could lead to subsequent privilege escalation or infrastructure compromise.

The CVSS v3.1 vector is rated as 5.5 (Medium): CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N. Under CVSS v4.0, the vulnerability scores 6.8 (Medium): CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N. The requirement for user interaction (loading and compiling a malicious repository) keeps the severity score moderate, though the impact of successful exploitation remains high.

Remediation and Mitigation

The primary remediation strategy for CVE-2026-61431 is upgrading the praisonai and praisonaiagents packages to version 4.6.78 or later. The update introduces robust input validation and path isolation checks that prevent arbitrary file inclusion.

# Upgrade packages using pip
pip install --upgrade praisonai praisonaiagents

For environments where an immediate upgrade is not feasible, administrators and developers must enforce strict workspace hygiene. Avoid running PraisonAI utilities within repositories or directories obtained from untrusted sources, and manually inspect .praisoncontext and .praisoninclude files for unexpected paths prior to execution.

Additionally, running the PraisonAI runtime environment inside a minimally privileged container containerized or sandbox environment is highly recommended. Restricting the container's file system access ensures that even if a path traversal occurs, the impact is isolated from the host operating system.

Fix Analysis (2)

Technical Appendix

CVSS Score
6.8/ 10
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
EPSS Probability
0.35%
Top 73% most exploited

Affected Systems

PraisonAIPraisonAIAgents

Affected Versions Detail

Product
Affected Versions
Fixed Version
praisonai
MervinPraison
< 4.6.784.6.78
praisonaiagents
MervinPraison
< 4.6.784.6.78
AttributeDetail
CWE IDCWE-22 / CWE-200
Attack VectorLocal
CVSS Score6.8
Exploit StatusProof-of-Concept
CISA KEV StatusNo
ImpactInformation Disclosure

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The product uses external input to construct a pathname that is intended to identify a file or directory that is located under 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.

Known Exploits & Detection

GitHub Security AdvisoryGHSA publication highlighting local path traversal through malicious context configurations.

Vulnerability Timeline

Vulnerability reported and advisory published
2026-02-18
Patched release v4.6.78 pushed to public registries
2026-02-18

References & Sources

  • [1]GitHub Security Advisory GHSA-q7m5-3jmv-vm48
  • [2]Fix Commit 393de394087e3badc79acfec490323bcc99638bd
  • [3]Fix Commit 1620b49f36945d8cc8ee5635b906c960df5097a0
  • [4]VulnCheck Advisory for PraisonAI Path Traversal
  • [5]CVE-2026-61431 Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•38 minutes ago•CVE-2026-126295
7.1

CVE-2026-126295: Path Traversal and Unconfined File Access in NLTK BllipParser

CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.

Amit Schendel
Amit Schendel
1 views•11 min read
•about 2 hours ago•CVE-2026-126300
5.3

CVE-2026-126300: Algorithmic Complexity Denial of Service in NLTK TreebankWordTokenizer.span_tokenize

CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 3 hours ago•GHSA-GPWC-27CW-RH9R
5.3

CVE-2026-126301: Quadratic CPU Exhaustion in NLTK LegalitySyllableTokenizer

The Natural Language Toolkit (NLTK) versions 3.6 through 3.10.3 contain an algorithmic complexity vulnerability in the LegalitySyllableTokenizer.tokenize method. When processing tokens composed of continuous runs of vowels, an unguarded string reversal and set membership lookup loop executes in quadratic time relative to the input token length. Remote attackers capable of submitting arbitrary text to applications utilizing this tokenizer can trigger sustained single-core CPU exhaustion and application-level denial of service.

Amit Schendel
Amit Schendel
4 views•10 min read
•about 4 hours ago•CVE-2026-126304
8.7

CVE-2026-126304: Symlink Path Traversal in NLTK YCOECorpusReader

CVE-2026-126304 is a symlink path traversal vulnerability (CWE-59) in the Natural Language Toolkit (NLTK) versions 3.10.0 prior to 3.10.4. The YCOECorpusReader class constructs internal sub-readers for the 'psd' and 'pos' subdirectories using FileSystemPathPointer.join(), which relies exclusively on lexical string-prefix validation rather than canonical path resolution. An attacker who supplies a crafted YCOE corpus containing symbolic links in place of the 'psd' or 'pos' subdirectories can bypass directory confinement and read arbitrary files from sibling corpora or sensitive directories within the NLTK data sandbox.

Amit Schendel
Amit Schendel
6 views•9 min read
•about 5 hours ago•CVE-2026-128077
6.5

CVE-2026-128077: Authorization Bypass via Request Path Desynchronization in Nuxt and @nuxt/nitro-server

CVE-2026-128077 (GHSA-r99w-jh2x-3mg9) is an authorization bypass and interpretation conflict vulnerability affecting Nuxt and its underlying @nuxt/nitro-server package in versions 4.6.0 through 4.6.3. When an incoming HTTP request path begins with a double forward slash (e.g., //x/admin), the WHATWG URL parser within the Nuxt server-side page renderer interprets the initial segment as a network host/authority and resolves the remaining path (/admin) against the application's page router. Because Nitro server middleware, route-scoped serverHandlers, and Nitro routeRules evaluate the unparsed request path (//x/admin), path-based access controls, redirects, and security header policies configured for /admin fail to match and are bypassed.

Amit Schendel
Amit Schendel
5 views•10 min read
•about 6 hours ago•CVE-2026-128084
4.8

CVE-2026-128084: Integer Truncation and SQL Query Truncation in sqlite3-ruby

Prior to version 2.10.2, the sqlite3-ruby gem explicitly cast 64-bit Ruby string lengths (long) to 32-bit signed integers (int) when invoking the underlying SQLite C API. On 64-bit platforms, providing a string of 4 GiB (2^32 bytes) or larger causes integer truncation, instructing SQLite to process only a prefix of the string. This flaw affects SQL query preparation, bound parameter values, and return values from custom Ruby-defined SQL functions and aggregates, allowing trailing SQL clauses such as WHERE restrictions to be silently dropped under specific conditions.

Alon Barad
Alon Barad
5 views•11 min read