Two high-severity flaws in Chainlit's AI framework enable attackers to read server files and access internal services, requiring immediate patching.

Security researchers have uncovered two critical vulnerabilities in Chainlit, a widely adopted open-source framework for building conversational AI applications. Dubbed 'ChainLeak' by Zafran Labs researchers who discovered them, these flaws enable attackers to steal sensitive data and compromise cloud environments without user interaction.
Chainlit serves as foundational infrastructure for AI chat applications, averaging 700,000 monthly downloads from PyPI. Its popularity stems from providing ready-made UI components, authentication systems, and deployment tooling—making it prevalent in enterprise and academic systems handling sensitive data. According to Zafran Labs' technical analysis, internet-facing Chainlit deployments are particularly at risk.
The vulnerabilities operate as follows:
CVE-2026-22218 (Critical Severity): Exploits the
/project/elementendpoint by submitting malicious elements with manipulated 'path' parameters. This bypasses validation checks, allowing attackers to copy any server-accessible file (API keys, credentials, databases) into their session. Researchers demonstrated extraction of cloud account tokens that could enable lateral movement.CVE-2026-22219 (High Severity): Affects deployments using SQLAlchemy. Attackers inject malicious URLs via element submissions, triggering unauthorized server-side requests. This SSRF flaw permits access to internal REST APIs and network reconnaissance, with fetched data retrievable through Chainlit's download endpoints.
Zafran Labs confirmed these vulnerabilities can be chained: "An attacker could first exfiltrate cloud credentials via CVE-2026-22218, then use those credentials to escalate access through internal services exposed via CVE-2026-22219," their report states. This attack path could lead to full cloud environment compromise.
The Chainlit maintainers addressed both issues in version 2.9.4 (released December 24, 2025) following coordinated disclosure. The current patched version is 2.9.6.
Immediate Action Required
All organizations using Chainlit should:
- Upgrade immediately to version 2.9.4 or newer
- Audit deployment configurations to ensure external exposure is minimized
- Rotate all credentials and API keys stored on systems running Chainlit
- Monitor for unusual file access patterns or outbound connections from Chainlit servers
As AI frameworks become infrastructure-critical, these findings underscore the importance of proactive security reviews for emerging technologies. Chainlit's maintainers have published upgrade guidance and security advisories on their GitHub repository.
Image: 

Comments
Please log in or register to join the discussion