CVE-2026-22219

7.7 HIGH

📋 TL;DR

This CVE describes a server-side request forgery (SSRF) vulnerability in Chainlit versions before 2.9.4 when using the SQLAlchemy data layer backend. An authenticated attacker can inject a malicious URL into an Element, causing the server to make arbitrary HTTP GET requests to internal or cloud services and store the responses. This affects users of vulnerable Chainlit deployments with the SQLAlchemy backend enabled.

💻 Affected Systems

Products:
  • Chainlit
Versions: Versions prior to 2.9.4
Operating Systems: All operating systems running Chainlit
Default Config Vulnerable: ✅ No
Notes: Only affects configurations using the SQLAlchemy data layer backend; other backends may not be vulnerable. Authentication is required to exploit.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker could access sensitive internal network services, cloud metadata endpoints (potentially leading to cloud takeover), and exfiltrate data via stored responses, resulting in full compromise of internal infrastructure or cloud resources.

🟠

Likely Case

Attackers with authenticated access could probe internal networks, retrieve metadata from cloud providers (e.g., AWS IMDS), and potentially access other internal web services, leading to data exposure and lateral movement.

🟢

If Mitigated

With proper network segmentation and access controls, impact is limited to isolated segments, but data exfiltration via storage may still occur if the vulnerability is exploited.

🌐 Internet-Facing: HIGH if the Chainlit server is internet-facing and has authenticated users, as it allows external attackers to target internal services.
🏢 Internal Only: MEDIUM if the server is internal-only, as it still enables authenticated insiders or compromised accounts to exploit internal networks.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authenticated access to the Chainlit interface, but the SSRF mechanism is straightforward once access is gained. Public details suggest it could be easily weaponized.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.9.4

Vendor Advisory: https://github.com/Chainlit/chainlit/releases/tag/2.9.4

Restart Required: Yes

Instructions:

1. Update Chainlit to version 2.9.4 or later using pip: 'pip install --upgrade chainlit==2.9.4'. 2. Restart the Chainlit server to apply the patch. 3. Verify the update by checking the version.

🔧 Temporary Workarounds

Disable SQLAlchemy Backend

all

Switch to a non-vulnerable data layer backend if possible, such as the default in-memory backend, to mitigate the SSRF vulnerability.

Modify Chainlit configuration to use a different backend, e.g., set data_layer to 'memory' in config files.

Network Segmentation

linux

Restrict outbound HTTP requests from the Chainlit server to only necessary external services using firewall rules or network policies.

Configure firewall (e.g., iptables on Linux) to block outbound HTTP/HTTPS from Chainlit server except to allowed destinations.

🧯 If You Can't Patch

  • Implement strict authentication and authorization controls to limit access to authenticated users who need to create or update Elements.
  • Monitor and log all outbound HTTP requests from the Chainlit server for suspicious activity, such as requests to internal IPs or cloud metadata endpoints.

🔍 How to Verify

Check if Vulnerable:

Check if Chainlit version is below 2.9.4 and if the SQLAlchemy data layer backend is configured in the deployment settings.

Check Version:

Run 'chainlit --version' or check the Python package with 'pip show chainlit' to see the installed version.

Verify Fix Applied:

After updating, confirm the version is 2.9.4 or higher and test that providing a malicious URL in an Element no longer triggers outbound HTTP requests.

📡 Detection & Monitoring

Log Indicators:

  • Log entries showing HTTP GET requests initiated by the Chainlit server to unusual internal or cloud metadata URLs, especially from element update operations.

Network Indicators:

  • Outbound HTTP traffic from the Chainlit server to internal network ranges (e.g., 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) or cloud metadata endpoints (e.g., 169.254.169.254 for AWS).

SIEM Query:

Example query for SIEM: 'source="chainlit.log" AND (url CONTAINS "169.254.169.254" OR url CONTAINS "10." OR url CONTAINS "192.168.")'

🔗 References

📤 Share & Export