CVE-2026-39890 — Vulnerability in praisonai — CVE Details
PraisonAI Vulnerable to Remote Code Execution via YAML Deserialization in Agent Definition Loading
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.93%). Schedule for your next planned update.
Does your project use an affected praisonai version?
Paste your requirements.txt to check it for CVE-2026-39890 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
The AgentService.loadAgentFromFile method uses the js-yaml library to parse YAML files without disabling dangerous tags (such as !!js/function and !!js/undefined). This allows an attacker to craft a malicious YAML file that, when parsed, executes arbitrary JavaScript code. An attacker can exploit this vulnerability by uploading a malicious agent definition file via the API endpoint, leading to remote code execution (RCE) on the server.
Details
The vulnerability exists in the YAML deserialization process. The js-yaml library's load function is used without specifying a safe schema (e.g., JSON_SCHEMA or DEFAULT_SAFE_SCHEMA). This enables the parsing of JavaScript functions and other dangerous types. When a malicious YAML file containing a !!js/function tag is parsed, the function is evaluated, leading to arbitrary code execution.
The vulnerable code is located in src/agents/agent.service.ts at line 55.
PoC
An attacker can create a malicious agent YAML file with the following content:
!!js/function >
function(){ require('child_process').execSync('touch /tmp/pwned') }
Then, upload this file as an agent definition via the API endpoint that uses AgentService.loadAgentFromFile. When the agent is loaded (either during startup or via an API call that triggers loading), the payload will execute the command touch /tmp/pwned, demonstrating arbitrary code execution.
Impact
This vulnerability allows an unauthenticated attacker (if the API endpoint is unprotected) or an authenticated attacker with the ability to upload agent definitions to execute arbitrary code on the server. This can lead to complete compromise of the server, data theft, or further network penetration.
Recommended Fix
Replace the unsafe load method with a safe alternative. Specifically, use the load method with a safe schema, such as JSON_SCHEMA or DEFAULT_SAFE_SCHEMA. For example:
import yaml from 'js-yaml';
import { JSON_SCHEMA } from 'js-yaml';
// In the loadAgentFromFile method
const agent = yaml.load(fileContent, { schema: JSON_SCHEMA });
Alternatively, if the application requires only a subset of YAML features, consider using the safeLoad method from an older version (though note it was deprecated). The key is to avoid loading tags that can execute code.
Additionally, validate and sanitize all user input, especially file uploads. Ensure that agent definition files are only uploaded by trusted users and consider storing them in a secure location with proper access controls.
Advisory Timeline
- First published April 8, 2026 (232 days ago).
- Last revised November 16, 2026 — 222 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
pip install "praisonai>=4.5.115"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: PyPI (1).
| Package | Fixed In |
|---|---|
| praisonai PyPI · Affected: 0.0.1, 0.0.10, 0.0.11, 0.0.12 (+669 more) | 4.5.115 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-502Deserialization of Untrusted DataMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-32vr-5gcf-3pw2WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-39890ADVISORY
- https://github.com/MervinPraison/PraisonAIPACKAGE
- https://github.com/MervinPraison/PraisonAI/releases/tag/v4.5.115WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/praisonai/PYSEC-2026-462.yamlWEB
- https://pypi.org/project/praisonaiWEB
Frequently Asked Questions
- What is CVE-2026-39890?
- PraisonAI Vulnerable to Remote Code Execution via YAML Deserialization in Agent Definition Loading. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
- How do I check if my project is affected by CVE-2026-39890?
- CVE-2026-39890 affects praisonai. It has a 0.9% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-39890 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is an above-median EPSS score — 58.7% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-40088CRITICAL
PraisonAI Vulnerable to OS Command Injection
- CVE-2026-47392CRITICAL
PraisonAI vulnerable to sandbox escape via `print.__self__` builtins module leak in `execute_code` (subprocess mode)
- CVE-2026-57131CRITICAL
PraisonAI: Jobs API exposes agent-execution endpoints with no authentication
- CVE-2026-57127CRITICAL
praisonai: recipe serve auth middleware silently disables itself when no secret is set
- CVE-2026-57124CRITICAL
PraisonAI: Missing Authentication for Critical Function and Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in praisonai
- CVE-2026-55536CRITICAL
PraisonAI has a Browser Server WebSocket origin validation bypass via unanchored regex (patch bypass of CVE-2026-40289 / GHSA-8x8f-54wf-vv92)
- CVE-2026-55541CRITICAL
PraisonAI: `--api-key` flag on `praisonai serve` is not properly enforced
- CVE-2026-61445CRITICAL
PraisonAI: AICoder Arbitrary File Write and Command Execution via LLM Tool Calls