CVE-2026-22219: chainlit: SSRF allows internal network access
GHSA-2g59-m95p-pgfq HIGH PoC AVAILABLEAny authenticated user of a Chainlit deployment using the SQLAlchemy data layer—including trial accounts or compromised end-users—can pivot from the chatbot UI directly to your cloud metadata service and exfiltrate IAM credentials. Patch to 2.9.4 immediately; in cloud environments with IMDSv1 enabled, this is a one-request path to full account takeover. Until patched, enforce IMDSv2 and block outbound HTTP from the Chainlit process to RFC 1918 and link-local ranges.
Risk Assessment
Effective risk exceeds the CVSS 7.7 baseline for cloud-hosted AI deployments. The Changed Scope vector (S:C) confirms blast radius extends well beyond Chainlit itself—IMDS credential theft routinely leads to lateral movement and full cloud account compromise. Low privilege requirement (PR:L) means any authenticated end-user can trigger the exploit, not just privileged operators. EPSS 0.00037 indicates no mass exploitation observed yet, but IMDS SSRF is a well-documented attacker playbook item requiring zero specialized knowledge. Organizations running Chainlit on AWS, GCP, or Azure with permissive IAM roles face critical-level real-world risk despite the High (not Critical) CVSS label.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| chainlit | pip | < 2.9.4 | 2.9.4 |
Do you use chainlit? You're affected.
Severity & Risk
Attack Surface
Recommended Action
6 steps-
PATCH
Upgrade Chainlit to 2.9.4 immediately. Fix is in commit ffc3cce648b343b933e10e85ee5805c7e02ab3bf.
-
ENFORCE IMDSv2: On all cloud instances running Chainlit, disable IMDSv1 (AWS: aws ec2 modify-instance-metadata-options --http-tokens required --http-put-response-hop-limit 1).
-
EGRESS FILTERING
Apply strict outbound firewall rules blocking Chainlit process HTTP to RFC 1918 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) and link-local (169.254.0.0/16).
-
PRINCIPLE OF LEAST PRIVILEGE
Audit and reduce IAM roles attached to Chainlit instances—assume credentials are already compromised if you cannot confirm patch status.
-
DETECT
Alert on outbound HTTP connections from Chainlit to internal IP ranges; review storage provider write logs for unexpected objects created by the Chainlit service identity.
-
WORKAROUND (pre-patch only): Block /project/element endpoint at WAF/reverse proxy layer, or disable the SQLAlchemy data layer if persistent chat is not required.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-22219?
Any authenticated user of a Chainlit deployment using the SQLAlchemy data layer—including trial accounts or compromised end-users—can pivot from the chatbot UI directly to your cloud metadata service and exfiltrate IAM credentials. Patch to 2.9.4 immediately; in cloud environments with IMDSv1 enabled, this is a one-request path to full account takeover. Until patched, enforce IMDSv2 and block outbound HTTP from the Chainlit process to RFC 1918 and link-local ranges.
Is CVE-2026-22219 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2026-22219, increasing the risk of exploitation.
How to fix CVE-2026-22219?
1. PATCH: Upgrade Chainlit to 2.9.4 immediately. Fix is in commit ffc3cce648b343b933e10e85ee5805c7e02ab3bf. 2. ENFORCE IMDSv2: On all cloud instances running Chainlit, disable IMDSv1 (AWS: aws ec2 modify-instance-metadata-options --http-tokens required --http-put-response-hop-limit 1). 3. EGRESS FILTERING: Apply strict outbound firewall rules blocking Chainlit process HTTP to RFC 1918 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) and link-local (169.254.0.0/16). 4. PRINCIPLE OF LEAST PRIVILEGE: Audit and reduce IAM roles attached to Chainlit instances—assume credentials are already compromised if you cannot confirm patch status. 5. DETECT: Alert on outbound HTTP connections from Chainlit to internal IP ranges; review storage provider write logs for unexpected objects created by the Chainlit service identity. 6. WORKAROUND (pre-patch only): Block /project/element endpoint at WAF/reverse proxy layer, or disable the SQLAlchemy data layer if persistent chat is not required.
What systems are affected by CVE-2026-22219?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, RAG pipelines, model serving, chatbot UI layers, multi-tenant AI applications.
What is the CVSS score for CVE-2026-22219?
CVE-2026-22219 has a CVSS v3.1 base score of 7.7 (HIGH). The EPSS exploitation probability is 0.04%.
Technical Details
NVD Description
Chainlit versions prior to 2.9.4 contain a server-side request forgery (SSRF) vulnerability in the /project/element update flow when configured with the SQLAlchemy data layer backend. An authenticated client can provide a user-controlled url value in an Element, which is fetched by the SQLAlchemy element creation logic using an outbound HTTP GET request. This allows an attacker to make arbitrary HTTP requests from the Chainlit server to internal network services or cloud metadata endpoints and store the retrieved responses via the configured storage provider.
Exploitation Scenario
An attacker obtains any authenticated session to a Chainlit application—via a legitimate trial account, phishing a registered user, or credential stuffing. They issue a crafted POST to the /project/element endpoint with a url field set to http://169.254.169.254/latest/meta-data/iam/security-credentials/my-role. The Chainlit server, running on an EC2 instance with an attached IAM role, fetches this URL server-side and stores the JSON response—containing a live AccessKeyId, SecretAccessKey, and SessionToken—into the configured S3 bucket. The attacker retrieves the object from storage and uses the credentials to authenticate to AWS. With the IAM role's permissions (commonly broad in AI development environments), they enumerate S3 buckets containing training data and model weights, access internal model APIs, or establish persistence via new IAM users. The entire attack chain requires only authenticated HTTP access and standard tooling.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N References
- github.com/Chainlit/chainlit/commit/ffc3cce648b343b933e10e85ee5805c7e02ab3bf
- github.com/Chainlit/chainlit/releases/tag/2.9.4
- github.com/advisories/GHSA-2g59-m95p-pgfq
- nvd.nist.gov/vuln/detail/CVE-2026-22219
- vulncheck.com/advisories/chainlit-sqlalchemy-data-layer-ssrf-via-project-element
- zafran.io/resources/chainleak-critical-ai-framework-vulnerabilities-expose-data-enable-cloud-takeover
Timeline
Related Vulnerabilities
CVE-2025-68492 4.2 chainlit: IDOR enables unauthorized data access
Same package: chainlit CVE-2025-53767 10.0 Azure OpenAI: SSRF EoP, no auth required (CVSS 10)
Same attack type: Data Extraction CVE-2025-2828 10.0 LangChain RequestsToolkit: SSRF exposes cloud metadata
Same attack type: Data Extraction CVE-2023-3765 10.0 MLflow: path traversal allows arbitrary file read
Same attack type: Data Extraction CVE-2026-21858 10.0 n8n: Input Validation flaw enables exploitation
Same attack type: Data Extraction
AI Threat Alert