{"id":"CVE-2026-40112","published":"2026-04-09T21:16:13Z","modified":"2026-04-14T14:43:44Z","title":"PraisonAI has Stored XSS via Unsanitized Agent Output in HTML Rendering (nh3 Not a Required Dependency)","vendor":"MervinPraison","product":"PraisonAI","tier":"tail","description":{"text":"PraisonAI is a multi-agent teams system. Prior to 4.5.128, the Flask API endpoint in src/praisonai/api.py renders agent output as HTML without effective sanitization. The _sanitize_html function relies on the nh3 library, which is not listed as a required or optional dependency in pyproject.toml. When nh3 is absent (the default installation), the sanitizer is a no-op that returns HTML unchanged. An attacker who can influence agent input (via RAG data poisoning, web scraping results, or prompt injection) can inject arbitrary JavaScript that executes in the browser of anyone viewing the API output. This vulnerability is fixed in 4.5.128.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.4,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00224,"percentile":0.13289,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-cfg2-mxfj-j6pw","tags":["x_refsource_CONFIRM"]}],"priority":{"score":6.4,"factors":[{"name":"EPSS percentile","points":2.66},{"name":"CVSS severity","points":3.78}]},"vendorSlug":"mervinpraison","affectedVersions":[{"vendor":"MervinPraison","product":"PraisonAI","versions":["< 4.5.128"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-04-14T14:43:40.691981Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"PraisonAI","vulnerableRanges":["<4.5.128"],"patched":["4.5.128"],"from":["GHSA-cfg2-mxfj-j6pw","PYSEC-2026-2910"],"provenance":"source"}],"summary":{"text":"PraisonAI's Flask API endpoint in src/praisonai/api.py renders agent output as HTML without effective sanitization, because the _sanitize_html function depends on the nh3 library, which is not declared as a required or optional dependency, so in a default installation the sanitizer does nothing and returns HTML unchanged. An attacker who can influence agent input, such as through poisoned RAG data, scraped web content, or prompt injection, can inject JavaScript that runs in the browser of a user who views the API output, and this requires that the victim interact with the rendered content.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:17:56Z"},"euvd":{"id":"EUVD-2026-21154","exploited":false,"provenance":"source"}}