The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-40159

CVE-2026-40159: PraisonAI Information Disclosure Flaw

CVE-2026-40159 is an information disclosure vulnerability in PraisonAI that exposes sensitive environment variables to subprocess commands. This article covers technical details, affected versions, impact, and mitigation.

Published: April 17, 2026

CVE-2026-40159 Overview

CVE-2026-40159 is a sensitive data exposure vulnerability in PraisonAI, a multi-agent teams system. The vulnerability exists in PraisonAI's MCP (Model Context Protocol) integration, which allows spawning background servers via stdio using user-supplied command strings. When MCP commands are executed through Python's subprocess module, the implementation forwards the entire parent process environment to the spawned subprocess by default. This behavior exposes sensitive data such as API keys, authentication tokens, and database credentials to potentially untrusted or third-party commands.

Critical Impact

Untrusted MCP commands can inherit and access all environment variables from the host process, enabling credential theft and supply chain attacks through silent exfiltration of secrets.

Affected Products

  • PraisonAI versions prior to 4.5.128
  • Systems using PraisonAI MCP integration with user-supplied commands
  • Environments invoking MCP tools via package runners such as npx -y

Discovery Timeline

  • April 10, 2026 - CVE-2026-40159 published to NVD
  • April 13, 2026 - Last updated in NVD database

Technical Details for CVE-2026-40159

Vulnerability Analysis

This vulnerability represents a classic information disclosure flaw (CWE-200) stemming from insecure default behavior in subprocess spawning. When PraisonAI's MCP integration executes user-supplied commands such as MCP("npx -y @smithery/cli ..."), it utilizes Python's subprocess module without sanitizing or restricting the environment variables passed to the child process. The default behavior of subprocess inherits the complete parent process environment, which in AI/ML development environments typically contains numerous sensitive credentials.

The attack surface is particularly concerning in multi-agent AI systems where external packages and tools are frequently invoked. Package runners like npx -y automatically download and execute packages, creating an opportunity for supply chain attacks where compromised or malicious packages can silently harvest the inherited environment variables containing API keys, database credentials, and authentication tokens.

Root Cause

The root cause lies in the default subprocess configuration within PraisonAI's MCP integration code. When spawning subprocesses via Python's subprocess module, the env parameter defaults to inheriting the parent process's full environment if not explicitly restricted. The implementation failed to implement an environment variable allowlist or blocklist mechanism to prevent sensitive credentials from being passed to potentially untrusted external commands.

Attack Vector

The attack requires local access and user interaction to execute. An attacker could exploit this vulnerability through several scenarios:

  1. Malicious MCP Tool Configuration: An attacker tricks a user into configuring an MCP integration with a malicious command that exfiltrates environment variables
  2. Supply Chain Attack: A compromised npm package invoked via npx -y harvests inherited environment variables during execution
  3. Third-Party Package Exploitation: Legitimate but vulnerable packages inadvertently leak environment data to external services

The vulnerability is exploited by crafting or compromising an MCP command or npm package that reads process environment variables (accessible via process.env in Node.js or os.environ in Python subprocesses) and transmits them to an attacker-controlled server.

Detection Methods for CVE-2026-40159

Indicators of Compromise

  • Unexpected outbound network connections from MCP-spawned subprocesses
  • Environment variable access patterns in process monitoring logs indicating bulk reads of sensitive variables
  • Unusual subprocess activity following MCP command execution, particularly involving network communication
  • Evidence of installed npm packages with unknown or suspicious provenance

Detection Strategies

  • Monitor subprocess creation events for PraisonAI processes, specifically tracking environment variable inheritance
  • Implement network egress monitoring to detect data exfiltration attempts from spawned MCP processes
  • Audit MCP configuration files for suspicious or untrusted command strings
  • Review npm package dependencies used in MCP commands for known vulnerabilities or signs of compromise

Monitoring Recommendations

  • Enable detailed subprocess logging in PraisonAI environments to track command execution and environment variable handling
  • Implement data loss prevention (DLP) rules to detect API keys and credentials in outbound traffic
  • Configure alerts for new or modified MCP integrations that invoke external package runners
  • Regularly audit environment variables present in PraisonAI runtime environments to minimize unnecessary credential exposure

How to Mitigate CVE-2026-40159

Immediate Actions Required

  • Upgrade PraisonAI to version 4.5.128 or later, which contains the security fix
  • Audit existing MCP configurations for potentially malicious or untrusted command strings
  • Review and minimize environment variables exposed to PraisonAI processes
  • Consider running PraisonAI in isolated environments with restricted credential access

Patch Information

The vulnerability is fixed in PraisonAI version 4.5.128. The fix addresses the insecure default environment variable inheritance in MCP subprocess spawning. Organizations should upgrade to this version or later as soon as possible. For additional details, consult the GitHub Security Advisory.

Workarounds

  • Manually sanitize environment variables before running PraisonAI by creating a restricted environment that excludes sensitive credentials
  • Avoid using npx -y or similar auto-install package runners in MCP configurations until the patch is applied
  • Implement network segmentation to prevent MCP subprocesses from making outbound connections to untrusted destinations
  • Use container isolation or dedicated service accounts with minimal credential access for PraisonAI deployments
bash
# Configuration example - Run PraisonAI with sanitized environment
# Create a minimal environment without sensitive credentials
env -i PATH="$PATH" HOME="$HOME" python -m praison_ai

# Alternatively, use a dedicated environment file with only required variables
export $(cat .env.minimal | xargs) && python -m praison_ai

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechPraisonai

  • SeverityMEDIUM

  • CVSS Score5.5

  • EPSS Probability0.02%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-200
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-40313: PraisonAI Information Disclosure Flaw

  • CVE-2026-39889: PraisonAI Information Disclosure Flaw

  • CVE-2026-40315: PraisonAI SQL Injection Vulnerability

  • CVE-2026-40287: PraisonAI RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English